Pods – Custom Content Types and Fields - Version 2.8.15

Version Description

  • April 16th, 2022 =

  • Added: New pods_callback support in Pods::find() so that you can pass a callback function to use for pods() usage with relationships using the output as "pods". This allows for using shared instances across large data sets to reduce time. (@sc0ttkclark)

  • Added: New property $data->fetch_full added to PodsData which can be used to turn off additional fetch requests when all of the table data was already returned by the query with t.*. (@sc0ttkclark)

  • Fixed: When using table-based fields and a non-simple relationship has a field in the table, it will still be expanded like a normal relationship field when requesting it by name with no traversal. (@sc0ttkclark)

  • Fixed: Call PodsField_Pick::simple_objects() using the object instead of statically to prevent PHP notices. (@sc0ttkclark)

  • Fixed: Adjust the Pods\REST\V1\Endpoints\Base::check_permission() method so that it references the correct \Pods object. (@sc0ttkclark)

Download this release

Release Info

Developer sc0ttkclark
Plugin Icon 128x128 Pods – Custom Content Types and Fields
Version 2.8.15
Comparing to
See all releases

Code changes from version 2.8.14 to 2.8.15

classes/Pods.php CHANGED
@@ -567,6 +567,7 @@ class Pods implements Iterator {
567
  'display_process_individually' => false,
568
  'get_meta' => false,
569
  'output' => null,
 
570
  'deprecated' => false,
571
  'keyed' => false,
572
  // extra data to send to field handlers.
@@ -619,6 +620,10 @@ class Pods implements Iterator {
619
  $params->output .= 's';
620
  }
621
 
 
 
 
 
622
  // Support old $orderby variable.
623
  if ( null !== $params->single && is_string( $params->single ) && empty( $params->orderby ) ) {
624
  if ( ! class_exists( 'Deprecated_Pod' ) || Deprecated_Pod::$deprecated_notice ) {
@@ -786,6 +791,19 @@ class Pods implements Iterator {
786
  $params->output = 'arrays';
787
  }
788
 
 
 
 
 
 
 
 
 
 
 
 
 
 
789
  // Enforce output type for tableless fields in forms.
790
  if ( empty( $value ) && $is_tableless_field ) {
791
  $params->raw = true;
@@ -811,10 +829,10 @@ class Pods implements Iterator {
811
  }
812
 
813
  if (
814
- ! $override_object_field &&
815
- empty( $value ) &&
816
- isset( $this->data->row[ $params->name ] ) &&
817
- ( ! $is_tableless_field || 'arrays' === $params->output )
818
  ) {
819
  if ( empty( $field_data ) || in_array( $field_type, [
820
  'boolean',
@@ -1186,10 +1204,11 @@ class Pods implements Iterator {
1186
  $is_field_output_full = true;
1187
  }
1188
 
 
1189
  if ( 'pod' === $object_type ) {
1190
- $related_obj = pods( $object, null, false );
1191
  } elseif ( ! empty( $table['pod'] ) ) {
1192
- $related_obj = pods( $table['pod']['name'], null, false );
1193
  }
1194
 
1195
  if ( $table && ( $related_obj || ! empty( $table['table'] ) ) ) {
@@ -1314,10 +1333,11 @@ class Pods implements Iterator {
1314
  $item = (object) $item;
1315
  }//end if
1316
  } elseif ( 'pods' === $params->output ) {
 
1317
  if ( in_array( $object_type, array( 'user', 'media' ), true ) ) {
1318
- $item = pods( $object_type, (int) $item_id );
1319
  } else {
1320
- $item = pods( $object, (int) $item_id );
1321
  }
1322
 
1323
  if ( ! $item || ! $item->valid() ) {
567
  'display_process_individually' => false,
568
  'get_meta' => false,
569
  'output' => null,
570
+ 'pods_callback' => 'pods',
571
  'deprecated' => false,
572
  'keyed' => false,
573
  // extra data to send to field handlers.
620
  $params->output .= 's';
621
  }
622
 
623
+ if ( empty( $params->pods_callback ) || ! is_callable( $params->pods_callback ) ) {
624
+ $params->pods_callback = 'pods';
625
+ }
626
+
627
  // Support old $orderby variable.
628
  if ( null !== $params->single && is_string( $params->single ) && empty( $params->orderby ) ) {
629
  if ( ! class_exists( 'Deprecated_Pod' ) || Deprecated_Pod::$deprecated_notice ) {
791
  $params->output = 'arrays';
792
  }
793
 
794
+ $is_tableless_field_and_not_simple = (
795
+ ! $is_traversal
796
+ && $field_data
797
+ && ! $field_data instanceof Object_Field
798
+ && $is_tableless_field
799
+ && ! $field_data->is_simple_relationship()
800
+ );
801
+
802
+ // If a relationship is returned from the table as an ID but the parameter is not traversal, we need to run traversal logic.
803
+ if ( $is_tableless_field_and_not_simple && isset( $this->data->row[ $params->name ] ) && ! is_array( $this->data->row[ $params->name ] ) ) {
804
+ unset( $this->data->row[ $params->name ] );
805
+ }
806
+
807
  // Enforce output type for tableless fields in forms.
808
  if ( empty( $value ) && $is_tableless_field ) {
809
  $params->raw = true;
829
  }
830
 
831
  if (
832
+ ! $override_object_field
833
+ && empty( $value )
834
+ && isset( $this->data->row[ $params->name ] )
835
+ && ( ! $is_tableless_field || 'arrays' === $params->output )
836
  ) {
837
  if ( empty( $field_data ) || in_array( $field_type, [
838
  'boolean',
1204
  $is_field_output_full = true;
1205
  }
1206
 
1207
+ /** @var Pods $related_obj */
1208
  if ( 'pod' === $object_type ) {
1209
+ $related_obj = call_user_func( $params->pods_callback, $object, null, false );
1210
  } elseif ( ! empty( $table['pod'] ) ) {
1211
+ $related_obj = call_user_func( $params->pods_callback, $table['pod']['name'], null, false );
1212
  }
1213
 
1214
  if ( $table && ( $related_obj || ! empty( $table['table'] ) ) ) {
1333
  $item = (object) $item;
1334
  }//end if
1335
  } elseif ( 'pods' === $params->output ) {
1336
+ /** @var Pods $item */
1337
  if ( in_array( $object_type, array( 'user', 'media' ), true ) ) {
1338
+ $item = call_user_func( $params->pods_callback, $object_type, (int) $item_id );
1339
  } else {
1340
+ $item = call_user_func( $params->pods_callback, $object, (int) $item_id );
1341
  }
1342
 
1343
  if ( ! $item || ! $item->valid() ) {
classes/PodsData.php CHANGED
@@ -49,6 +49,11 @@ class PodsData {
49
  */
50
  public static $display_errors = true;
51
 
 
 
 
 
 
52
  /**
53
  * @var PodsAPI
54
  */
@@ -2025,7 +2030,7 @@ class PodsData {
2025
  * @param bool $fetch_full Whether to fetch the full row.
2026
  * @param PodsData $pods_data The PodsData object.
2027
  */
2028
- $fetch_full = (bool) apply_filters( 'pods_data_fetch_full', true, $this );
2029
 
2030
  if ( $fetch_full && ( null !== $row || ( $this->pod_data && 'settings' === $this->pod_data['type'] ) ) ) {
2031
  if ( $explicit_set ) {
49
  */
50
  public static $display_errors = true;
51
 
52
+ /**
53
+ * @var bool
54
+ */
55
+ public $fetch_full = true;
56
+
57
  /**
58
  * @var PodsAPI
59
  */
2030
  * @param bool $fetch_full Whether to fetch the full row.
2031
  * @param PodsData $pods_data The PodsData object.
2032
  */
2033
+ $fetch_full = (bool) apply_filters( 'pods_data_fetch_full', $this->fetch_full, $this );
2034
 
2035
  if ( $fetch_full && ( null !== $row || ( $this->pod_data && 'settings' === $this->pod_data['type'] ) ) ) {
2036
  if ( $explicit_set ) {
classes/fields/pick.php CHANGED
@@ -258,7 +258,7 @@ class PodsField_Pick extends PodsField {
258
  static::$type . '_object' => array_merge( [
259
  'site',
260
  'network',
261
- ], self::simple_objects() ),
262
  static::$type . '_allow_add_new' => false,
263
  ],
264
  'type' => 'boolean',
@@ -272,7 +272,7 @@ class PodsField_Pick extends PodsField {
272
  static::$type . '_format_multi' => 'list',
273
  ],
274
  'excludes-on' => [
275
- static::$type . '_object' => array_merge( [ 'site', 'network' ], self::simple_objects() ),
276
  ],
277
  'type' => 'boolean',
278
  'default' => 1,
@@ -285,7 +285,7 @@ class PodsField_Pick extends PodsField {
285
  static::$type . '_format_multi' => 'list',
286
  ],
287
  'excludes-on' => [
288
- static::$type . '_object' => array_merge( [ 'site', 'network' ], self::simple_objects() ),
289
  ],
290
  'type' => 'boolean',
291
  'default' => 1,
@@ -298,7 +298,7 @@ class PodsField_Pick extends PodsField {
298
  static::$type . '_format_multi' => 'list',
299
  ],
300
  'excludes-on' => [
301
- static::$type . '_object' => array_merge( [ 'site', 'network' ], self::simple_objects() ),
302
  ],
303
  'type' => 'boolean',
304
  'default' => 1,
@@ -347,7 +347,7 @@ class PodsField_Pick extends PodsField {
347
  'label' => __( 'Display Field in Selection List', 'pods' ),
348
  'help' => __( 'Provide the name of a field on the related object to reference, example: {@post_title}', 'pods' ) . ' ' . $fallback_help,
349
  'excludes-on' => [
350
- static::$type . '_object' => array_merge( [ 'site', 'network' ], self::simple_objects() ),
351
  ],
352
  'default' => '',
353
  'type' => 'text',
@@ -367,7 +367,7 @@ class PodsField_Pick extends PodsField {
367
  'label' => __( 'Customized <em>WHERE</em>', 'pods' ),
368
  'help' => $fallback_help,
369
  'excludes-on' => [
370
- static::$type . '_object' => array_merge( [ 'site', 'network' ], self::simple_objects() ),
371
  ],
372
  'default' => '',
373
  'type' => 'text',
@@ -376,7 +376,7 @@ class PodsField_Pick extends PodsField {
376
  'label' => __( 'Customized <em>ORDER BY</em>', 'pods' ),
377
  'help' => $fallback_help,
378
  'excludes-on' => [
379
- static::$type . '_object' => array_merge( [ 'site', 'network' ], self::simple_objects() ),
380
  ],
381
  'default' => '',
382
  'type' => 'text',
@@ -385,7 +385,7 @@ class PodsField_Pick extends PodsField {
385
  'label' => __( 'Customized <em>GROUP BY</em>', 'pods' ),
386
  'help' => $fallback_help,
387
  'excludes-on' => [
388
- static::$type . '_object' => array_merge( [ 'site', 'network' ], self::simple_objects() ),
389
  ],
390
  'default' => '',
391
  'type' => 'text',
@@ -2005,7 +2005,7 @@ class PodsField_Pick extends PodsField {
2005
  */
2006
  public function simple_value( $name, $value = null, $options = null, $pod = null, $id = null, $raw = false ) {
2007
 
2008
- if ( in_array( pods_v( static::$type . '_object', $options ), self::simple_objects(), true ) ) {
2009
  if ( ! is_array( $value ) && 0 < strlen( $value ) ) {
2010
  $simple = @json_decode( $value, true );
2011
 
258
  static::$type . '_object' => array_merge( [
259
  'site',
260
  'network',
261
+ ], $this->simple_objects() ),
262
  static::$type . '_allow_add_new' => false,
263
  ],
264
  'type' => 'boolean',
272
  static::$type . '_format_multi' => 'list',
273
  ],
274
  'excludes-on' => [
275
+ static::$type . '_object' => array_merge( [ 'site', 'network' ], $this->simple_objects() ),
276
  ],
277
  'type' => 'boolean',
278
  'default' => 1,
285
  static::$type . '_format_multi' => 'list',
286
  ],
287
  'excludes-on' => [
288
+ static::$type . '_object' => array_merge( [ 'site', 'network' ], $this->simple_objects() ),
289
  ],
290
  'type' => 'boolean',
291
  'default' => 1,
298
  static::$type . '_format_multi' => 'list',
299
  ],
300
  'excludes-on' => [
301
+ static::$type . '_object' => array_merge( [ 'site', 'network' ], $this->simple_objects() ),
302
  ],
303
  'type' => 'boolean',
304
  'default' => 1,
347
  'label' => __( 'Display Field in Selection List', 'pods' ),
348
  'help' => __( 'Provide the name of a field on the related object to reference, example: {@post_title}', 'pods' ) . ' ' . $fallback_help,
349
  'excludes-on' => [
350
+ static::$type . '_object' => array_merge( [ 'site', 'network' ], $this->simple_objects() ),
351
  ],
352
  'default' => '',
353
  'type' => 'text',
367
  'label' => __( 'Customized <em>WHERE</em>', 'pods' ),
368
  'help' => $fallback_help,
369
  'excludes-on' => [
370
+ static::$type . '_object' => array_merge( [ 'site', 'network' ], $this->simple_objects() ),
371
  ],
372
  'default' => '',
373
  'type' => 'text',
376
  'label' => __( 'Customized <em>ORDER BY</em>', 'pods' ),
377
  'help' => $fallback_help,
378
  'excludes-on' => [
379
+ static::$type . '_object' => array_merge( [ 'site', 'network' ], $this->simple_objects() ),
380
  ],
381
  'default' => '',
382
  'type' => 'text',
385
  'label' => __( 'Customized <em>GROUP BY</em>', 'pods' ),
386
  'help' => $fallback_help,
387
  'excludes-on' => [
388
+ static::$type . '_object' => array_merge( [ 'site', 'network' ], $this->simple_objects() ),
389
  ],
390
  'default' => '',
391
  'type' => 'text',
2005
  */
2006
  public function simple_value( $name, $value = null, $options = null, $pod = null, $id = null, $raw = false ) {
2007
 
2008
+ if ( in_array( pods_v( static::$type . '_object', $options ), $this->simple_objects(), true ) ) {
2009
  if ( ! is_array( $value ) && 0 < strlen( $value ) ) {
2010
  $simple = @json_decode( $value, true );
2011
 
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
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.14' );
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.15
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.15' );
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.9
7
  Requires PHP: 5.6
8
- Stable tag: 2.8.14
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -80,7 +80,7 @@ And many other relationships are also available including:
80
  = Optional Components to do even more =
81
  You can enable some of our included components to extend your WordPress site even further:
82
 
83
- * **Types-only Mode** - On our Pods Settings page, you can choose to disable creating custom fields for a performance boost if you only want to use Pods for content types or you plan on using it alongside of other custom field plugins
84
  * **Pods Templates** - Use our [template engine](https://docs.pods.io/displaying-pods/pods-templates/) to create templates that can be handed off to clients for care-free management
85
  * **Markdown Syntax** - Parses [Markdown Syntax](https://www.markdownguide.org/basic-syntax) for Paragraph Text / WYSIWYG fields
86
  * **Advanced Relationships** - Add even more relationship objects including Database Tables, Multisite Networks, Multisite Sites, Themes, Page Templates (in the theme), Sidebars, Post Type Objects, and Taxonomy Objects
@@ -156,6 +156,14 @@ Pods really wouldn't be where it is without all the contributions from our [dono
156
 
157
  == Changelog ==
158
 
 
 
 
 
 
 
 
 
159
  = 2.8.14 - April 15th, 2022 =
160
 
161
  * Added: New `$params` support in `Pods::total_found( $params )` to support `Pods::find( $params )` shorthand lookups for getting total number of records found more easily. (@sc0ttkclark)
@@ -164,7 +172,7 @@ Pods really wouldn't be where it is without all the contributions from our [dono
164
  * Added: New `pods_data_build_pre_traverse_args` filter allows for overriding the find/replace/traverse/params arguments for a `PodsData::build()` request before relationship traversal runs. (@sc0ttkclark)
165
  * Added: New `pods_data_traverse_recurse_handle_join` filter allows for overriding the JOIN SQL used for relationship traversal. (@sc0ttkclark)
166
  * Fixed: Resolved potential PHP issues with path checks in `PodsView` on certain environments. (@sc0ttkclark)
167
- * Fixed: When a slug is set on a Pods Page, if the slug value comes through as empty due to a path issue, it will now enforce a 404 as expected. (@sc0ttkclark)
168
  * Fixed: Resolved a few issues with the old field data coming through to the `pods_api_save_field_old_definition` filter. (@sc0ttkclark)
169
  * Fixed: No longer showing WPDB errors from WPDB when query errors are forced off. (@sc0ttkclark)
170
 
@@ -240,7 +248,7 @@ Pods really wouldn't be where it is without all the contributions from our [dono
240
  * Fixed: Pods Pages now loads the expected value for page_template when editing a Pod Page. #6355 (@sc0ttkclark)
241
  * Fixed: Pods Pages now loads the labels for Associated Pod when editing a Pod Page. #6355 (@sc0ttkclark)
242
  * Fixed: Prevent potential timeouts by reducing areas of conflict in `PodsMeta`. #6349 (@sc0ttkclark)
243
- * Fixed: Resolved potential performance issues / timeouts with large datasets and many Pods Blocks when loading Block Editor by adding the filter `pods_blocks_types_preload_block` and returning `false` to disable preloading blocks on load of the edit post screen. #6349 (@sc0ttkclark)
244
  * Fixed: Enforce slug characters on registration of post type / taxonomy instead of the admin config field for Custom Rewrite Slug and Archive Page Slug Override. #6354 (@sc0ttkclark)
245
  * Fixed: Resolve issues with `PodsAPI::save_field()` when trying to save a field just using the name, now you can pass the `override` parameter as true to bypass duplicate field checks to force saving as matching field. #6345 (@sc0ttkclark)
246
  * Fixed: More robust checking for conflicts with extended post types and taxonomies before registering them. #6348 #6342 (@sc0ttkclark)
@@ -256,7 +264,7 @@ Pods really wouldn't be where it is without all the contributions from our [dono
256
 
257
  * Security: Escape/KSES labels and descriptions in more places. (@sc0ttkclark)
258
  * Tweak: Added bbPress profile form support so that Pods fields appear like the other form fields. (@sc0ttkclark)
259
- * Tweak: Added ability enable more consistent responses with REST API relationship depths. Filter `pods_api_export_pod_item_level_export_ids_at_final_depth` and return true to only export IDs at the final depth (note: depth set as 1 always returns IDs). #6260 (@sc0ttkclark)
260
  * Tweak: Added ability to force checking if a Pod has orphan fields that aren't assigned to groups and setting them to the first group. Add `pods_debug_find_orphan_fields=1` to the URL when editing a pod. (@sc0ttkclark)
261
  * Tweak: Implement Block schema for Pods blocks and set the icons to use dashicons for WordPress.org. (@sc0ttkclark)
262
  * Tweak: Improve performance by only checking a Pod once for a field when filtering meta related functions. (@sc0ttkclark)
5
  Requires at least: 5.5
6
  Tested up to: 5.9
7
  Requires PHP: 5.6
8
+ Stable tag: 2.8.15
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
80
  = Optional Components to do even more =
81
  You can enable some of our included components to extend your WordPress site even further:
82
 
83
+ * **Types-only Mode** - On our Pods Settings page, you can choose to disable creating custom fields for a performance boost if you only want to use Pods for content types or you plan on using it alongside of other custom field plugins
84
  * **Pods Templates** - Use our [template engine](https://docs.pods.io/displaying-pods/pods-templates/) to create templates that can be handed off to clients for care-free management
85
  * **Markdown Syntax** - Parses [Markdown Syntax](https://www.markdownguide.org/basic-syntax) for Paragraph Text / WYSIWYG fields
86
  * **Advanced Relationships** - Add even more relationship objects including Database Tables, Multisite Networks, Multisite Sites, Themes, Page Templates (in the theme), Sidebars, Post Type Objects, and Taxonomy Objects
156
 
157
  == Changelog ==
158
 
159
+ = 2.8.15 - April 16th, 2022 =
160
+
161
+ * Added: New `pods_callback` support in `Pods::find()` so that you can pass a callback function to use for `pods()` usage with relationships using the `output` as "pods". This allows for using shared instances across large data sets to reduce time. (@sc0ttkclark)
162
+ * Added: New property `$data->fetch_full` added to `PodsData` which can be used to turn off additional fetch requests when all of the table data was already returned by the query with `t.*`. (@sc0ttkclark)
163
+ * Fixed: When using table-based fields and a non-simple relationship has a field in the table, it will still be expanded like a normal relationship field when requesting it by name with no traversal. (@sc0ttkclark)
164
+ * Fixed: Call `PodsField_Pick::simple_objects()` using the object instead of statically to prevent PHP notices. (@sc0ttkclark)
165
+ * Fixed: Adjust the `Pods\REST\V1\Endpoints\Base::check_permission()` method so that it references the correct `\Pods` object. (@sc0ttkclark)
166
+
167
  = 2.8.14 - April 15th, 2022 =
168
 
169
  * Added: New `$params` support in `Pods::total_found( $params )` to support `Pods::find( $params )` shorthand lookups for getting total number of records found more easily. (@sc0ttkclark)
172
  * Added: New `pods_data_build_pre_traverse_args` filter allows for overriding the find/replace/traverse/params arguments for a `PodsData::build()` request before relationship traversal runs. (@sc0ttkclark)
173
  * Added: New `pods_data_traverse_recurse_handle_join` filter allows for overriding the JOIN SQL used for relationship traversal. (@sc0ttkclark)
174
  * Fixed: Resolved potential PHP issues with path checks in `PodsView` on certain environments. (@sc0ttkclark)
175
+ * Fixed: When a slug is set on a Pods Page, if the slug value comes through as empty due to a path issue, it will now enforce a 404 as expected. (@sc0ttkclark)
176
  * Fixed: Resolved a few issues with the old field data coming through to the `pods_api_save_field_old_definition` filter. (@sc0ttkclark)
177
  * Fixed: No longer showing WPDB errors from WPDB when query errors are forced off. (@sc0ttkclark)
178
 
248
  * Fixed: Pods Pages now loads the expected value for page_template when editing a Pod Page. #6355 (@sc0ttkclark)
249
  * Fixed: Pods Pages now loads the labels for Associated Pod when editing a Pod Page. #6355 (@sc0ttkclark)
250
  * Fixed: Prevent potential timeouts by reducing areas of conflict in `PodsMeta`. #6349 (@sc0ttkclark)
251
+ * Fixed: Resolved potential performance issues / timeouts with large datasets and many Pods Blocks when loading Block Editor by adding the filter `pods_blocks_types_preload_block` and returning `false` to disable preloading blocks on load of the edit post screen. #6349 (@sc0ttkclark)
252
  * Fixed: Enforce slug characters on registration of post type / taxonomy instead of the admin config field for Custom Rewrite Slug and Archive Page Slug Override. #6354 (@sc0ttkclark)
253
  * Fixed: Resolve issues with `PodsAPI::save_field()` when trying to save a field just using the name, now you can pass the `override` parameter as true to bypass duplicate field checks to force saving as matching field. #6345 (@sc0ttkclark)
254
  * Fixed: More robust checking for conflicts with extended post types and taxonomies before registering them. #6348 #6342 (@sc0ttkclark)
264
 
265
  * Security: Escape/KSES labels and descriptions in more places. (@sc0ttkclark)
266
  * Tweak: Added bbPress profile form support so that Pods fields appear like the other form fields. (@sc0ttkclark)
267
+ * Tweak: Added ability enable more consistent responses with REST API relationship depths. Filter `pods_api_export_pod_item_level_export_ids_at_final_depth` and return true to only export IDs at the final depth (note: depth set as 1 always returns IDs). #6260 (@sc0ttkclark)
268
  * Tweak: Added ability to force checking if a Pod has orphan fields that aren't assigned to groups and setting them to the first group. Add `pods_debug_find_orphan_fields=1` to the URL when editing a pod. (@sc0ttkclark)
269
  * Tweak: Implement Block schema for Pods blocks and set the icons to use dashicons for WordPress.org. (@sc0ttkclark)
270
  * Tweak: Improve performance by only checking a Pod once for a field when filtering meta related functions. (@sc0ttkclark)
src/Pods/REST/V1/Endpoints/Base.php CHANGED
@@ -2,6 +2,7 @@
2
 
3
  namespace Pods\REST\V1\Endpoints;
4
 
 
5
  use Exception;
6
  use Pods\Whatsit;
7
  use Tribe__REST__Messages_Interface as Messages_Interface;
@@ -782,7 +783,7 @@ abstract class Base {
782
  $registered = register_rest_route( $namespace, $rest_route, $methods );
783
 
784
  // Maybe register route with the documentation handler.
785
- if ( $registered ) {
786
  $rest_doc_route = $this->route;
787
 
788
  if ( ! empty( $this->rest_doc_route ) ) {
2
 
3
  namespace Pods\REST\V1\Endpoints;
4
 
5
+ use Pods;
6
  use Exception;
7
  use Pods\Whatsit;
8
  use Tribe__REST__Messages_Interface as Messages_Interface;
783
  $registered = register_rest_route( $namespace, $rest_route, $methods );
784
 
785
  // Maybe register route with the documentation handler.
786
+ if ( $registered && $add_to_docs ) {
787
  $rest_doc_route = $this->route;
788
 
789
  if ( ! empty( $this->rest_doc_route ) ) {