Skip to content

Commit

Permalink
Pods 3.2.6 (#7329)
Browse files Browse the repository at this point in the history
  • Loading branch information
sc0ttkclark authored Jul 22, 2024
2 parents 5dd90cb + a88ad47 commit e507c4e
Show file tree
Hide file tree
Showing 15 changed files with 596 additions and 118 deletions.
6 changes: 6 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@ 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.2.6 - July 21st, 2024 =

* Fixed: Resolve issue with WordPress 6.5 and earlier compatibility by adding polyfill for `react-jsx-runtime` dependency that WP 6.6 related tooling now requires. (@sc0ttkclark)
* Fixed: Resolve `register_meta` issue where it wasn't checking if post type supported revisions before setting meta key as revisionable. (@sc0ttkclark)
* Tweak: Partial work towards a fix for REST API update handling for meta fields which was broken in a previous release. Final fix will be in Pods 3.2.7. (@sc0ttkclark)

= 3.2.5 - July 19th, 2024 =

* Fixed: Resolve issue with WordPress 6.6 compatibility that caused Pods Admin > Edit Pod and Pods forms to stop working properly on some sites. (@sc0ttkclark, @swissspidy)
Expand Down
11 changes: 11 additions & 0 deletions classes/PodsInit.php
Original file line number Diff line number Diff line change
Expand Up @@ -688,6 +688,17 @@ public function register_assets() {
);
}

// WordPress pre-6.6 compatibility for react-jsx-runtime.
if ( ! wp_script_is( 'react-jsx-runtime', 'registered' ) ) {
wp_register_script(
'react-jsx-runtime',
PODS_URL . 'ui/js/react-jsx-runtime.js',
[ 'react' ],
'18.3.0',
true
);
}

// Marionette dependencies for DFV/MV fields.
wp_register_script(
'pods-backbone-radio',
Expand Down
27 changes: 17 additions & 10 deletions classes/PodsRESTFields.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class PodsRESTFields {
*
* @var null|Pod
*/
protected $pod;
protected $pod = null;

/**
* Constructor for class
Expand All @@ -49,15 +49,24 @@ public function __construct( $pod ) {
}

/**
* Set the Pods object
* Get the Pod object.
*
* @since 2.5.6
* @since 3.2.6
*
* @access protected
* @return Pod|null The Pod object.
*/
public function get_pod(): ?Pod {
return $this->pod;
}

/**
* Set the Pod object.
*
* @since 2.5.6
*
* @param string|Pods $pod Pods object or name of Pods object
* @param string|object|Pods|Pod $pod The Pod object which will be normalized and stored.
*/
private function set_pod( $pod ) {
public function set_pod( $pod ) {
$this->pod = null;

// Normalize the $pod object.
Expand Down Expand Up @@ -127,11 +136,9 @@ public function add_fields() {
*
* @since 2.5.6
*
* @access protected
*
* @param Field $field The field object.
*/
protected function register( $field ) {
public function register( $field ) {
$rest_read = self::field_allowed_to_extend( $field, $this->pod, 'read' );
$rest_write = self::field_allowed_to_extend( $field, $this->pod, 'write' );

Expand Down Expand Up @@ -249,7 +256,7 @@ public static function field_allowed_to_extend( $field, $pod, $mode ) {
}

$can_use_mode = filter_var( $can_use_mode_value, FILTER_VALIDATE_BOOLEAN );
$access = filter_var( $field->get_arg( $mode_access_arg, false ), FILTER_VALIDATE_BOOLEAN );
$access = 'read' === $mode && filter_var( $field->get_arg( $mode_access_arg, false ), FILTER_VALIDATE_BOOLEAN );

// Check if user must be logged in to access field and override whether they can use it.
if ( $can_use_mode && $access ) {
Expand Down
4 changes: 2 additions & 2 deletions init.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.2.5
* Version: 3.2.6-a-1
* Author: Pods Framework Team
* Author URI: https://pods.io/about/
* Text Domain: pods
Expand Down Expand Up @@ -43,7 +43,7 @@
add_action( 'init', 'pods_deactivate_pods_ui' );
} else {
// Current version.
define( 'PODS_VERSION', '3.2.5' );
define( 'PODS_VERSION', '3.2.6-a-1' );

// Current database version, this is the last version the database changed.
define( 'PODS_DB_VERSION', '2.3.5' );
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "pods",
"version": "3.2.5",
"version": "3.2.6-a-1",
"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/",
Expand Down
8 changes: 7 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Tags: pods, custom post types, custom taxonomies, content types, custom fields
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.2
Stable tag: 3.2.5
Stable tag: 3.2.6-a-1
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Expand Down Expand Up @@ -182,6 +182,12 @@ Pods really wouldn't be where it is without all the contributions from our [dono

== Changelog ==

= 3.2.6 - July 21st, 2024 =

* Fixed: Resolve issue with WordPress 6.5 and earlier compatibility by adding polyfill for `react-jsx-runtime` dependency that WP 6.6 related tooling now requires. (@sc0ttkclark)
* Fixed: Resolve `register_meta` issue where it wasn't checking if post type supported revisions before setting meta key as revisionable. (@sc0ttkclark)
* Tweak: Partial work towards a fix for REST API update handling for meta fields which was broken in a previous release. Final fix will be in Pods 3.2.7. (@sc0ttkclark)

= 3.2.5 - July 19th, 2024 =

* Fixed: Resolve issue with WordPress 6.6 compatibility that caused Pods Admin > Edit Pod and Pods forms to stop working properly on some sites. (@sc0ttkclark, @swissspidy)
Expand Down
41 changes: 27 additions & 14 deletions src/Pods/WP/Meta.php

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit e507c4e

Please sign in to comment.