Skip to content

Commit

Permalink
Merge pull request #7180 from pods-framework/release/3.0.4
Browse files Browse the repository at this point in the history
  • Loading branch information
sc0ttkclark authored Sep 25, 2023
2 parents 99bb7f7 + 0899374 commit afb718d
Show file tree
Hide file tree
Showing 15 changed files with 231 additions and 18 deletions.
5 changes: 5 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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.4 - September 25th, 2023 =

* Fixed: Resolve bidirectional removal issue from Pods 2.x where bidirectional relationships would not have the current item removed when you removed that related item. (@sc0ttkclark)
* Fixed: Added repair tool to address the potential for invalid conditional logic saved to the DB in early Pods 3.0 releases or future cases, this is when conditional logic stores a rule that ends up being a long serialized PHP string that contains a serialized PHP array. (@sc0ttkclark)

= 3.0.3 - September 22nd, 2023 =

* Fixed: Settings pods handling for relationships for Pods that are registered by DB / Code / File now normalize as necessary for relationships stored in the `wp_podsrel` index table for which item ID is used to relate from. (@sc0ttkclark)
Expand Down
1 change: 1 addition & 0 deletions classes/PodsAPI.php
Original file line number Diff line number Diff line change
Expand Up @@ -3724,6 +3724,7 @@ public function save_field( $params, $table_operation = true, $sanitized = false
'group_id',
'attributes',
'depends-on',
'depends-on-any',
'depends-on-multi',
'excludes-on',
'wildcard-on',
Expand Down
10 changes: 9 additions & 1 deletion classes/fields/pick.php
Original file line number Diff line number Diff line change
Expand Up @@ -1949,7 +1949,10 @@ public function save( $value, $id = null, $name = null, $options = null, $fields
if ( empty( $value_ids ) ) {
// Remove all bidirectional relationships.
if ( ! empty( $remove_ids ) ) {
// Remove this ID from the related IDS.
self::$api->delete_relationships( $remove_ids, $id, $related_pod, $related_field );

// Remove the related IDs from this ID.
self::$api->delete_relationships( $id, $remove_ids, $pod, $options );
}

Expand Down Expand Up @@ -1991,7 +1994,7 @@ public function save( $value, $id = null, $name = null, $options = null, $fields
if ( ! in_array( $id, $bidirectional_ids, true ) ) {
// Add to related items.
$bidirectional_ids[] = $id;
} elseif ( empty( $remove_ids ) ) {
} elseif ( empty( $bidirectional_remove_ids ) ) {
// Nothing to change.
continue;
}
Expand All @@ -2003,6 +2006,11 @@ public function save( $value, $id = null, $name = null, $options = null, $fields
}
}//end foreach

// Remove this ID from the related IDs.
if ( ! empty( $remove_ids ) ) {
self::$api->delete_relationships( $remove_ids, $id, $related_pod, $related_field );
}

if ( ! $no_conflict ) {
pods_no_conflict_off( $related_pod['type'] );
}
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.0.3
* Version: 3.0.4
* 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.0.3' );
define( 'PODS_VERSION', '3.0.4' );

// 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.0.3",
"version": "3.0.4",
"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
7 changes: 6 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.3
Requires PHP: 7.2
Stable tag: 3.0.3
Stable tag: 3.0.4
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

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

== Changelog ==

= 3.0.4 - September 25th, 2023 =

* Fixed: Resolve bidirectional removal issue from Pods 2.x where bidirectional relationships would not have the current item removed when you removed that related item. (@sc0ttkclark)
* Fixed: Added repair tool to address the potential for invalid conditional logic saved to the DB in early Pods 3.0 releases or future cases, this is when conditional logic stores a rule that ends up being a long serialized PHP string that contains a serialized PHP array. (@sc0ttkclark)

= 3.0.3 - September 22nd, 2023 =

* Fixed: Settings pods handling for relationships for Pods that are registered by DB / Code / File now normalize as necessary for relationships stored in the `wp_podsrel` index table for which item ID is used to relate from. (@sc0ttkclark)
Expand Down
24 changes: 19 additions & 5 deletions src/Pods/Data/Conditional_Logic.php

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

160 changes: 159 additions & 1 deletion src/Pods/Tools/Repair.php

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

7 changes: 6 additions & 1 deletion src/Pods/Whatsit.php

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

4 changes: 2 additions & 2 deletions src/Pods/Whatsit/Block_Field.php

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

6 changes: 5 additions & 1 deletion src/Pods/Whatsit/Field.php

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

6 changes: 5 additions & 1 deletion src/Pods/Whatsit/Group.php

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

6 changes: 5 additions & 1 deletion src/Pods/Whatsit/Legacy_Object.php

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

Loading

0 comments on commit afb718d

Please sign in to comment.