Version Description
November 17th, 2021 =
Fixed: Resolved problems with old Pods 1.x upgrades not fully going away. (@sc0ttkclark)
Fixed: Resolved problems with extended post types being overridden. (@sc0ttkclark)
Download this release
Release Info
Developer | sc0ttkclark |
Plugin | Pods – Custom Content Types and Fields |
Version | 2.8.5 |
Comparing to | |
See all releases |
Code changes from version 2.8.4.1 to 2.8.5
- classes/PodsAPI.php +4 -1
- classes/PodsInit.php +16 -2
- init.php +2 -2
- readme.txt +11 -6
- src/Pods/Whatsit/Pod.php +2 -2
classes/PodsAPI.php
CHANGED
@@ -2599,7 +2599,10 @@ class PodsAPI {
|
|
2599 |
'post_type',
|
2600 |
'taxonomy'
|
2601 |
), true )
|
2602 |
-
&&
|
|
|
|
|
|
|
2603 |
) {
|
2604 |
pods_init()->setup_content_types( true );
|
2605 |
}
|
2599 |
'post_type',
|
2600 |
'taxonomy'
|
2601 |
), true )
|
2602 |
+
&& (
|
2603 |
+
! $pod instanceof Pod
|
2604 |
+
|| ! $pod->is_extended()
|
2605 |
+
)
|
2606 |
) {
|
2607 |
pods_init()->setup_content_types( true );
|
2608 |
}
|
classes/PodsInit.php
CHANGED
@@ -1,6 +1,7 @@
|
|
1 |
<?php
|
2 |
|
3 |
use Pods\Static_Cache;
|
|
|
4 |
use Pods\Wisdom_Tracker;
|
5 |
|
6 |
/**
|
@@ -1245,6 +1246,8 @@ class PodsInit {
|
|
1245 |
return;
|
1246 |
}
|
1247 |
|
|
|
|
|
1248 |
$post_types = PodsMeta::$post_types;
|
1249 |
$taxonomies = PodsMeta::$taxonomies;
|
1250 |
|
@@ -1297,12 +1300,14 @@ class PodsInit {
|
|
1297 |
if ( isset( $pods_cpt_ct['post_types'][ $post_type['name'] ] ) ) {
|
1298 |
// Post type was setup already
|
1299 |
continue;
|
1300 |
-
} elseif (
|
1301 |
// Post type exists already
|
1302 |
continue;
|
1303 |
} elseif ( ! $force && isset( $existing_post_types[ $post_type['name'] ] ) ) {
|
1304 |
// Post type was setup and exists already, but we aren't forcing it to be setup again
|
1305 |
continue;
|
|
|
|
|
1306 |
}
|
1307 |
|
1308 |
$post_type_name = pods_v_sanitized( 'name', $post_type );
|
@@ -1540,6 +1545,8 @@ class PodsInit {
|
|
1540 |
} elseif ( ! $force && isset( $existing_taxonomies[ $taxonomy['name'] ] ) ) {
|
1541 |
// Taxonomy was setup and exists already, but we aren't forcing it to be setup again
|
1542 |
continue;
|
|
|
|
|
1543 |
}
|
1544 |
|
1545 |
$taxonomy_name = pods_v( 'name', $taxonomy );
|
@@ -1726,7 +1733,9 @@ class PodsInit {
|
|
1726 |
|
1727 |
$pods_cpt_ct['post_format_post_types'] = $post_format_post_types;
|
1728 |
|
1729 |
-
|
|
|
|
|
1730 |
}//end if
|
1731 |
|
1732 |
foreach ( $pods_cpt_ct['taxonomies'] as $taxonomy => $options ) {
|
@@ -2221,6 +2230,11 @@ class PodsInit {
|
|
2221 |
|
2222 |
if ( ! empty( $current ) ) {
|
2223 |
foreach ( self::$upgrades as $old_version => $new_version ) {
|
|
|
|
|
|
|
|
|
|
|
2224 |
/*
|
2225 |
if ( '2.1.0' === $new_version && ( is_developer() ) )
|
2226 |
continue;*/
|
1 |
<?php
|
2 |
|
3 |
use Pods\Static_Cache;
|
4 |
+
use Pods\Whatsit\Pod;
|
5 |
use Pods\Wisdom_Tracker;
|
6 |
|
7 |
/**
|
1246 |
return;
|
1247 |
}
|
1248 |
|
1249 |
+
$save_transient = doing_action( 'init' ) || did_action( 'init' );
|
1250 |
+
|
1251 |
$post_types = PodsMeta::$post_types;
|
1252 |
$taxonomies = PodsMeta::$taxonomies;
|
1253 |
|
1300 |
if ( isset( $pods_cpt_ct['post_types'][ $post_type['name'] ] ) ) {
|
1301 |
// Post type was setup already
|
1302 |
continue;
|
1303 |
+
} elseif ( isset( $existing_post_types[ $post_type['name'] ] ) ) {
|
1304 |
// Post type exists already
|
1305 |
continue;
|
1306 |
} elseif ( ! $force && isset( $existing_post_types[ $post_type['name'] ] ) ) {
|
1307 |
// Post type was setup and exists already, but we aren't forcing it to be setup again
|
1308 |
continue;
|
1309 |
+
} elseif ( $post_type instanceof Pod && $post_type->is_extended() ) {
|
1310 |
+
continue;
|
1311 |
}
|
1312 |
|
1313 |
$post_type_name = pods_v_sanitized( 'name', $post_type );
|
1545 |
} elseif ( ! $force && isset( $existing_taxonomies[ $taxonomy['name'] ] ) ) {
|
1546 |
// Taxonomy was setup and exists already, but we aren't forcing it to be setup again
|
1547 |
continue;
|
1548 |
+
} elseif ( $taxonomy instanceof Pod && $taxonomy->is_extended() ) {
|
1549 |
+
continue;
|
1550 |
}
|
1551 |
|
1552 |
$taxonomy_name = pods_v( 'name', $taxonomy );
|
1733 |
|
1734 |
$pods_cpt_ct['post_format_post_types'] = $post_format_post_types;
|
1735 |
|
1736 |
+
if ( $save_transient ) {
|
1737 |
+
pods_transient_set( 'pods_wp_cpt_ct', $pods_cpt_ct, WEEK_IN_SECONDS );
|
1738 |
+
}
|
1739 |
}//end if
|
1740 |
|
1741 |
foreach ( $pods_cpt_ct['taxonomies'] as $taxonomy => $options ) {
|
2230 |
|
2231 |
if ( ! empty( $current ) ) {
|
2232 |
foreach ( self::$upgrades as $old_version => $new_version ) {
|
2233 |
+
// Check if Pods 1.x upgrade has already been run.
|
2234 |
+
if ( '1.0.0' === $old_version && self::$upgraded ) {
|
2235 |
+
continue;
|
2236 |
+
}
|
2237 |
+
|
2238 |
/*
|
2239 |
if ( '2.1.0' === $new_version && ( is_developer() ) )
|
2240 |
continue;*/
|
init.php
CHANGED
@@ -10,7 +10,7 @@
|
|
10 |
* Plugin Name: Pods - Custom Content Types and Fields
|
11 |
* Plugin URI: https://pods.io/
|
12 |
* Description: Pods is a framework for creating, managing, and deploying customized content types and fields
|
13 |
-
* Version: 2.8.
|
14 |
* Author: Pods Framework Team
|
15 |
* Author URI: https://pods.io/about/
|
16 |
* Text Domain: pods
|
@@ -43,7 +43,7 @@ if ( defined( 'PODS_VERSION' ) || defined( 'PODS_DIR' ) ) {
|
|
43 |
add_action( 'init', 'pods_deactivate_pods_ui' );
|
44 |
} else {
|
45 |
// Current version.
|
46 |
-
define( 'PODS_VERSION', '2.8.
|
47 |
|
48 |
// Current database version, this is the last version the database changed.
|
49 |
define( 'PODS_DB_VERSION', '2.3.5' );
|
10 |
* Plugin Name: Pods - Custom Content Types and Fields
|
11 |
* Plugin URI: https://pods.io/
|
12 |
* Description: Pods is a framework for creating, managing, and deploying customized content types and fields
|
13 |
+
* Version: 2.8.5
|
14 |
* Author: Pods Framework Team
|
15 |
* Author URI: https://pods.io/about/
|
16 |
* Text Domain: pods
|
43 |
add_action( 'init', 'pods_deactivate_pods_ui' );
|
44 |
} else {
|
45 |
// Current version.
|
46 |
+
define( 'PODS_VERSION', '2.8.5' );
|
47 |
|
48 |
// Current database version, this is the last version the database changed.
|
49 |
define( 'PODS_DB_VERSION', '2.3.5' );
|
readme.txt
CHANGED
@@ -5,7 +5,7 @@ Tags: pods, custom post types, custom taxonomies, content types, custom fields,
|
|
5 |
Requires at least: 5.5
|
6 |
Tested up to: 5.8
|
7 |
Requires PHP: 5.6
|
8 |
-
Stable tag: 2.8.
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
@@ -151,13 +151,18 @@ Pods really wouldn't be where it is without all the contributions from our [dono
|
|
151 |
|
152 |
== Changelog ==
|
153 |
|
|
|
|
|
|
|
|
|
|
|
154 |
= 2.8.4.1 - November 17th, 2021 =
|
155 |
|
156 |
* Fixed: Resolved issues where usage of `pods_group_add()` could produce errors which would stop the Edit Post screen from loading. (@sc0ttkclark)
|
157 |
|
158 |
= 2.8.4 - November 16th, 2021 =
|
159 |
|
160 |
-
* Added: Pods Field Value widget now supports using current post/term just like the Pods Single Item widget does. (@sc0ttkclark)
|
161 |
* Fixed: Checkbox dependencies for Pod options now show as expected when loading the Edit Pod screen for a newly created Pod. #6255 #6291 (@zrothauser)
|
162 |
* Fixed: "/" is now specifically disallowed from being used for the custom rewrite slug on a post type or taxonomy to prevent rewrite conflicts. #5744 (@sc0ttkclark, @dingman)
|
163 |
* Fixed: Advanced Filters pop-up now shows without showing the unused scrollbars in most cases. #6264 (@sc0ttkclark)
|
@@ -176,7 +181,7 @@ Pods really wouldn't be where it is without all the contributions from our [dono
|
|
176 |
* Fixed: Placeholder values are properly inherited based on field type specific options. #6289 (@JoryHogeveen, @sc0ttkclark)
|
177 |
* Fixed: REST API fields now correctly check the right field option for whether fields should be individually shown. #6288 (@JoryHogeveen)
|
178 |
* Fixed: Relationship traversal now properly handle selection limit if more than the original field. #6243 (@sc0ttkclark)
|
179 |
-
* Fixed: Prevent potential conflicts when a plugin uses `$post->content` instead of `$post->post_content` to get the content of a post. Pods no longer checks objet field aliases with `get_post_meta()` and directly integrated metadata function calls. (@sc0ttkclark)
|
180 |
* Fixed: Fix `orderby` PHP notices for `in_array()` checks on field id and field index. (@sc0ttkclark)
|
181 |
* Fixed: Better checks for Pod objects existing in PodsMeta. (@sc0ttkclark)
|
182 |
* Fixed: Removed the "Extra Fields" option (old WP compatibility option) for Custom Taxonomies on the Pods Admin > Add New screen. (@sc0ttkclark)
|
@@ -228,7 +233,7 @@ Pods really wouldn't be where it is without all the contributions from our [dono
|
|
228 |
* Fixed: Taggable autocomplete works as expected again. #6182 (@sc0ttkclark)
|
229 |
* Fixed: ORDER BY basic field detection has been improved to prevent certain fields from using the incorrect alias. (@sc0ttkclark)
|
230 |
* Fixed: The `<ul>` used with checkbox inputs has been styled with `list-style:none` as it should be. (@sc0ttkclark)
|
231 |
-
* Fixed: Default the form output type to `div` if it's provided but empty. (@sc0ttkclark)
|
232 |
* Compatibility: Added compatibility for Enfold theme and public forms so that `wp-mediaelement` is not removed by the theme. #6188 (@sc0ttkclark)
|
233 |
* Tweak: Internal API - Storage and Storage Types used in the internal Pods code has been clarified to prevent ambiguity. Storage Types have been changed to Object Storage Types in all areas regarding Whatsit Storage). (@sc0ttkclark)
|
234 |
* Tweak: Public forms now have unique IDs added to them to help in custom CSS work. (@sc0ttkclark)
|
@@ -252,12 +257,12 @@ Read the full [Pods 2.8 Field Guide](https://pods.io/2021/02/11/pods-2-8-beta-1-
|
|
252 |
* Feature: Now you can add multiple groups of fields. (@sc0ttkclark, @zrothauser)
|
253 |
* Feature: Our Edit Pod screen is powered by our all new React form interfaces, tooltips, and they use our new Pods Admin REST API endpoints. (@sc0ttkclark, @zrothauser)
|
254 |
* Feature: All of our form fields are powered by React now in preparation for Pods 2.9 repeatable fields that we're working on next. (@sc0ttkclark, @zrothauser)
|
255 |
-
* Feature: New field types for Heading and HTML. (@sc0ttkclark, @zrothauser)
|
256 |
* Feature: New Pods Blocks available and the underlying Pods Block PHP API is compatible with ACF Blocks if you've ever used those before. (@sc0ttkclark, @zrothauser)
|
257 |
* Feature: REST API endpoints are now available to create/edit various objects: Pods, Pod Groups, and Pod Fields. (@sc0ttkclark)
|
258 |
* Feature: WP-CLI commands that mirror the REST API endpoints we have. (@sc0ttkclark)
|
259 |
* Feature: The new WYSIWYG editor option to use [Quill Editor](https://github.com/zenoamaro/react-quill) is now available and the CLEditor has been removed. (@sc0ttkclark, @zrothauser)
|
260 |
-
* Compatibility: Completely updated compatibility with WPML and Polylang plugins.
|
261 |
|
262 |
Our GitHub has the full list of all prior releases of Pods: https://github.com/pods-framework/pods/releases
|
263 |
|
5 |
Requires at least: 5.5
|
6 |
Tested up to: 5.8
|
7 |
Requires PHP: 5.6
|
8 |
+
Stable tag: 2.8.5
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
151 |
|
152 |
== Changelog ==
|
153 |
|
154 |
+
= 2.8.5 - November 17th, 2021 =
|
155 |
+
|
156 |
+
* Fixed: Resolved problems with old Pods 1.x upgrades not fully going away. (@sc0ttkclark)
|
157 |
+
* Fixed: Resolved problems with extended post types being overridden. (@sc0ttkclark)
|
158 |
+
|
159 |
= 2.8.4.1 - November 17th, 2021 =
|
160 |
|
161 |
* Fixed: Resolved issues where usage of `pods_group_add()` could produce errors which would stop the Edit Post screen from loading. (@sc0ttkclark)
|
162 |
|
163 |
= 2.8.4 - November 16th, 2021 =
|
164 |
|
165 |
+
* Added: Pods Field Value widget now supports using current post/term just like the Pods Single Item widget does. (@sc0ttkclark)
|
166 |
* Fixed: Checkbox dependencies for Pod options now show as expected when loading the Edit Pod screen for a newly created Pod. #6255 #6291 (@zrothauser)
|
167 |
* Fixed: "/" is now specifically disallowed from being used for the custom rewrite slug on a post type or taxonomy to prevent rewrite conflicts. #5744 (@sc0ttkclark, @dingman)
|
168 |
* Fixed: Advanced Filters pop-up now shows without showing the unused scrollbars in most cases. #6264 (@sc0ttkclark)
|
181 |
* Fixed: Placeholder values are properly inherited based on field type specific options. #6289 (@JoryHogeveen, @sc0ttkclark)
|
182 |
* Fixed: REST API fields now correctly check the right field option for whether fields should be individually shown. #6288 (@JoryHogeveen)
|
183 |
* Fixed: Relationship traversal now properly handle selection limit if more than the original field. #6243 (@sc0ttkclark)
|
184 |
+
* Fixed: Prevent potential conflicts when a plugin uses `$post->content` instead of `$post->post_content` to get the content of a post. Pods no longer checks objet field aliases with `get_post_meta()` and directly integrated metadata function calls. (@sc0ttkclark)
|
185 |
* Fixed: Fix `orderby` PHP notices for `in_array()` checks on field id and field index. (@sc0ttkclark)
|
186 |
* Fixed: Better checks for Pod objects existing in PodsMeta. (@sc0ttkclark)
|
187 |
* Fixed: Removed the "Extra Fields" option (old WP compatibility option) for Custom Taxonomies on the Pods Admin > Add New screen. (@sc0ttkclark)
|
233 |
* Fixed: Taggable autocomplete works as expected again. #6182 (@sc0ttkclark)
|
234 |
* Fixed: ORDER BY basic field detection has been improved to prevent certain fields from using the incorrect alias. (@sc0ttkclark)
|
235 |
* Fixed: The `<ul>` used with checkbox inputs has been styled with `list-style:none` as it should be. (@sc0ttkclark)
|
236 |
+
* Fixed: Default the form output type to `div` if it's provided but empty. (@sc0ttkclark)
|
237 |
* Compatibility: Added compatibility for Enfold theme and public forms so that `wp-mediaelement` is not removed by the theme. #6188 (@sc0ttkclark)
|
238 |
* Tweak: Internal API - Storage and Storage Types used in the internal Pods code has been clarified to prevent ambiguity. Storage Types have been changed to Object Storage Types in all areas regarding Whatsit Storage). (@sc0ttkclark)
|
239 |
* Tweak: Public forms now have unique IDs added to them to help in custom CSS work. (@sc0ttkclark)
|
257 |
* Feature: Now you can add multiple groups of fields. (@sc0ttkclark, @zrothauser)
|
258 |
* Feature: Our Edit Pod screen is powered by our all new React form interfaces, tooltips, and they use our new Pods Admin REST API endpoints. (@sc0ttkclark, @zrothauser)
|
259 |
* Feature: All of our form fields are powered by React now in preparation for Pods 2.9 repeatable fields that we're working on next. (@sc0ttkclark, @zrothauser)
|
260 |
+
* Feature: New field types for Heading and HTML. (@sc0ttkclark, @zrothauser)
|
261 |
* Feature: New Pods Blocks available and the underlying Pods Block PHP API is compatible with ACF Blocks if you've ever used those before. (@sc0ttkclark, @zrothauser)
|
262 |
* Feature: REST API endpoints are now available to create/edit various objects: Pods, Pod Groups, and Pod Fields. (@sc0ttkclark)
|
263 |
* Feature: WP-CLI commands that mirror the REST API endpoints we have. (@sc0ttkclark)
|
264 |
* Feature: The new WYSIWYG editor option to use [Quill Editor](https://github.com/zenoamaro/react-quill) is now available and the CLEditor has been removed. (@sc0ttkclark, @zrothauser)
|
265 |
+
* Compatibility: Completely updated compatibility with WPML and Polylang plugins.
|
266 |
|
267 |
Our GitHub has the full list of all prior releases of Pods: https://github.com/pods-framework/pods/releases
|
268 |
|
src/Pods/Whatsit/Pod.php
CHANGED
@@ -47,7 +47,7 @@ class Pod extends Whatsit {
|
|
47 |
$value = parent::get_arg( $arg, $default, $strict );
|
48 |
|
49 |
// Better handle object for extended objects.
|
50 |
-
if ( 'object' === $arg && 'table' !== $this->get_type() ) {
|
51 |
if ( $this->is_extended() ) {
|
52 |
return $this->get_name();
|
53 |
}
|
@@ -166,7 +166,7 @@ class Pod extends Whatsit {
|
|
166 |
$existing_cached = $static_cache->get( $type, 'PodsInit/existing_content_types' );
|
167 |
|
168 |
// Check if we need to refresh the content types cache.
|
169 |
-
if ( empty( $existing_cached ) || ! is_array( $existing_cached ) ) {
|
170 |
pods_init()->refresh_existing_content_types_cache();
|
171 |
|
172 |
$existing_cached = (array) $static_cache->get( $type, 'PodsInit/existing_content_types' );
|
47 |
$value = parent::get_arg( $arg, $default, $strict );
|
48 |
|
49 |
// Better handle object for extended objects.
|
50 |
+
if ( 'object' === $arg && 'table' !== $this->get_type() && ( did_action( 'init' ) || doing_action( 'init' ) ) ) {
|
51 |
if ( $this->is_extended() ) {
|
52 |
return $this->get_name();
|
53 |
}
|
166 |
$existing_cached = $static_cache->get( $type, 'PodsInit/existing_content_types' );
|
167 |
|
168 |
// Check if we need to refresh the content types cache.
|
169 |
+
if ( empty( $existing_cached ) || ! is_array( $existing_cached ) || ! did_action( 'init' ) ) {
|
170 |
pods_init()->refresh_existing_content_types_cache();
|
171 |
|
172 |
$existing_cached = (array) $static_cache->get( $type, 'PodsInit/existing_content_types' );
|