diff --git a/changelog.txt b/changelog.txt index 0f0d6a9..ee51b4e 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,3 +1,7 @@ += 2.9.1 = + +* Fix: Validate hook priority values (Let's Getz Prioritized) + = 2.9.0 = * Add: Support WebP image format diff --git a/controller.php b/controller.php index f11adb6..fceeac9 100644 --- a/controller.php +++ b/controller.php @@ -285,7 +285,11 @@ public function hooks_add_last( $data = null ) { } // Get lowest priority for filter. - $max_priority = max( array_keys( $wp_filter[ $tag ]->callbacks ) ) + 123; + $max_priority = max( array_keys( $wp_filter[ $tag ]->callbacks ) ); + // Add priority offset + if ( $max_priority < PHP_INT_MAX ) { + $max_priority += min( 123, PHP_INT_MAX - $max_priority ); + } switch ( $tag ) { case 'the_content': diff --git a/main.php b/main.php index 59a234b..834cb44 100644 --- a/main.php +++ b/main.php @@ -9,7 +9,7 @@ * Plugin Name: Simple Lightbox * Plugin URI: http://archetyped.com/tools/simple-lightbox/ * Description: The highly customizable lightbox for WordPress - * Version: 2.9.0 + * Version: 2.9.1 * Requires at least: 5.3 * Requires PHP: 5.6.20 * Text Domain: simple-lightbox diff --git a/package-lock.json b/package-lock.json index c100c5d..3c246dc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,11 +1,11 @@ { "name": "simple-lightbox", - "version": "2.9.0", + "version": "2.9.1", "lockfileVersion": 2, "requires": true, "packages": { "": { - "version": "2.9.0", + "version": "2.9.1", "license": "GPLv2", "devDependencies": { "grunt": "^1.5.3", diff --git a/package.json b/package.json index eb05f0c..16a6472 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "simple-lightbox", - "version": "2.9.0", + "version": "2.9.1", "title": "Simple Lightbox", "description": "The highly-customizable lightbox for WordPress", "author": "Archetyped ", diff --git a/readme.txt b/readme.txt index 9b4abea..50a3118 100644 --- a/readme.txt +++ b/readme.txt @@ -65,6 +65,10 @@ Get more information on [Simple Lightbox's official page](http://archetyped.com/ == Changelog == += 2.9.1 = + +* Fix: Validate hook priority values (Let's Getz Prioritized) + = 2.9.0 = * Add: Support WebP image format