diff --git a/changelog.txt b/changelog.txt index c517600d07..3a2a4c364c 100644 --- a/changelog.txt +++ b/changelog.txt @@ -2,6 +2,11 @@ Found a bug? Have a great feature idea? Get on GitHub and tell us about it and w Our GitHub has the full list of all prior releases of Pods: https://github.com/pods-framework/pods/releases += 3.0.6 - October 2nd, 2023 = + +* Fixed: Resolved a plugin conflict with The Events Calendar / Event Tickets plugins that was introduced in 3.0.5. (@sc0ttkclark) +* Fixed: PHP deprecated notices resolved for return types in PHP 8+ (@sc0ttkclark) + = 3.0.5 - October 2nd, 2023 = * Tweak: Added the "full" image size to the reference list in the Pods Template editor. #7183 #7184 (@JoryHogeveen) @@ -11,7 +16,7 @@ Our GitHub has the full list of all prior releases of Pods: https://github.com/p * Fixed: Normalize numbers when doing conditional logic comparisons. (@sc0ttkclark) * Fixed: Add new options to trim content of fields by removing empty p tags, trimming whitespace at the end of lines, and removing extra lines. Default those to off (previously they were just always on). (@sc0ttkclark) * Fixed: Add `tribe()` backward compatibilty function for Pods add-ons that still call that function. This only gets included by Pods when Tribe Common is not detected on the site. (@sc0ttkclark) -* Fixed: Resolve file/relationship lookups for settings pages that are DB vs file-based configs. (@sc0ttkclark) +* Fixed: Resolve file/relationship lookups for settings pages that are DB vs file-based configs. (@sc0ttkclark) = 3.0.4 - September 25th, 2023 = diff --git a/classes/PodsInit.php b/classes/PodsInit.php index d2fd10aa73..cb1356707a 100644 --- a/classes/PodsInit.php +++ b/classes/PodsInit.php @@ -2438,6 +2438,8 @@ public function run() { // Compatibility for Query Monitor conditionals add_filter( 'query_monitor_conditionals', array( $this, 'filter_query_monitor_conditionals' ) ); + + require_once PODS_DIR . 'includes/compatibility.php'; } /** diff --git a/includes/compatibility.php b/includes/compatibility.php new file mode 100644 index 0000000000..cf55959251 --- /dev/null +++ b/includes/compatibility.php @@ -0,0 +1,35 @@ +register( $provider_class ); } - -// Add backwards compatibility for tribe() for old add-ons that may still call it. -if ( - ! function_exists( 'tribe_is_not_min_php_version' ) - && ! function_exists( 'tribe' ) -) { - /** - * Compatibility function for Pods 2.x add-ons that may still call tribe(). - * - * @since 3.0.5 - * - * @param string|null $slug_or_class Either the slug of a binding previously registered using singleton or - * register or the full class name that should be automagically created or - * `null` to get the container instance itself. - * - * @return mixed|null The pods_container() object or null if the function does not exist yet. - */ - function tribe( $slug_or_class = null ) { - _doing_it_wrong( 'tribe', 'tribe() is no longer included in Pods Framework directly. Please use pods_container() instead.', '3.0' ); - - return pods_container( $slug_or_class ); - } -} diff --git a/init.php b/init.php index 98b4f2e390..742e9499b3 100644 --- a/init.php +++ b/init.php @@ -10,7 +10,7 @@ * Plugin Name: Pods - Custom Content Types and Fields * Plugin URI: https://pods.io/ * Description: Pods is a framework for creating, managing, and deploying customized content types and fields - * Version: 3.0.5 + * Version: 3.0.6 * Author: Pods Framework Team * Author URI: https://pods.io/about/ * Text Domain: pods @@ -43,7 +43,7 @@ add_action( 'init', 'pods_deactivate_pods_ui' ); } else { // Current version. - define( 'PODS_VERSION', '3.0.5' ); + define( 'PODS_VERSION', '3.0.6' ); // Current database version, this is the last version the database changed. define( 'PODS_DB_VERSION', '2.3.5' ); diff --git a/package.json b/package.json index 28f35d75c7..45327c0c53 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "pods", - "version": "3.0.5", + "version": "3.0.6", "description": "Pods is a development framework for creating, extending, managing, and deploying customized content types in WordPress.", "author": "Pods Foundation, Inc", "homepage": "https://pods.io/", diff --git a/readme.txt b/readme.txt index 76c425e65d..6ebbf16180 100644 --- a/readme.txt +++ b/readme.txt @@ -5,7 +5,7 @@ Tags: pods, custom post types, custom taxonomies, content types, custom fields, Requires at least: 6.0 Tested up to: 6.3 Requires PHP: 7.2 -Stable tag: 3.0.5 +Stable tag: 3.0.6 License: GPLv2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html @@ -177,6 +177,11 @@ Pods really wouldn't be where it is without all the contributions from our [dono == Changelog == += 3.0.6 - October 2nd, 2023 = + +* Fixed: Resolved a plugin conflict with The Events Calendar / Event Tickets plugins that was introduced in 3.0.5. (@sc0ttkclark) +* Fixed: PHP deprecated notices resolved for return types in PHP 8+ (@sc0ttkclark) + = 3.0.5 - October 2nd, 2023 = * Tweak: Added the "full" image size to the reference list in the Pods Template editor. #7183 #7184 (@JoryHogeveen) @@ -186,7 +191,7 @@ Pods really wouldn't be where it is without all the contributions from our [dono * Fixed: Normalize numbers when doing conditional logic comparisons. (@sc0ttkclark) * Fixed: Add new options to trim content of fields by removing empty p tags, trimming whitespace at the end of lines, and removing extra lines. Default those to off (previously they were just always on). (@sc0ttkclark) * Fixed: Add `tribe()` backward compatibilty function for Pods add-ons that still call that function. This only gets included by Pods when Tribe Common is not detected on the site. (@sc0ttkclark) -* Fixed: Resolve file/relationship lookups for settings pages that are DB vs file-based configs. (@sc0ttkclark) +* Fixed: Resolve file/relationship lookups for settings pages that are DB vs file-based configs. (@sc0ttkclark) = 3.0.4 - September 25th, 2023 = diff --git a/src/Pods/API/Whatsit/Value_Field.php b/src/Pods/API/Whatsit/Value_Field.php index 31fb752248..8b77a04f37 100644 --- a/src/Pods/API/Whatsit/Value_Field.php +++ b/src/Pods/API/Whatsit/Value_Field.php @@ -56,6 +56,7 @@ public static function init( Whatsit $field ) { * * @uses Whatsit::__toString() */ + #[\ReturnTypeWillChange] public function __toString() { return $this->_field->get_identifier(); } @@ -67,6 +68,7 @@ public function __toString() { * * @return bool Whether the offset exists. */ + #[\ReturnTypeWillChange] public function offsetExists( $offset ) { return $this->__isset( $offset ); } @@ -78,6 +80,7 @@ public function offsetExists( $offset ) { * * @return mixed|null Offset value, or null if not set. */ + #[\ReturnTypeWillChange] public function &offsetGet( $offset ) { // We fake the pass by reference to avoid PHP errors for backcompat. $value = $this->__get( $offset ); @@ -118,6 +121,7 @@ public function offsetUnset( $offset ) { * * @uses Whatsit::__isset() */ + #[\ReturnTypeWillChange] public function __isset( $offset ) { if ( 'value' === $offset ) { return isset( $this->_value ); @@ -135,6 +139,7 @@ public function __isset( $offset ) { * * @uses Whatsit::__get() */ + #[\ReturnTypeWillChange] public function __get( $offset ) { if ( 'value' === $offset ) { return $this->_value; @@ -186,6 +191,7 @@ public function __unset( $offset ) { * * @return mixed The method response. */ + #[\ReturnTypeWillChange] public function __call( $method, $arguments ) { return call_user_func_array( [ $this->_field, $method ], $arguments ); } diff --git a/src/Pods/Whatsit.php b/src/Pods/Whatsit.php index 1fe7f3481c..d890690ec3 100644 --- a/src/Pods/Whatsit.php +++ b/src/Pods/Whatsit.php @@ -361,6 +361,7 @@ public function valid(): bool { * * @return string Object identifier. */ + #[\ReturnTypeWillChange] public function __toString() { return $this->get_identifier(); } @@ -372,6 +373,7 @@ public function __toString() { * * @return bool Whether the offset exists. */ + #[\ReturnTypeWillChange] public function offsetExists( $offset ): bool { return $this->__isset( $offset ); } @@ -422,6 +424,7 @@ public function offsetUnset( $offset ): void { * * @return bool Whether the offset exists. */ + #[\ReturnTypeWillChange] public function __isset( $offset ) { if ( is_int( $offset ) ) { $args = $this->getArrayCopy(); @@ -453,6 +456,7 @@ public function __isset( $offset ) { * * @return mixed|null Offset value, or null if not set. */ + #[\ReturnTypeWillChange] public function __get( $offset ) { if ( is_int( $offset ) ) { $args = $this->getArrayCopy();