development version for urgent bugfix test in response to Forum (2.5.4d1)
git-svn-id: https://plugins.svn.wordpress.org/footnotes/trunk@2466893 b8457f37-d9ea-0310-8a92-e5e31aec5664
This commit is contained in:
parent
b34c0c12ab
commit
6706ba811e
8 changed files with 677 additions and 485 deletions
|
@ -5,16 +5,17 @@
|
|||
* @filesource
|
||||
* @author Stefan Herndler
|
||||
* @since 1.5.0 12.09.14 10:56
|
||||
*
|
||||
*
|
||||
* Edited:
|
||||
* 1.6.5 replace deprecated function create_function()
|
||||
* 2.0.0 add jQueryUI from Cloudflare 2020-10-26T1907+0100
|
||||
* 2.0.3 add versioning of public.css for cache busting 2020-10-29T1413+0100
|
||||
* 2.0.4 add jQuery UI from WordPress 2020-11-01T1902+0100
|
||||
* 2.1.4 automate passing version number for cache busting 2020-11-30T0646+0100
|
||||
* 2.1.4 optionally enqueue an extra style sheet 2020-12-04T2231+0100
|
||||
* @edit 1.6.5 Bugfix: Improve widgets registration, thanks to @felipelavinz code contribution
|
||||
* @edit 1.6.5 Update: Fix for deprecated PHP function create_function(), thanks to @psykonevro @daliasued bug reports, thanks to @felipelavinz code contribution
|
||||
* @edit 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
|
||||
* @edit 2.0.3 add versioning of public.css for cache busting 2020-10-29T1413+0100
|
||||
* @edit 2.0.4 add jQuery UI from WordPress 2020-11-01T1902+0100
|
||||
* @edit 2.1.4 automate passing version number for cache busting 2020-11-30T0646+0100
|
||||
* @edit 2.1.4 optionally enqueue an extra style sheet 2020-12-04T2231+0100
|
||||
*
|
||||
* Last modified: 2020-12-08T1927+0100
|
||||
* Last modified: 2021-01-31T0755+0100
|
||||
*/
|
||||
|
||||
|
||||
|
@ -40,9 +41,16 @@ class MCI_Footnotes {
|
|||
*
|
||||
* @author Stefan Herndler
|
||||
* @since 1.5.0
|
||||
*
|
||||
*
|
||||
* Bugfix: Improve widgets registration, thanks to @felipelavinz code contribution
|
||||
* @since 1.6.5
|
||||
*
|
||||
* @contributor @felipelavinz
|
||||
* @source https://github.com/media-competence-institute/footnotes/commit/87173d2980c7ff90e12ffee94ca7153e11163793
|
||||
*/
|
||||
public function run() {
|
||||
// register language
|
||||
// register language
|
||||
MCI_Footnotes_Language::registerHooks();
|
||||
// register Button hooks
|
||||
MCI_Footnotes_WYSIWYG::registerHooks();
|
||||
|
@ -68,13 +76,26 @@ class MCI_Footnotes {
|
|||
* @author Stefan Herndler
|
||||
* @since 1.5.0
|
||||
*
|
||||
* Edited for 1.6.5: replaced deprecated function create_function()
|
||||
*
|
||||
* Update: Fix for deprecated PHP function create_function(), thanks to @psykonevro @daliasued bug reports, thanks to @felipelavinz code contribution
|
||||
* @since 1.6.5
|
||||
*
|
||||
* @contributor @felipelavinz
|
||||
* @source https://github.com/media-competence-institute/footnotes/commit/87173d2980c7ff90e12ffee94ca7153e11163793
|
||||
*
|
||||
* @reporter @psykonevro
|
||||
* @bugreport https://wordpress.org/support/topic/bug-function-create_function-is-deprecated/
|
||||
* @bugreport https://wordpress.org/support/topic/deprecated-function-create_function-14/
|
||||
*
|
||||
* @reporter @daliasued
|
||||
* @bugreport https://wordpress.org/support/topic/deprecated-function-create_function-14/#post-13312853
|
||||
*
|
||||
* Contributed by Felipe Lavín Z. Thankfully acknowledged.
|
||||
*
|
||||
* create_function() was deprecated in PHP 7.2:
|
||||
* <https://wordpress.org/support/topic/deprecated-in-php-7-2-function-create_function-is-deprecated/>
|
||||
* See also: <https://wordpress.org/support/topic/deprecated-function-create_function-14/>
|
||||
* create_function() was deprecated in PHP 7.2.0 and removed in PHP 8.0.0.
|
||||
* @link https://www.php.net/manual/en/function.create-function.php
|
||||
*
|
||||
* The fix is to move add_action() above into run(),
|
||||
* and use the bare register_widget() here.
|
||||
* And declare initializeWidgets() public, not private.
|
||||
*/
|
||||
public function initializeWidgets() {
|
||||
register_widget("MCI_Footnotes_Widget_ReferenceContainer");
|
||||
|
@ -107,6 +128,7 @@ class MCI_Footnotes {
|
|||
* @author Stefan Herndler
|
||||
* @since 1.5.0
|
||||
*
|
||||
* @edit 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
|
||||
* Updated for v2.0.0 adding jQuery UI
|
||||
* Updated for v2.0.4 by adding jQuery UI from WordPress following @check2020de:
|
||||
* <https://wordpress.org/support/topic/gdpr-issue-with-jquery/>
|
||||
|
@ -121,7 +143,13 @@ class MCI_Footnotes {
|
|||
// These are only enqueued if the jQuery tooltips are enabled.
|
||||
// If alternative tooltips are enabled, these libraries are not needed.
|
||||
// Scroll animation doesn’t seem to need even jQuery Core or it gets it from elsewhere.
|
||||
|
||||
//* @edit 2.0.0 add jQueryUI from Cloudflare 2020-10-26T1907+0100
|
||||
//* @edit 2.0.3 add versioning of public.css for cache busting 2020-10-29T1413+0100
|
||||
//* @edit 2.0.4 add jQuery UI from WordPress 2020-11-01T1902+0100
|
||||
//* @edit 2.1.4 automate passing version number for cache busting 2020-11-30T0646+0100
|
||||
//* @edit 2.1.4 optionally enqueue an extra style sheet 2020-12-04T2231+0100
|
||||
//*/
|
||||
|
||||
if (!MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ALTERNATIVE))) {
|
||||
|
||||
// enqueue the jQuery plugin registered by WordPress:
|
||||
|
@ -134,9 +162,16 @@ class MCI_Footnotes {
|
|||
wp_enqueue_script( 'jquery-ui-tooltip' );
|
||||
|
||||
// enqueue jQuery Tools:
|
||||
// redacted jQuery.browser, completed minification; added versioning 2020-11-18T2150+0100
|
||||
// redacted jQuery.browser, completed minification;
|
||||
// see full header in js/jquery.tools.js
|
||||
// added versioning 2020-11-18T2150+0100
|
||||
// not use '-js' in the handle, is appended automatically
|
||||
wp_enqueue_script('mci-footnotes-jquery-tools', plugins_url('footnotes/js/jquery.tools.min.js'), array(), '1.2.7redacted');
|
||||
wp_enqueue_script(
|
||||
'mci-footnotes-jquery-tools',
|
||||
plugins_url('footnotes/js/jquery.tools.min.js'),
|
||||
array(),
|
||||
'1.2.7.redacted.2'
|
||||
);
|
||||
|
||||
|
||||
// Alternatively, fetch jQuery UI from cdnjs.cloudflare.com:
|
||||
|
|
Reference in a new issue