Merge branch 'main' into svn-sync

This commit is contained in:
Ben Goldsworthy 2021-04-15 16:52:59 +01:00
commit 5b07c17356
65 changed files with 1001 additions and 569 deletions

32
.distignore Normal file
View file

@ -0,0 +1,32 @@
# 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.*
.php-commitizen.php

46
.github/workflows/release-handler.yml vendored Normal file
View file

@ -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 }}

4
.gitignore vendored
View file

@ -1,3 +1,7 @@
.phpdoc/
vendor/
dist/
tmp/
*.bak
authors.txt

30
.php-commitizen.php Normal file
View file

@ -0,0 +1,30 @@
<?php
return [
'type' => [
'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
],
];

View file

@ -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 <your branch>`)
- 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/

94
_tools/build-stylesheets.sh Executable file
View file

@ -0,0 +1,94 @@
#!/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 "Stylesheet concatenation complete."
exit 0
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 "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
# 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)
cp $f ./dist/css
#mv $f ./dist/css
echo -e '\t' $filename".css moved."
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
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

31
_tools/build.sh Executable file
View file

@ -0,0 +1,31 @@
#!/bin/bash
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/'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.
# 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

246
_tools/release.sh Executable file
View file

@ -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/}

4
_tools/setup.sh Executable file
View file

@ -0,0 +1,4 @@
#!/bin/sh
cp contrib/pre-commit .git/hooks/pre-commit
chmod +x .git/hooks/pre-commit

View file

@ -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
*/
/**

View file

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

View file

@ -5,7 +5,6 @@
* @filesource
* @package footnotes
* @since 1.5.0
* @date 12.09.14 10:56
*/
/**

View file

@ -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
@ -72,7 +70,6 @@ class MCI_Footnotes {
* @since 2.4.0
* @contributor Patrizia Lutz @misfist
* @var bool
*
*/
public static $a_bool_alternative_tooltips_enabled = false;
@ -127,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()
@ -210,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() {
@ -268,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',
@ -304,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
@ -313,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
*
@ -326,14 +318,12 @@ class MCI_Footnotes {
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.
@ -341,7 +331,7 @@ class MCI_Footnotes {
* The Boolean may be set at the bottom of the plugins main PHP file.
* @see footnotes.php
*/
if ( true === C_BOOL_CSS_PRODUCTION_MODE ) {
if ( PRODUCTION_ENV ) {
/**
* Enqueues a minified united external stylesheet in production.
@ -350,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/
@ -362,10 +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_FOOTNOTES_VERSION is defined at start of footnotes.php.
*
* The media scope argument 'all' is the default.
@ -387,11 +375,9 @@ class MCI_Footnotes {
$l_str_tooltip_mode_long = 'jquery-tooltips';
}
} else {
$l_str_tooltip_mode_short = 'nott';
$l_str_tooltip_mode_long = 'no-tooltips';
}
// Set basic responsive page layout mode for use in stylesheet name.
@ -429,19 +415,54 @@ 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( '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-common',
plugins_url( MCI_Footnotes_Config::C_STR_PLUGIN_NAME . '/css/dev-common.css' ),
array(),
filemtime(
plugin_dir_path(
dirname( __FILE__, 1 )
) . '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__, 1 )
) . 'css/dev-tooltips.css'
)
);
if ( self::$a_bool_amp_enabled ) {
wp_enqueue_style( 'mci-footnotes-amp', plugins_url( MCI_Footnotes_Config::C_STR_PLUGIN_NAME . '/css/dev-amp-tooltips.css' ), array(), C_STR_FOOTNOTES_VERSION );
wp_enqueue_style(
'mci-footnotes-amp',
plugins_url( MCI_Footnotes_Config::C_STR_PLUGIN_NAME . '/css/dev-amp-tooltips.css' ),
array(),
filemtime(
plugin_dir_path(
dirname( __FILE__, 1 )
) . 'css/dev-amp-tooltips.css'
)
);
}
if ( self::$a_bool_alternative_tooltips_enabled ) {
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-alternative',
plugins_url( MCI_Footnotes_Config::C_STR_PLUGIN_NAME . '/css/dev-tooltips-alternative.css' ),
array(),
filemtime(
plugin_dir_path(
dirname( __FILE__, 1 )
) . 'css/dev-tooltips-alternative.css'
)
);
}
$l_str_page_layout_option = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_PAGE_LAYOUT_SUPPORT );
@ -452,7 +473,11 @@ class MCI_Footnotes {
MCI_Footnotes_Config::C_STR_PLUGIN_NAME . '/css/dev-layout-' . $l_str_page_layout_option . '.css'
),
array(),
C_STR_FOOTNOTES_VERSION,
filemtime(
plugin_dir_path(
dirname( __FILE__, 1 )
) . 'css/dev-layout-' . $l_str_page_layout_option . '.css'
),
'all'
);
}

View file

@ -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/

View file

@ -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/
@ -211,15 +209,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 ( true === C_BOOL_CSS_PRODUCTION_MODE ) {
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_register_style(
'mci-footnotes-admin',
plugins_url( 'footnotes/css/settings' . ( ( PRODUCTION_ENV ) ? '.min' : '' ) . '.css' ),
array(),
( PRODUCTION_ENV ) ? C_STR_PACKAGE_VERSION : filemtime(
plugin_dir_path(
dirname( __FILE__, 2 )
) . 'css/settings' . ( ( PRODUCTION_ENV ) ? '.min' : '' ) . '.css'
)
);
wp_enqueue_style( 'mci-footnotes-admin' );
}
@ -340,7 +339,7 @@ abstract class MCI_Footnotes_Layout_Engine {
* @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.
*
*
* @since 2.5.11 Remove escapement function.
* When refactoring the codebase after 2.5.8, all and every output was escaped.
* After noticing that the plugin was broken, all escapement functions were removed.
@ -349,7 +348,7 @@ abstract class MCI_Footnotes_Layout_Engine {
* In that process, this instance of esc_attr() was removed too, so the plugin was
* broken again.
* @link https://github.com/markcheret/footnotes/pull/50/commits/25c3f2f12eb5de1079e9215bf624ec4289b095a5#diff-a8ed6e859c32a18fc10bbbad3b4dd8ce7f43f2378d29471c7638e314ab30f1bdL349-L354
*
*
* @since 2.5.15 To fix it, the data was escaped in add_select_box() instead.
* @since 2.6.1 Restore esc_attr() in load_setting().
* @see add_select_box()
@ -362,7 +361,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;
}
@ -482,7 +481,7 @@ abstract class MCI_Footnotes_Layout_Engine {
* @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
*
*
* @since 2.5.15 Bugfix: Dashboard: General settings: Footnote start and end short codes: debug select box for shortcodes with pointy brackets.
* @since 2.6.1 Restore esc_attr() in load_setting(), remove htmlspecialchars() here.
*/
@ -497,7 +496,7 @@ abstract class MCI_Footnotes_Layout_Engine {
'<option value="%s" %s>%s</option>',
$l_str_value,
// Only check for equality, not identity, WRT backlink symbol arrows.
$l_str_value == $l_arr_data['value'] ? 'selected' : '',
$l_str_value === $l_arr_data['value'] ? 'selected' : '',
$l_str_caption
);
}
@ -555,8 +554,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.

View file

@ -5,7 +5,6 @@
* @filesource
* @package footnotes
* @since 1.5.0
* @date 14.09.14 14:47
*/
/**

View file

@ -5,7 +5,6 @@
* @filesource
* @package footnotes
* @since 1.5.0
* @date 12.09.14 10:26
*/
/**

View file

@ -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/
*/
@ -121,7 +120,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 doesnt 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
*
@ -161,6 +160,7 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_Layout_Engine {
$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: 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;
@ -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 plugins 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' ), '<a href="https://wordpress.org/plugins/amp/" target="_blank" style="font-style: normal;">AMP-WP</a>' ),
'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 its collapsed by default.', 'footnotes' ), '<span style="font-style: normal;">' . MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME . '</span>' ),
'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' ), '<span style="font-style: normal;">' . MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME . '</span>' ),
)
);
// Display template with replaced placeholders.
@ -200,8 +200,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() {
@ -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. Lets 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, __( 'Headings 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' ) ),
@ -311,11 +311,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 dont 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 dont 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 ),
@ -347,13 +347,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 doesnt 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 doesnt 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 ),
@ -361,8 +361,8 @@ 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 themes 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.', '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' ),
)
);
// Display template with replaced placeholders.
@ -376,14 +376,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/
*/
@ -427,7 +427,8 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_Layout_Engine {
// Replace all placeholders.
$l_obj_template->replace(
array(
'description-escapement' => __( 'When delimiters with pointy brackets are used, the diverging escapement schemas will be unified before footnotes are processed.', 'footnotes' ),
// Translators: The 2 placeholders are the &lt;ref&gt;&lt;/ref&gt; and &lt;fn&gt;&lt;/fn&gt; 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' ), '&lt;ref&gt;&lt;/ref&gt;', '&lt;fn&gt;&lt;/fn&gt;' ),
'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 ),
@ -450,7 +451,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.
@ -474,12 +475,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.
@ -523,34 +524,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' ),
)
);
@ -619,8 +620,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.
@ -641,7 +642,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.
@ -650,7 +651,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 youre 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.
'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 ) ),
@ -668,11 +669,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 options select box.
@ -687,12 +688,12 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_Layout_Engine {
// Replace all placeholders.
$l_obj_template->replace(
array(
'label-excerpts' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_IN_EXCERPT, __( 'Process footnotes in excerpts:', 'footnotes' ) ),
'excerpts' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_IN_EXCERPT, $l_arr_excerpt_mode ),
'notice-excerpts' => __( 'If the_excerpt is enabled.', 'footnotes' ),
// Translators: %s: link text 'Advanced Excerpt' linked to the plugins WordPress.org front page.
'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: Footnotes plugin logo.
'description-excerpts' => sprintf( __( 'To not display footnotes in excerpts, the %s plugin generates excerpts on the basis of the posts to be able to remove the footnotes. Else, footnotes may be processed in manual excerpts OR processed based on the posts. — For this setting to be effective, the hook the_excerpt must be enabled under Scope and priority.', 'footnotes' ), '<span style="font-style: normal;">' . MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME . '</span>' ),
'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' ), '<span style="font-style: normal;">' . MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME . '</span>' ),
)
);
// Display template with replaced placeholders.
@ -706,9 +707,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.
@ -732,7 +733,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 dont 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 ),
@ -741,7 +742,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 themes 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.
@ -759,7 +760,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 labels 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.
@ -767,10 +768,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 (optionA).', '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.
@ -809,7 +810,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&nbsp;UI nor jQuery&nbsp;Tools.', 'footnotes' ), '<span style="font-style: normal;">' . MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME . '</span>' ),
'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&nbsp;UI nor jQuery&nbsp;Tools.', 'footnotes' ), '<span style="font-style: normal;">' . MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME . '</span>' ),
)
);
@ -963,7 +964,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 ),
)
@ -1053,12 +1054,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 themes 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 themes 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 ),
@ -1067,7 +1068,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 themes 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 ),
@ -1076,7 +1077,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 themes 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' ) ),
)
);
@ -1103,7 +1104,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
@ -1139,10 +1139,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() {
@ -1157,7 +1156,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)),.
@ -1244,8 +1243,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
@ -1253,8 +1252,8 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_Layout_Engine {
* 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
* @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.
@ -1327,19 +1326,19 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_Layout_Engine {
$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'] .
'Sed ut perspiciatis, unde omnis iste natus error ' .
'sit voluptatem accusantium doloremque laudantium, ' .
'totam rem aperiam eaque ipsa, quae ab illo ' .
'inventore veritatis et quasi architecto beatae ' .
'vitae dicta sunt, explicabo. Nemo enim ipsam ' .
'voluptatem, quia voluptas sit, aspernatur aut ' .
'odit aut fugit, sed quia consequuntur magni ' .
'dolores eos, qui ratione voluptatem sequi nesciunt, ' .
'neque porro quisquam est, qui dolorem ipsum, quia ' .
'dolor sit amet, consectetur, adipisci velit, sed ' .
'quia non numquam eius modi tempora incidunt, ut ' .
'labore et dolore magnam aliquam quaerat voluptatem.' .
$l_arr_footnote_ending_tag['value'] . ' World!';
'Sed ut perspiciatis, unde omnis iste natus error ' .
'sit voluptatem accusantium doloremque laudantium, ' .
'totam rem aperiam eaque ipsa, quae ab illo ' .
'inventore veritatis et quasi architecto beatae ' .
'vitae dicta sunt, explicabo. Nemo enim ipsam ' .
'voluptatem, quia voluptas sit, aspernatur aut ' .
'odit aut fugit, sed quia consequuntur magni ' .
'dolores eos, qui ratione voluptatem sequi nesciunt, ' .
'neque porro quisquam est, qui dolorem ipsum, quia ' .
'dolor sit amet, consectetur, adipisci velit, sed ' .
'quia non numquam eius modi tempora incidunt, ut ' .
'labore et dolore magnam aliquam quaerat voluptatem.' .
$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' );
@ -1348,7 +1347,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' => '<br/>' . __( 'will be displayed as:', 'footnotes' ),

View file

@ -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';
@ -149,7 +147,6 @@ class MCI_Footnotes_Settings {
* - as in English or US American typesetting;
* - for better UX thanks to a more button-like appearance;
* - for stylistic consistency with the expand-collapse button.
*
*/
const C_STR_FOOTNOTES_STYLING_BEFORE = 'footnote_inputfield_custom_styling_before';
@ -291,11 +288,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';
@ -425,7 +420,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';
@ -439,7 +433,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
@ -458,7 +451,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';
@ -472,7 +464,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';
@ -509,7 +500,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';
@ -529,7 +519,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.
@ -538,7 +527,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.
*
@ -546,7 +534,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
@ -576,16 +563,14 @@ 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';
const C_INT_EXPERT_LOOKUP_THE_TITLE_PRIORITY_LEVEL = 'footnote_inputfield_expert_lookup_the_title_priority_level';
/**
* 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';
@ -594,19 +579,17 @@ 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';
const C_INT_EXPERT_LOOKUP_WIDGET_TEXT_PRIORITY_LEVEL = 'footnote_inputfield_expert_lookup_widget_text_priority_level';
/**
* 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';
const C_INT_EXPERT_LOOKUP_THE_EXCERPT_PRIORITY_LEVEL = 'footnote_inputfield_expert_lookup_the_excerpt_priority_level';
/**
* Settings container key for the link element option.
@ -635,7 +618,7 @@ class MCI_Footnotes_Settings {
* Backlink separators and terminators are often not preferred.
* But a choice must be provided along with the ability to customize.
*/
const C_STR_BACKLINKS_SEPARATOR_ENABLED = 'footnotes_inputfield_backlinks_separator_enabled';
const C_STR_BACKLINKS_SEPARATOR_ENABLED = 'footnotes_inputfield_backlinks_separator_enabled';
/**
* Settings container key for the backlink separator options.
@ -643,7 +626,7 @@ class MCI_Footnotes_Settings {
* @since 2.1.4
* @var str
*/
const C_STR_BACKLINKS_SEPARATOR_OPTION = 'footnotes_inputfield_backlinks_separator_option';
const C_STR_BACKLINKS_SEPARATOR_OPTION = 'footnotes_inputfield_backlinks_separator_option';
/**
* Settings container key for a custom backlink separator.
@ -651,7 +634,7 @@ class MCI_Footnotes_Settings {
* @since 2.1.4
* @var str
*/
const C_STR_BACKLINKS_SEPARATOR_CUSTOM = 'footnotes_inputfield_backlinks_separator_custom';
const C_STR_BACKLINKS_SEPARATOR_CUSTOM = 'footnotes_inputfield_backlinks_separator_custom';
/**
* Settings container key to enable the presence of a backlink terminator.
@ -667,7 +650,7 @@ class MCI_Footnotes_Settings {
* @since 2.1.4
* @var str
*/
const C_STR_BACKLINKS_TERMINATOR_OPTION = 'footnotes_inputfield_backlinks_terminator_option';
const C_STR_BACKLINKS_TERMINATOR_OPTION = 'footnotes_inputfield_backlinks_terminator_option';
/**
* Settings container key for a custom backlink terminator.
@ -675,7 +658,7 @@ class MCI_Footnotes_Settings {
* @since 2.1.4
* @var str
*/
const C_STR_BACKLINKS_TERMINATOR_CUSTOM = 'footnotes_inputfield_backlinks_terminator_custom';
const C_STR_BACKLINKS_TERMINATOR_CUSTOM = 'footnotes_inputfield_backlinks_terminator_custom';
/**
* Settings container key to enable the backlinks column width.
@ -683,7 +666,7 @@ class MCI_Footnotes_Settings {
* @since 2.1.4
* @var str
*/
const C_STR_BACKLINKS_COLUMN_WIDTH_ENABLED = 'footnotes_inputfield_backlinks_column_width_enabled';
const C_STR_BACKLINKS_COLUMN_WIDTH_ENABLED = 'footnotes_inputfield_backlinks_column_width_enabled';
/**
* Settings container key for the backlinks column width scalar.
@ -691,7 +674,7 @@ class MCI_Footnotes_Settings {
* @since 2.1.4
* @var int
*/
const C_INT_BACKLINKS_COLUMN_WIDTH_SCALAR = 'footnotes_inputfield_backlinks_column_width_scalar';
const C_INT_BACKLINKS_COLUMN_WIDTH_SCALAR = 'footnotes_inputfield_backlinks_column_width_scalar';
/**
* Settings container key for the backlinks column width unit.
@ -699,7 +682,7 @@ class MCI_Footnotes_Settings {
* @since 2.1.4
* @var str
*/
const C_STR_BACKLINKS_COLUMN_WIDTH_UNIT = 'footnotes_inputfield_backlinks_column_width_unit';
const C_STR_BACKLINKS_COLUMN_WIDTH_UNIT = 'footnotes_inputfield_backlinks_column_width_unit';
/**
* Settings container key to enable a max width for the backlinks column.
@ -715,7 +698,7 @@ class MCI_Footnotes_Settings {
* @since 2.1.4
* @var int
*/
const C_INT_BACKLINKS_COLUMN_MAX_WIDTH_SCALAR = 'footnotes_inputfield_backlinks_column_max_width_scalar';
const C_INT_BACKLINKS_COLUMN_MAX_WIDTH_SCALAR = 'footnotes_inputfield_backlinks_column_max_width_scalar';
/**
* Settings container key for the backlinks column max width unit.
@ -723,7 +706,7 @@ class MCI_Footnotes_Settings {
* @since 2.1.4
* @var str
*/
const C_STR_BACKLINKS_COLUMN_MAX_WIDTH_UNIT = 'footnotes_inputfield_backlinks_column_max_width_unit';
const C_STR_BACKLINKS_COLUMN_MAX_WIDTH_UNIT = 'footnotes_inputfield_backlinks_column_max_width_unit';
/**
* Settings container key to enable line breaks between backlinks.
@ -732,13 +715,12 @@ class MCI_Footnotes_Settings {
* @var str
* Whether a <br /> tag is inserted.
*/
const C_STR_BACKLINKS_LINE_BREAKS_ENABLED = 'footnotes_inputfield_backlinks_line_breaks_enabled';
const C_STR_BACKLINKS_LINE_BREAKS_ENABLED = 'footnotes_inputfield_backlinks_line_breaks_enabled';
/**
* 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;
@ -753,7 +735,7 @@ class MCI_Footnotes_Settings {
* @since 2.1.4
* @var flo
*/
const C_FLO_MOUSE_OVER_BOX_FONT_SIZE_SCALAR = 'footnotes_inputfield_mouse_over_box_font_size_scalar';
const C_FLO_MOUSE_OVER_BOX_FONT_SIZE_SCALAR = 'footnotes_inputfield_mouse_over_box_font_size_scalar';
/**
* Settings container key for the unit of the tooltip font size.
@ -761,7 +743,7 @@ class MCI_Footnotes_Settings {
* @since 2.1.4
* @var str
*/
const C_STR_MOUSE_OVER_BOX_FONT_SIZE_UNIT = 'footnotes_inputfield_mouse_over_box_font_size_unit';
const C_STR_MOUSE_OVER_BOX_FONT_SIZE_UNIT = 'footnotes_inputfield_mouse_over_box_font_size_unit';
/**
* Settings container key for basic responsive page layout support options.
@ -778,10 +760,9 @@ 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';
const C_INT_FOOTNOTES_SCROLL_OFFSET = 'footnotes_inputfield_scroll_offset';
/**
* Settings container key for scroll duration.
@ -789,7 +770,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';
@ -798,34 +778,30 @@ 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';
const C_INT_MOUSE_OVER_BOX_FADE_IN_DELAY = 'footnotes_inputfield_mouse_over_box_fade_in_delay';
/**
* 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';
const C_INT_MOUSE_OVER_BOX_FADE_IN_DURATION = 'footnotes_inputfield_mouse_over_box_fade_in_duration';
/**
* 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';
const C_INT_MOUSE_OVER_BOX_FADE_OUT_DELAY = 'footnotes_inputfield_mouse_over_box_fade_out_delay';
/**
* 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';
@ -837,7 +813,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';
@ -851,7 +826,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';
@ -862,7 +836,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';
@ -871,13 +844,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.
@ -888,7 +859,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.
@ -899,7 +869,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';
@ -908,7 +877,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';
@ -917,10 +885,9 @@ 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';
const C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_WIDTH = 'footnotes_inputfield_alternative_mouse_over_box_width';
/**
@ -932,10 +899,9 @@ 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';
const C_STR_REFERENCE_CONTAINER_LABEL_ELEMENT = 'footnotes_inputfield_reference_container_label_element';
/**
* Settings container key to enable the reference container label bottom border.
@ -946,7 +912,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';
@ -960,7 +925,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';
@ -974,10 +938,9 @@ 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';
const C_INT_REFERENCE_CONTAINER_TOP_MARGIN = 'footnotes_inputfield_reference_container_top_margin';
/**
* Settings container key for reference container bottom margin.
@ -988,7 +951,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';
@ -1005,45 +967,40 @@ 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.
*/
const C_STR_FOOTNOTES_HARD_LINKS_ENABLE = 'footnotes_inputfield_hard_links_enable';
const C_STR_FOOTNOTES_HARD_LINKS_ENABLE = 'footnotes_inputfield_hard_links_enable';
/**
* 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';
const C_STR_REFERRER_FRAGMENT_ID_SLUG = 'footnotes_inputfield_referrer_fragment_id_slug';
/**
* 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';
const C_STR_FOOTNOTE_FRAGMENT_ID_SLUG = 'footnotes_inputfield_footnote_fragment_id_slug';
/**
* 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';
const C_STR_HARD_LINK_IDS_SEPARATOR = 'footnotes_inputfield_hard_link_ids_separator';
/**
* 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';
@ -1264,7 +1221,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.
*/
@ -1286,36 +1243,36 @@ class MCI_Footnotes_Settings {
private $a_arr_default = array(
// General settings.
'footnotes_storage' => array(
'footnotes_storage' => array(
// AMP compatibility.
self::C_STR_FOOTNOTES_AMP_COMPATIBILITY_ENABLE => '',
self::C_STR_FOOTNOTES_AMP_COMPATIBILITY_ENABLE => '',
// Footnote start and end short codes.
self::C_STR_FOOTNOTES_SHORT_CODE_START => '((',
self::C_STR_FOOTNOTES_SHORT_CODE_END => '))',
self::C_STR_FOOTNOTES_SHORT_CODE_START_USER_DEFINED => '',
self::C_STR_FOOTNOTES_SHORT_CODE_END_USER_DEFINED => '',
self::C_STR_FOOTNOTE_SHORTCODE_SYNTAX_VALIDATION_ENABLE => 'yes',
self::C_STR_FOOTNOTES_SHORT_CODE_START => '((',
self::C_STR_FOOTNOTES_SHORT_CODE_END => '))',
self::C_STR_FOOTNOTES_SHORT_CODE_START_USER_DEFINED => '',
self::C_STR_FOOTNOTES_SHORT_CODE_END_USER_DEFINED => '',
self::C_STR_FOOTNOTE_SHORTCODE_SYNTAX_VALIDATION_ENABLE => 'yes',
// Footnotes numbering.
self::C_STR_FOOTNOTES_COUNTER_STYLE => 'arabic_plain',
self::C_STR_COMBINE_IDENTICAL_FOOTNOTES => 'yes',
self::C_STR_FOOTNOTES_COUNTER_STYLE => 'arabic_plain',
self::C_STR_COMBINE_IDENTICAL_FOOTNOTES => 'yes',
// Scrolling behavior.
self::C_STR_FOOTNOTES_CSS_SMOOTH_SCROLLING => 'no',
self::C_INT_FOOTNOTES_SCROLL_OFFSET => 20,
self::C_INT_FOOTNOTES_SCROLL_DURATION => 380,
self::C_STR_FOOTNOTES_SCROLL_DURATION_ASYMMETRICITY => 'no',
self::C_INT_FOOTNOTES_SCROLL_DOWN_DURATION => 150,
self::C_INT_FOOTNOTES_SCROLL_DOWN_DELAY => 0,
self::C_INT_FOOTNOTES_SCROLL_UP_DELAY => 0,
self::C_STR_FOOTNOTES_HARD_LINKS_ENABLE => 'no',
self::C_STR_REFERRER_FRAGMENT_ID_SLUG => 'r',
self::C_STR_FOOTNOTE_FRAGMENT_ID_SLUG => 'f',
self::C_STR_HARD_LINK_IDS_SEPARATOR => '+',
self::C_STR_FOOTNOTES_BACKLINK_TOOLTIP_ENABLE => 'yes',
self::C_STR_FOOTNOTES_BACKLINK_TOOLTIP_TEXT => 'Alt+ ←',
self::C_STR_FOOTNOTES_CSS_SMOOTH_SCROLLING => 'no',
self::C_INT_FOOTNOTES_SCROLL_OFFSET => 20,
self::C_INT_FOOTNOTES_SCROLL_DURATION => 380,
self::C_STR_FOOTNOTES_SCROLL_DURATION_ASYMMETRICITY => 'no',
self::C_INT_FOOTNOTES_SCROLL_DOWN_DURATION => 150,
self::C_INT_FOOTNOTES_SCROLL_DOWN_DELAY => 0,
self::C_INT_FOOTNOTES_SCROLL_UP_DELAY => 0,
self::C_STR_FOOTNOTES_HARD_LINKS_ENABLE => 'no',
self::C_STR_REFERRER_FRAGMENT_ID_SLUG => 'r',
self::C_STR_FOOTNOTE_FRAGMENT_ID_SLUG => 'f',
self::C_STR_HARD_LINK_IDS_SEPARATOR => '+',
self::C_STR_FOOTNOTES_BACKLINK_TOOLTIP_ENABLE => 'yes',
self::C_STR_FOOTNOTES_BACKLINK_TOOLTIP_TEXT => 'Alt+ ←',
// Reference container.
self::C_STR_REFERENCE_CONTAINER_NAME => 'References',
@ -1359,107 +1316,107 @@ class MCI_Footnotes_Settings {
self::C_STR_FOOTNOTES_IN_EXCERPT => 'manual',
// Footnotes love.
self::C_STR_FOOTNOTES_LOVE => 'no',
self::C_STR_FOOTNOTES_LOVE => 'no',
// Deprecated.
self::C_STR_FOOTNOTES_EXPERT_MODE => 'yes',
self::C_STR_FOOTNOTES_EXPERT_MODE => 'yes',
),
// Referrers and tooltips.
'footnotes_storage_custom' => array(
'footnotes_storage_custom' => array(
// Backlink symbol.
self::C_STR_HYPERLINK_ARROW => '&#8593;',
self::C_STR_HYPERLINK_ARROW_USER_DEFINED => '',
self::C_STR_HYPERLINK_ARROW => '&#8593;',
self::C_STR_HYPERLINK_ARROW_USER_DEFINED => '',
// Referrers.
self::C_STR_FOOTNOTES_REFERRER_SUPERSCRIPT_TAGS => 'yes',
self::C_STR_FOOTNOTE_REFERRERS_NORMAL_SUPERSCRIPT => 'no',
self::C_STR_FOOTNOTES_STYLING_BEFORE => '[',
self::C_STR_FOOTNOTES_STYLING_AFTER => ']',
self::C_STR_FOOTNOTES_REFERRER_SUPERSCRIPT_TAGS => 'yes',
self::C_STR_FOOTNOTE_REFERRERS_NORMAL_SUPERSCRIPT => 'no',
self::C_STR_FOOTNOTES_STYLING_BEFORE => '[',
self::C_STR_FOOTNOTES_STYLING_AFTER => ']',
// Referrers in labels.
self::C_STR_FOOTNOTES_LABEL_ISSUE_SOLUTION => 'none',
self::C_STR_FOOTNOTES_LABEL_ISSUE_SOLUTION => 'none',
// Tooltips.
self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_ENABLED => 'yes',
self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_ALTERNATIVE => 'no',
self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_ENABLED => 'yes',
self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_ALTERNATIVE => 'no',
// Tooltip position.
self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_POSITION => 'top center',
self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_POSITION => 'top center',
self::C_STR_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_POSITION => 'top right',
self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_X => 0,
self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_X => 0,
self::C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_OFFSET_X => -50,
self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_Y => -7,
self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_Y => -7,
self::C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_OFFSET_Y => 24,
// Tooltip dimensions.
self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_MAX_WIDTH => 450,
self::C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_WIDTH => 400,
self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_MAX_WIDTH => 450,
self::C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_WIDTH => 400,
// Tooltip timing.
self::C_INT_MOUSE_OVER_BOX_FADE_IN_DELAY => 0,
self::C_INT_MOUSE_OVER_BOX_FADE_IN_DURATION => 200,
self::C_INT_MOUSE_OVER_BOX_FADE_OUT_DELAY => 400,
self::C_INT_MOUSE_OVER_BOX_FADE_OUT_DURATION => 200,
self::C_INT_MOUSE_OVER_BOX_FADE_IN_DELAY => 0,
self::C_INT_MOUSE_OVER_BOX_FADE_IN_DURATION => 200,
self::C_INT_MOUSE_OVER_BOX_FADE_OUT_DELAY => 400,
self::C_INT_MOUSE_OVER_BOX_FADE_OUT_DURATION => 200,
// Tooltip truncation.
self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_ENABLED => 'yes',
self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_LENGTH => 200,
self::C_STR_FOOTNOTES_TOOLTIP_READON_LABEL => 'Continue reading',
self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_ENABLED => 'yes',
self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_LENGTH => 200,
self::C_STR_FOOTNOTES_TOOLTIP_READON_LABEL => 'Continue reading',
// Tooltip text.
self::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_DELIMITER => '[[/tooltip]]',
self::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_ENABLE => 'no',
self::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_SEPARATOR => ' — ',
self::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_DELIMITER => '[[/tooltip]]',
self::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_ENABLE => 'no',
self::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_SEPARATOR => ' — ',
// Tooltip appearance.
self::C_STR_MOUSE_OVER_BOX_FONT_SIZE_ENABLED => 'yes',
self::C_FLO_MOUSE_OVER_BOX_FONT_SIZE_SCALAR => 13,
self::C_STR_MOUSE_OVER_BOX_FONT_SIZE_UNIT => 'px',
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 => '#000000',
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_RADIUS => 0,
self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_SHADOW_COLOR => '#666666',
self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_COLOR => '#000000',
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_RADIUS => 0,
self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_SHADOW_COLOR => '#666666',
// Your existing Custom CSS code.
self::C_STR_CUSTOM_CSS => '',
self::C_STR_CUSTOM_CSS => '',
),
// Scope and priority
'footnotes_storage_expert' => array(
// Scope and priority.
'footnotes_storage_expert' => array(
// WordPress hooks with priority level.
self::C_STR_EXPERT_LOOKUP_THE_TITLE => '',
self::C_INT_EXPERT_LOOKUP_THE_TITLE_PRIORITY_LEVEL => PHP_INT_MAX,
self::C_STR_EXPERT_LOOKUP_THE_TITLE => '',
self::C_INT_EXPERT_LOOKUP_THE_TITLE_PRIORITY_LEVEL => PHP_INT_MAX,
self::C_STR_EXPERT_LOOKUP_THE_CONTENT => 'checked',
self::C_INT_EXPERT_LOOKUP_THE_CONTENT_PRIORITY_LEVEL => 98,
self::C_STR_EXPERT_LOOKUP_THE_CONTENT => 'checked',
self::C_INT_EXPERT_LOOKUP_THE_CONTENT_PRIORITY_LEVEL => 98,
self::C_STR_EXPERT_LOOKUP_THE_EXCERPT => '',
self::C_INT_EXPERT_LOOKUP_THE_EXCERPT_PRIORITY_LEVEL => PHP_INT_MAX,
self::C_STR_EXPERT_LOOKUP_THE_EXCERPT => '',
self::C_INT_EXPERT_LOOKUP_THE_EXCERPT_PRIORITY_LEVEL => PHP_INT_MAX,
self::C_STR_EXPERT_LOOKUP_WIDGET_TITLE => '',
self::C_INT_EXPERT_LOOKUP_WIDGET_TITLE_PRIORITY_LEVEL => PHP_INT_MAX,
self::C_STR_EXPERT_LOOKUP_WIDGET_TITLE => '',
self::C_INT_EXPERT_LOOKUP_WIDGET_TITLE_PRIORITY_LEVEL => PHP_INT_MAX,
self::C_STR_EXPERT_LOOKUP_WIDGET_TEXT => '',
self::C_INT_EXPERT_LOOKUP_WIDGET_TEXT_PRIORITY_LEVEL => 98,
self::C_STR_EXPERT_LOOKUP_WIDGET_TEXT => '',
self::C_INT_EXPERT_LOOKUP_WIDGET_TEXT_PRIORITY_LEVEL => 98,
),
// Custom CSS.
'footnotes_storage_custom_css' => array(
'footnotes_storage_custom_css' => array(
// Your existing Custom CSS code.
self::C_STR_CUSTOM_CSS_LEGACY_ENABLE => 'yes',
self::C_STR_CUSTOM_CSS_LEGACY_ENABLE => 'yes',
// Custom CSS.
self::C_STR_CUSTOM_CSS_NEW => '',
self::C_STR_CUSTOM_CSS_NEW => '',
),
@ -1606,7 +1563,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.

View file

@ -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 plugins 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 plugins 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 );
}
@ -570,7 +557,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
*/
@ -626,7 +612,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.
@ -684,8 +669,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 );
@ -701,7 +685,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
@ -797,7 +780,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 ) ) ) {
@ -864,12 +846,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 ) {
@ -877,6 +857,7 @@ class MCI_Footnotes_Task {
* Dimensions of jQuery tooltips.
*
* Position and timing of jQuery tooltips are script defined.
*
* @see templates/public/tooltip.html.
*/
$l_int_max_width = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_MAX_WIDTH );
@ -886,7 +867,6 @@ class MCI_Footnotes_Task {
echo "}\r\n";
} else {
/*
* AMP compatible and alternative tooltips.
*/
@ -944,6 +924,7 @@ class MCI_Footnotes_Task {
* AMP compatible tooltips.
*
* To streamline internal CSS, immutable rules are in external stylesheet.
*
* @see dev-amp-tooltips.css.
*/
if ( MCI_Footnotes::$a_bool_amp_enabled ) {
@ -958,12 +939,13 @@ class MCI_Footnotes_Task {
echo 'transition-duration: ' . $l_int_fade_in_duration . 'ms;';
echo "}\r\n";
/**
* Alternative tooltips.
*
* To streamline internal CSS, immutable rules are in external stylesheet.
* @see dev-tooltips-alternative.css.
*/
/**
* Alternative tooltips.
*
* To streamline internal CSS, immutable rules are in external stylesheet.
*
* @see dev-tooltips-alternative.css.
*/
} else {
echo '.footnote_tooltip.hidden {';
@ -985,7 +967,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 its set to disappear after dashboard tab migration.
@ -1025,7 +1006,8 @@ class MCI_Footnotes_Task {
document.getElementById(footnote_tooltip_id).classList.add('hidden');
}
</script>
<?php // Indenting this PHP open tag would mess up the page source.
<?php
// Indenting this PHP open tag would mess up the page source.
// End internal script.
};
}
@ -1035,7 +1017,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 ) ) {
@ -1092,7 +1073,7 @@ class MCI_Footnotes_Task {
* Replaces footnotes in the post/page title.
*
* @since 1.5.0
* @param string $p_str_content Title.
* @param string $p_str_content Title.
* @return string $p_str_content Title with replaced footnotes.
*/
public function footnotes_in_title( $p_str_content ) {
@ -1111,7 +1092,7 @@ class MCI_Footnotes_Task {
* @link https://wordpress.org/support/topic/multiple-reference-containers-in-single-post/
*
* @since 2.7.0
* @param string $p_str_content Page/Post content.
* @param string $p_str_content Page/Post content.
* @return string $p_str_content Content with replaced footnotes.
*/
public function footnotes_in_content( $p_str_content ) {
@ -1154,7 +1135,7 @@ class MCI_Footnotes_Task {
* Processes existing excerpt or replaces it with a new one generated on the basis of the post.
*
* @since 1.5.0
* @param string $p_str_excerpt Excerpt content.
* @param string $p_str_excerpt Excerpt content.
* @return string $p_str_excerpt Processed or new excerpt.
* @since 2.6.2 Debug No option.
* @since 2.6.3 Debug Yes option, the setting becomes fully effective.
@ -1199,7 +1180,7 @@ class MCI_Footnotes_Task {
* @link https://wordpress.org/support/topic/problem-with-footnotes-in-excerpts-of-the-blog-page/
*
* @since 2.6.2
* @param string $p_str_content The post.
* @param string $p_str_content The post.
* @return string $p_str_content An excerpt of the post.
* Applies full WordPress excerpt processing.
* @link https://developer.wordpress.org/reference/functions/wp_trim_excerpt/
@ -1208,7 +1189,7 @@ class MCI_Footnotes_Task {
public function generate_excerpt( $p_str_content ) {
// Discard existing excerpt and start on the basis of the post.
$p_str_content = get_the_content( get_the_id() );
$p_str_content = get_the_content( get_the_id() );
// Get footnote delimiter shortcodes and unify them.
$p_str_content = self::unify_delimiters( $p_str_content );
@ -1228,7 +1209,7 @@ class MCI_Footnotes_Task {
$l_int_excerpt_length = (int) _x( '55', 'excerpt_length' );
$l_int_excerpt_length = (int) apply_filters( 'excerpt_length', $l_int_excerpt_length );
$l_str_excerpt_more = apply_filters( 'excerpt_more', ' ' . '[&hellip;]' );
$l_str_excerpt_more = apply_filters( 'excerpt_more', ' [&hellip;]' );
// Function wp_trim_words() calls wp_strip_all_tags() that wrecks the footnotes.
$p_str_content = wp_trim_words( $p_str_content, $l_int_excerpt_length, $l_str_excerpt_more );
@ -1262,7 +1243,7 @@ class MCI_Footnotes_Task {
* @link https://wordpress.org/support/topic/update-crashed-my-website-3/#post-14259396
*
* @since 2.6.4
* @param string $p_str_content The post.
* @param string $p_str_content The post.
* @return string $p_str_content An excerpt of the post.
* Does not apply full WordPress excerpt processing.
* @see self::generate_excerpt()
@ -1272,7 +1253,7 @@ class MCI_Footnotes_Task {
public function generate_excerpt_with_footnotes( $p_str_content ) {
// Discard existing excerpt and start on the basis of the post.
$p_str_content = get_the_content( get_the_id() );
$p_str_content = get_the_content( get_the_id() );
// Get footnote delimiter shortcodes and unify them.
$p_str_content = self::unify_delimiters( $p_str_content );
@ -1289,7 +1270,7 @@ class MCI_Footnotes_Task {
$l_int_excerpt_length = (int) apply_filters( 'excerpt_length', $l_int_excerpt_length );
// Prepare the Read-on string.
$l_str_excerpt_more = apply_filters( 'excerpt_more', ' ' . '[&hellip;]' );
$l_str_excerpt_more = apply_filters( 'excerpt_more', ' [&hellip;]' );
// Safeguard the footnotes.
preg_match_all(
@ -1300,7 +1281,7 @@ class MCI_Footnotes_Task {
// Prevent the footnotes from altering the excerpt: previously hard-coded '5ED84D6'.
$l_int_placeholder = '@' . mt_rand( 100000000, 2147483647 ) . '@';
$p_str_content = preg_replace(
$p_str_content = preg_replace(
'#' . self::$a_str_start_tag_regex . '.+?' . self::$a_str_end_tag_regex . '#',
$l_int_placeholder,
$p_str_content
@ -1308,16 +1289,16 @@ class MCI_Footnotes_Task {
// Replace line breaking markup with a separator.
$l_str_separator = ' ';
$p_str_content = preg_replace( '#<br *>#', $l_str_separator, $p_str_content );
$p_str_content = preg_replace( '#<br */>#', $l_str_separator, $p_str_content );
$p_str_content = preg_replace( '#<(p|li|div)[^>]*>#', $l_str_separator, $p_str_content );
$p_str_content = preg_replace( '#' . $l_str_separator . '#', '', $p_str_content, 1 );
$p_str_content = preg_replace( '#</(p|li|div) *>#', '', $p_str_content );
$p_str_content = preg_replace( '#[\r\n]#', '', $p_str_content );
$p_str_content = preg_replace( '#<br *>#', $l_str_separator, $p_str_content );
$p_str_content = preg_replace( '#<br */>#', $l_str_separator, $p_str_content );
$p_str_content = preg_replace( '#<(p|li|div)[^>]*>#', $l_str_separator, $p_str_content );
$p_str_content = preg_replace( '#' . $l_str_separator . '#', '', $p_str_content, 1 );
$p_str_content = preg_replace( '#</(p|li|div) *>#', '', $p_str_content );
$p_str_content = preg_replace( '#[\r\n]#', '', $p_str_content );
// To count words like Advanced Excerpt does it.
$l_arr_tokens = array();
$l_str_output = '';
$l_arr_tokens = array();
$l_str_output = '';
$l_int_counter = 0;
// Tokenize into tags and words as in Advanced Excerpt.
@ -1366,7 +1347,7 @@ class MCI_Footnotes_Task {
* Replaces footnotes in the widget title.
*
* @since 1.5.0
* @param string $p_str_content Widget content.
* @param string $p_str_content Widget content.
* @return string $p_str_content Content with replaced footnotes.
*/
public function footnotes_in_widget_title( $p_str_content ) {
@ -1378,7 +1359,7 @@ class MCI_Footnotes_Task {
* Replaces footnotes in the content of the current widget.
*
* @since 1.5.0
* @param string $p_str_content Widget content.
* @param string $p_str_content Widget content.
* @return string $p_str_content Content with replaced footnotes.
*/
public function footnotes_in_widget_text( $p_str_content ) {
@ -1411,7 +1392,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.
*
@ -1419,7 +1399,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 );
@ -1458,6 +1437,8 @@ class MCI_Footnotes_Task {
/**
* Brings the delimiters and unifies their various HTML escapement schemas.
*
* @param string $p_str_content TODO.
*
* - Bugfix: Footnote delimiter short codes: fix numbering bug by cross-editor HTML escapement schema unification, thanks to @patrick_here @alifarahani8000 @gova bug reports.
*
* @reporter @patrick_here
@ -1492,27 +1473,27 @@ class MCI_Footnotes_Task {
if ( preg_match( '#[&"\'<>]#', $l_str_starting_tag . $l_str_ending_tag ) ) {
$l_str_harmonized_start_tag = '{[(|fnote_stt|)]}';
$l_str_harmonized_end_tag = '{[(|fnote_end|)]}';
$l_str_harmonized_start_tag = '{[(|fnote_stt|)]}';
$l_str_harmonized_end_tag = '{[(|fnote_end|)]}';
// Harmonize footnotes without escaping any HTML special characters in delimiter shortcodes.
// The footnote has been added in the Block Editor code editor (doesnt work in Classic Editor text mode).
$p_str_content = str_replace( $l_str_starting_tag, $l_str_harmonized_start_tag, $p_str_content );
$p_str_content = str_replace( $l_str_ending_tag , $l_str_harmonized_end_tag , $p_str_content );
$p_str_content = str_replace( $l_str_ending_tag, $l_str_harmonized_end_tag, $p_str_content );
// Harmonize footnotes while escaping HTML special characters in delimiter shortcodes.
// The footnote has been added in the Classic Editor visual mode.
$p_str_content = str_replace( htmlspecialchars( $l_str_starting_tag ), $l_str_harmonized_start_tag, $p_str_content );
$p_str_content = str_replace( htmlspecialchars( $l_str_ending_tag ), $l_str_harmonized_end_tag , $p_str_content );
$p_str_content = str_replace( htmlspecialchars( $l_str_ending_tag ), $l_str_harmonized_end_tag, $p_str_content );
// Harmonize footnotes while escaping HTML special characters except greater-than sign in delimiter shortcodes.
// The footnote has been added in the Block Editor visual mode.
$p_str_content = str_replace( str_replace( '&gt;', '>', htmlspecialchars( $l_str_starting_tag ) ), $l_str_harmonized_start_tag, $p_str_content );
$p_str_content = str_replace( str_replace( '&gt;', '>', htmlspecialchars( $l_str_ending_tag ) ), $l_str_harmonized_end_tag , $p_str_content );
$p_str_content = str_replace( str_replace( '&gt;', '>', htmlspecialchars( $l_str_ending_tag ) ), $l_str_harmonized_end_tag, $p_str_content );
// Assign the delimiter shortcodes.
self::$a_str_start_tag = $l_str_harmonized_start_tag;
self::$a_str_end_tag = $l_str_harmonized_end_tag;
self::$a_str_start_tag = $l_str_harmonized_start_tag;
self::$a_str_end_tag = $l_str_harmonized_end_tag;
// Assign the regex-conformant shortcodes.
self::$a_str_start_tag_regex = '\{\[\(\|fnote_stt\|\)\]\}';
@ -1521,8 +1502,8 @@ class MCI_Footnotes_Task {
} else {
// Assign the delimiter shortcodes.
self::$a_str_start_tag = $l_str_starting_tag;
self::$a_str_end_tag = $l_str_ending_tag;
self::$a_str_start_tag = $l_str_starting_tag;
self::$a_str_end_tag = $l_str_ending_tag;
// Make shortcodes conform to regex syntax.
self::$a_str_start_tag_regex = preg_replace( '#([\(\)\{\}\[\]\|\*\.\?\!])#', '\\\\$1', self::$a_str_start_tag );
@ -1576,7 +1557,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.
*/
@ -1688,12 +1668,12 @@ class MCI_Footnotes_Task {
*/
if ( 'disconnect' === $l_str_label_issue_solution ) {
$l_str_disconnect_text = 'optionally-disconnected-from-input-field-to-prevent-toggling-while-clicking-footnote-referrer_';
$l_str_disconnect_text = 'optionally-disconnected-from-input-field-to-prevent-toggling-while-clicking-footnote-referrer_';
$p_str_content = preg_replace(
'#(<label [^>]+?for=["\'])(((?!</label).)+' . self::$a_str_start_tag_regex . ')#',
'$1' . $l_str_disconnect_text . '$2',
$p_str_content
'$1' . $l_str_disconnect_text . '$2',
$p_str_content
);
}
@ -1755,13 +1735,12 @@ class MCI_Footnotes_Task {
// Load 'templates/public/amp-footnote.html'.
$l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_PUBLIC, 'amp-footnote' );
}
} elseif ( MCI_Footnotes::$a_bool_alternative_tooltips_enabled ) {
// Load 'templates/public/footnote-alternative.html'.
$l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_PUBLIC, 'footnote-alternative' );
// Else jQuery tooltips are enabled.
// Else jQuery tooltips are enabled.
} else {
// Load 'templates/public/footnote.html'.
@ -1770,7 +1749,6 @@ class MCI_Footnotes_Task {
// Load tooltip inline script.
$l_obj_template_tooltip = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_PUBLIC, 'tooltip' );
}
}
// Search footnotes short codes in the content.
@ -1835,13 +1813,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.
*
@ -1856,23 +1832,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
@ -1894,38 +1867,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: '(?<!\w=)'
* Correct is duplicating the negative lookbehind w/o quotes: '(?<!\w=)'
*
* - 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.
*
* @since 2.2.9
* @date 2020-12-24T1956+0100
* @link https://stackoverflow.com/questions/814700/http-url-allowed-characters-in-parameter-names
* @date 2020-12-25T1251+0100
*
* @link https://stackoverflow.com/questions/814700/http-url-allowed-characters-in-parameter-names
*
* - Bugfix: Reference container, tooltips: URL wrap: support also file transfer protocol URLs.
*
* @since 2.2.10
* @date 2020-12-25T2220+0100
*
*
* - Bugfix: Reference container, tooltips: URL wrap: exclude URL pattern as folder name in Wayback Machine URL, thanks to @rumperuu bug report.
*
* @reporter @rumperuu
* @link https://wordpress.org/support/topic/line-wrap-href-regex-bug/
*
* @since 2.5.3
* @date 2021-01-24
* By adding a 3rd negative lookbehind: '(?<!/)'.
* By adding a 3rd negative lookbehind: '(?<!/)'.
*
* - Bugfix: Reference container, tooltips: URL wrap: account for leading space in value, thanks to @karolszakiel example provision.
*
@ -1987,7 +1954,6 @@ class MCI_Footnotes_Task {
* @link https://wordpress.org/support/topic/offset-x-axis-and-offset-y-axis-does-not-working/
*
* @since 2.1.0
* @date 2020-11-08T2146+0100
* If the tooltip truncation option is enabled, its 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
@ -2016,11 +1982,10 @@ class MCI_Footnotes_Task {
$l_str_excerpt_text .= self::$a_int_post_id . '_' . self::$a_int_reference_container_id;
$l_str_excerpt_text .= '.toggleClass(class=collapsed, force=false)"';
}
} else {
// Dont add onclick event in AMP compatibility mode.
// Reverted wrong linting 2021-03-20T0032+0100.
// Reverted wrong linting.
$l_str_excerpt_text .= ' onclick="footnote_moveToReference_' . 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;
@ -2049,7 +2014,6 @@ class MCI_Footnotes_Task {
* @link https://wordpress.org/support/topic/offset-x-axis-and-offset-y-axis-does-not-working/
*
* @since 2.1.0
* @date 2020-11-08T2146+0100
*/
$l_str_excerpt_text .= MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_READON_LABEL );
@ -2112,7 +2076,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 = '';
@ -2218,6 +2181,7 @@ class MCI_Footnotes_Task {
*
* - Bugfix: Fixed occasional bug where footnote ordering could be out of sequence
*
* @since 1.6.4
* @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
@ -2225,9 +2189,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 @aricuras latest class/task.php
*
* @since 1.6.4
* @date 2016-06-29T0054+0000
*
* - 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
@ -2345,7 +2306,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.
*/
@ -2416,7 +2376,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.
@ -2440,8 +2399,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.
@ -2473,7 +2431,6 @@ class MCI_Footnotes_Task {
}
}
}
} else {
// When combining identical footnotes is turned on, another template is needed.
@ -2510,7 +2467,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
@ -2519,7 +2475,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 ) );
@ -2609,7 +2564,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.
@ -2642,8 +2596,8 @@ class MCI_Footnotes_Task {
/*
* The click event goes in the table cell if footnote remains single.
*/
// Reverted wrong linting 2021-03-20T0032+0100.
$l_str_backlink_event = ' onclick="footnote_moveToAnchor_';
// Reverted wrong linting.
$l_str_backlink_event = ' onclick="footnote_moveToAnchor_';
$l_str_backlink_event .= self::$a_int_post_id;
$l_str_backlink_event .= '_' . self::$a_int_reference_container_id;
@ -2721,7 +2675,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;
@ -2825,7 +2779,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.
@ -2847,7 +2800,6 @@ class MCI_Footnotes_Task {
// Load 'templates/public/amp-reference-container.html'.
$l_obj_template_container = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_PUBLIC, 'amp-reference-container' );
}
} elseif ( 'js' === MCI_Footnotes::$a_str_script_mode ) {
// Load 'templates/public/js-reference-container.html'.
@ -2867,8 +2819,8 @@ class MCI_Footnotes_Task {
if ( 'jquery' === MCI_Footnotes::$a_str_script_mode ) {
$l_int_scroll_offset = ( self::$a_int_scroll_offset / 100 );
$l_int_scroll_up_duration = intval( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_DURATION ) );
$l_int_scroll_offset = ( self::$a_int_scroll_offset / 100 );
$l_int_scroll_up_duration = intval( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_DURATION ) );
if ( MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_SCROLL_DURATION_ASYMMETRICITY ) ) ) {
@ -2880,8 +2832,8 @@ class MCI_Footnotes_Task {
}
$l_int_scroll_down_delay = intval( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_DOWN_DELAY ) );
$l_int_scroll_up_delay = intval( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_UP_DELAY ) );
$l_int_scroll_down_delay = intval( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_DOWN_DELAY ) );
$l_int_scroll_up_delay = intval( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_UP_DELAY ) );
}

View file

@ -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/

View file

@ -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.
*/

View file

@ -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' );

View file

@ -5,7 +5,6 @@
* @filesource
* @package footnotes
* @since 1.5.0
* @date 14.09.14 17:30
*/
/**
@ -17,11 +16,11 @@ class MCI_Footnotes_WYSIWYG {
/**
* Registers Button hooks.
*
*
* @since 1.5.0
*
*
* - 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.
*
*
* @reporter @gova
* @link https://wordpress.org/support/topic/back-end-footnotes-not-working-400-bad-erro/
*

24
composer.json Normal file
View file

@ -0,0 +1,24 @@
{
"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-only",
"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/",
"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",
"damianopetrungaro/php-commitizen": "^0.2.0",
"marcocesarato/php-conventional-changelog": "^1.9"
}
}

61
contrib/pre-commit Normal file
View file

@ -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 $?

View file

@ -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.
@ -129,11 +128,11 @@
*
* - Bugfix: Reference container, tooltips: URL wrap: enable the 'word-wrap: anywhere' rule, thanks to @rebelc0de bug report.
*
* @since 2.5.4
*
* @reporter @rebelc0de
* @link https://wordpress.org/support/topic/footnotes-on-mobile-phones/#post-14037101
*
* @since 2.5.4
*
* These rules turn out useless for the purpose and are commented out:
* word-wrap: break-word;
* overflow-wrap: break-word;

View file

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

View file

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

View file

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

View file

@ -3,17 +3,17 @@
* Additional stylesheet for alternative tooltips.
*
* @since 2.5.5
*
* System of unified minified style sheets tailored to the instance.
*
* @see dev-common.css.
* @see full header in dev-common.css.
*/
/**
* Position.
* Alternative tooltips
*
* Values are defined by internal CSS.
* @see class/task.php
* These default position values may be overridden by internal CSS.
*/
.footnote_referrer.relative {

View file

@ -1,15 +1,8 @@
/*<?php for docblocks
/**
* Created by Stefan Herndler.
* User: Stefan
* Created-Date: 15.05.14
* Created-Time: 16:21
* Since: 1.0
*
* Additional stylesheet needed when tooltips (jQuery or alternative) are enabled.
*
* @version 2.5.8
* @lastmodified 2021-02-28T1302+0100
*
* System of unified minified style sheets tailored to the instance.
* @since 2.5.5

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -1 +0,0 @@
.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:relative!important}.footnote_item_anchor,.footnote_referrer_anchor{position:absolute!important}.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}.collapsed{display:none}.unfolded{display:inline}.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%!important;border:none!important}.footnotes_table caption.accessibility{text-align:start;margin-top:-2px!important;height:1px!important;width:1px!important;white-space:nowrap!important;overflow:hidden!important;color:#ffffff00!important;background-color:#ffffff00!important}.footnotes_table .footnotes_plugin_reference_row th{color:unset!important;background-color:inherit!important}.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}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

0
css/settings.css Executable file → Normal file
View file

1
css/tmp/footnotes-alttbrpl0.min.css vendored Normal file

File diff suppressed because one or more lines are too long

1
css/tmp/footnotes-alttbrpl1.min.css vendored Normal file

File diff suppressed because one or more lines are too long

1
css/tmp/footnotes-alttbrpl2.min.css vendored Normal file

File diff suppressed because one or more lines are too long

1
css/tmp/footnotes-alttbrpl3.min.css vendored Normal file

File diff suppressed because one or more lines are too long

1
css/tmp/footnotes-jqttbrpl0.min.css vendored Normal file
View file

@ -0,0 +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}.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}

1
css/tmp/footnotes-jqttbrpl1.min.css vendored Normal file

File diff suppressed because one or more lines are too long

1
css/tmp/footnotes-jqttbrpl2.min.css vendored Normal file

File diff suppressed because one or more lines are too long

1
css/tmp/footnotes-jqttbrpl3.min.css vendored Normal file

File diff suppressed because one or more lines are too long

1
css/tmp/footnotes-nottbrpl0.min.css vendored Normal file
View file

@ -0,0 +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}.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}

1
css/tmp/footnotes-nottbrpl1.min.css vendored Normal file

File diff suppressed because one or more lines are too long

1
css/tmp/footnotes-nottbrpl2.min.css vendored Normal file

File diff suppressed because one or more lines are too long

1
css/tmp/footnotes-nottbrpl3.min.css vendored Normal file
View file

@ -0,0 +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}.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}}

View file

@ -1,5 +1,4 @@
customized-documentation-schema.txt
@lastmodified 2021-03-05T0501+0100
Plugin Footnotes for WordPress, v2.5.4 and later
@ -37,8 +36,6 @@ PHPDOC tag: Role: Acknowledgment in the changelog:
PHPDOC tags & custom tags
‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
2021-01-24T2310+0100
2021-02-08T0415+0100
▲ Source for standard tags:
https://manual.phpdoc.org/HTMLSmartyConverter/HandS/phpDocumentor/tutorial_tags.pkg.html

View file

@ -1,6 +1,4 @@
customized-template-stack.txt
@date 2020-12-19T0609+0100
@lastmodified 2021-02-15T2027+0100
Plugin Footnotes for WordPress, v2.5.3 and later

View file

@ -4,65 +4,47 @@
* 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.7.0
* Version: 2.7.0
* CAUTION: THIS V. FIELD IS PARSED FOR UPDATE CONFIGURATION.
* Author URI: https://cheret.org/footnotes/
* Text Domain: footnotes
* Domain Path: /languages
*
* @package footnotes
* @copyright 2021 Mark Cheret (email: mark@cheret.de)
*/
/**
* Package Version number for stylesheet cache busting.
*
* Please keep this string in sync with the 'Version' (not 'Package V.').
* Please mirror the 'Version' also in js/wysiwyg-editor.js.
*
* @since 2.1.4
* @since 2.5.3 (Hungarian)
* @var str
* @lastmodified 2021-04-14T2351+0200
*/
define( 'C_STR_FOOTNOTES_VERSION', '2.7.0' );
/**
* 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.
* Defines the current environment ('development' or 'production').
*
* - 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.5
* @var bool
* @see Full docblock below next.
*
* @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.
* 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( 'PRODUCTION_ENV', false );
/**
* - 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
@ -115,22 +97,6 @@ define( 'C_BOOL_CSS_PRODUCTION_MODE', true );
* @link https://developer.wordpress.org/plugins/wordpress-org/how-your-readme-txt-works/
*/
/**
* Enables toggling the stylesheet enqueuing mode from production (true) to development (false).
*
* @since 2.5.5
* @var bool true: production mode.
* false: development mode.
* @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.
*
* @see constant define near version constant above.
*/
/**
* Plugins main PHP file.
*

View file

@ -25,7 +25,6 @@
* Make sure to sync the version number in class/init.php:
* @version 1.2.7.redacted.2
*
* @lastmodified 2021-02-18T2032+0100
* @accountable @pewgeuges
*
* @since 2.0.0 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
@ -43,7 +42,6 @@
* - Update: Libraries: jQuery Tools: add condition whether deprecated function jQuery.browser() exists, thanks to @vonpiernik code contribution
*
* @since 2.0.0
* @date 2020-10-26T2005+0100
* @accountable @pewgeuges
*
* @contributor @vonpiernik
@ -73,7 +71,6 @@
* - 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
*
* @since 2.1.1
* @date 2020-11-12T0127+0100
* @accountable @pewgeuges
*
* @reporter @bjrnet21
@ -157,7 +154,6 @@
* - Bugfix: Libraries: jQuery Tools: replace discouraged double equals sign with recommended triple equals sign
*
* @since 2.5.4
* @date 2021-01-27T1955+0100
* @accountable @pewgeuges
*
* 23 instances (27 less 4 already triple), first below, next was already
@ -498,7 +494,6 @@
* - Update: Libraries: jQuery Tools: replace deprecated function jQuery.isFunction(), thanks to @a223123131 bug report
*
* @since 2.5.4
* @date 2021-01-27T1911+0100
* @accountable @pewgeuges
*
* @reporter @a223123131

File diff suppressed because one or more lines are too long

View file

@ -1,8 +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() {
@ -61,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 {

6
readme.txt Executable file → Normal file
View file

@ -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: 7.0
Package Version: 2.7.0
Version: 2.7.0
Stable Tag: 2.7.0
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
@ -154,9 +151,6 @@ Visit this swift write-up from a **footnotes** user by the name of **Southwest**
- Update: Scroll delays: add a setting to configure also a scroll up delay for completeness.
- Bugfix: Tooltips: Styling: protect padding against removal in surroundings with explicit zero padding.
- Bugfix: Tooltips: Display: CSS transitions: fix syntax error.
- 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.