Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pods 3.2.7 #7331

Merged
merged 71 commits into from
Aug 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
6d74f29
Add fallback for clipboard.writeText
heybran Jun 21, 2024
7ef89e5
Toggle add file button on single file field
heybran Jun 21, 2024
e25db13
Set version to 3.2.7-a-1
sc0ttkclark Jul 22, 2024
5e7b3cb
Pick Sync Taxonomy: Checkbox & Unblock
pdclark Aug 15, 2024
c347208
Wrap pagination in a p tag instead of just spans
sc0ttkclark Aug 18, 2024
fe2671d
Add context to shortcode usage by Blocks
sc0ttkclark Aug 18, 2024
21cd97b
Add debug logging action-based support for Pods
sc0ttkclark Aug 18, 2024
2d8c301
Call wp_cache_flush() in addition to the normal clear Pods caches whe…
sc0ttkclark Aug 18, 2024
4a167c2
Adjust text for access rights message so it’s more clear
sc0ttkclark Aug 18, 2024
47b46f3
Support linking field values in the Pods Field Value block
sc0ttkclark Aug 18, 2024
696f5a0
Clean up PodsData::select() so that it can cache total found and othe…
sc0ttkclark Aug 18, 2024
2fd7434
Add new Pods Related Item List block to display items from a related …
sc0ttkclark Aug 18, 2024
4bc165d
Add more integration for Query Monitor and display Pods constants and…
sc0ttkclark Aug 18, 2024
f9b84e1
REST API fixes for working with the Pod object
sc0ttkclark Aug 18, 2024
247e180
Add Query Monitor CSS to allow filtering the debug log and move it in…
sc0ttkclark Aug 18, 2024
bb596e5
Fix inheritDoc usage
sc0ttkclark Aug 18, 2024
efaa10c
Update phpcs
sc0ttkclark Aug 18, 2024
4c8f25e
Update test
sc0ttkclark Aug 18, 2024
f76a670
Fix phpstan
sc0ttkclark Aug 18, 2024
013ea67
Phpstan fixes
sc0ttkclark Aug 18, 2024
31d72b0
Fix php issue
sc0ttkclark Aug 18, 2024
670079f
Fix phpstan exclude path
sc0ttkclark Aug 18, 2024
0ff135e
More phpstan fixes
sc0ttkclark Aug 18, 2024
32d62a7
Fix slug/id check for tests
sc0ttkclark Aug 18, 2024
9357c2d
Fix exists checks
sc0ttkclark Aug 18, 2024
ff55e29
Enqueue assets for QM through correct hook
sc0ttkclark Aug 19, 2024
c9095f0
Handle debug log calls more uniformly
sc0ttkclark Aug 19, 2024
54e0020
Support filter_var to handle namespacing search/filtering across diff…
sc0ttkclark Aug 19, 2024
0bace07
Update filters to always show select text even when value is set
sc0ttkclark Aug 19, 2024
5aac0c6
More debug points
sc0ttkclark Aug 19, 2024
a061600
Add source to block shortcode usage
sc0ttkclark Aug 19, 2024
c0f0663
Add QM backtrace support
sc0ttkclark Aug 19, 2024
2913b34
Filters work for shortcodes
sc0ttkclark Aug 19, 2024
78c9a2f
More debug points and pass shortcode inner content into template_cust…
sc0ttkclark Aug 19, 2024
d5c5c1b
Exclude static cache from nocache handling
sc0ttkclark Aug 19, 2024
76caf18
Reset items loop before running Pods template
sc0ttkclark Aug 19, 2024
fea6f2d
Add helpful filter functions
sc0ttkclark Aug 19, 2024
4e5b0b1
Discard changes to ui/js/dfv/pods-dfv.min.js
sc0ttkclark Aug 27, 2024
db52c94
Discard changes to ui/js/dfv/pods-dfv.min.asset.json
sc0ttkclark Aug 27, 2024
4a80b15
Discard changes to ui/js/blocks/pods-blocks-api.min.js
sc0ttkclark Aug 27, 2024
371a07b
Discard changes to ui/js/blocks/pods-blocks-api.min.asset.json
sc0ttkclark Aug 27, 2024
b4f492c
Fix: Add fallback for clipboard.writeText (#7314)
sc0ttkclark Aug 27, 2024
5766add
Discard changes to ui/js/blocks/pods-blocks-api.min.asset.json
sc0ttkclark Aug 27, 2024
8219d6e
Discard changes to ui/js/blocks/pods-blocks-api.min.js
sc0ttkclark Aug 27, 2024
69d4c3a
Discard changes to ui/js/dfv/pods-dfv.min.asset.json
sc0ttkclark Aug 27, 2024
24f6bc1
Discard changes to ui/js/dfv/pods-dfv.min.js
sc0ttkclark Aug 27, 2024
f9f92d7
Discard changes to ui/styles/dist/pods.css
sc0ttkclark Aug 27, 2024
35e9f52
Discard changes to ui/styles/dist/pods-form.css
sc0ttkclark Aug 27, 2024
9171ecb
Enhancement: Toggle add file button on single file field (#7315)
sc0ttkclark Aug 27, 2024
7e07a50
Auto rebuild assets
sc0ttkclark Aug 27, 2024
efa97df
Auto rebuild assets
PodsBot Aug 27, 2024
68fc2bc
Remove deprecated PHP support and add todos for complete code removal…
sc0ttkclark Aug 28, 2024
8b2b87c
Relationship Field Sync Taxonomy: Checkbox & Unblock Sync (#7336)
sc0ttkclark Aug 28, 2024
32af949
Further improve the Taxonomy sync option and include new option to hi…
sc0ttkclark Aug 28, 2024
b7c0a0f
Auto rebuild assets
sc0ttkclark Aug 28, 2024
7a35076
Fix invalid default value
JoryHogeveen Aug 22, 2024
9f71c66
Fix alignment (phpcs)
JoryHogeveen Aug 22, 2024
55fa1a1
Fix backcompat handling
sc0ttkclark Aug 28, 2024
9a16ab9
REST API Write access - Fix invalid default value (#7339)
sc0ttkclark Aug 28, 2024
44e1cb0
Improve REST authentication method
JoryHogeveen Aug 22, 2024
c7d542d
Fix phpcs
JoryHogeveen Aug 22, 2024
5d26a32
Use static cache so the REST user authenticated can be test-friendly
sc0ttkclark Aug 28, 2024
3a5cf0a
Improve REST authentication method when registering fields (#7341)
sc0ttkclark Aug 28, 2024
6b3d4c5
Wrap pagination for shortcode/block renders
sc0ttkclark Aug 28, 2024
2cf5a70
Add changelog for the release
sc0ttkclark Aug 28, 2024
64e8dff
Update version
sc0ttkclark Aug 28, 2024
a749bce
Update wporg version(s)
sc0ttkclark Aug 28, 2024
6274a8e
Use var to pass to pagination
sc0ttkclark Aug 28, 2024
091c677
Update TBD
sc0ttkclark Aug 28, 2024
a4c3365
Phpstan fixes
sc0ttkclark Aug 28, 2024
3a45454
Phpstan fixes
sc0ttkclark Aug 28, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,24 @@ 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.7 - August 28th, 2024 =

* Feature: New Pods Related Item List block that works like a Pods Item List block but uses the Pods Single Item block context where you specify a relationship field name to reference. (@sc0ttkclark)
* Feature: You can now link field value output from Pods Field Value block to any website field or just use `permalink` to link to the current item of the field. Works with single select relationship field as the link reference. (@sc0ttkclark)
* Feature: Add support for having multiple filters/pagination on the same page when using Pods shortcodes/blocks. (@sc0ttkclark)
* Feature: When a relationship field is using Taxonomy syncing, you can not choose to hide the Taxonomy UI from the Block Editor and Classic Editor. (@sc0ttkclark)
* Feature: New support for Query Monitor now shows Pods debug logs in a QM panel. (@sc0ttkclark)
* Tweak: Toggle add file button on single file field depending on whether a file is provided yet. #7315 (@heybran)
* Tweak: Added a `<p>` wrapper for the span-based pagination. (@sc0ttkclark)
* Removed: PHP support for Pod Templates and Pod Pages has been finally turned off by default (`PODS_DISABLE_EVAL` constant set to `false` can be used to re-enable it). It will be completely removed in Pods 3.3 after being deprecated in Pods 2.3. (@sc0ttkclark)
* Fixed: Improve REST authentication method to support other auth forms when registering fields. #7340 #7341 (@JoryHogeveen, @sc0ttkclark)
* Fixed: Fix invalid default value for REST API `write_all` option. #7339 (@JoryHogeveen)
* Fixed: Resolve issue with Taxonomy syncing for relationship fields. #7336 #7334 (@pdclark, @sc0ttkclark)
* Fixed: Add fallback for clipboard.writeText. #7314 (@heybran)
* Fixed: Reset items loop before running the fetch loop in `Pods::template()` and the Templates component. (@sc0ttkclark)
* Fixed: Resolve issues with cached queries in PodsData not having the correct corresponding total found for pagination. (@sc0ttkclark)
* Fixed: More phpstan/phpcs fixes across the codebase. (@sc0ttkclark)

= 3.2.6 - July 22nd, 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)
Expand Down
68 changes: 44 additions & 24 deletions classes/Pods.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
* @property null|string $search Whether search is enabled.
* @property null|string $search_var The query variable used for search.
* @property null|string $search_mode The search mode to use.
* @property null|string $params The last find() params.
* @property null|string $filter_var The query variable used for filters.
* @property null|array $params The last find() params.
* @property null|string $sql The last find() SQL query.
*/
class Pods implements Iterator {
Expand Down Expand Up @@ -1349,11 +1350,19 @@ public function field( $name, $single = null, $raw = false ) {

$item_data = array();

// Debug purposes
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[phpcs] reported by reviewdog 🐶
Squiz.Commenting.InlineComment.InvalidEndChar
Inline comments must end in full-stops, exclamation marks, or question marks

if ( 1 == pods_v( 'pods_debug_params_all', 'get', 0 ) && pods_is_admin( array( 'pods' ) ) ) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[phpcs] reported by reviewdog 🐶
Generic.Arrays.DisallowLongArraySyntax.Found
Short array syntax must be used to define arrays

pods_debug( __METHOD__ . ':' . __LINE__ );
pods_debug( $sql );
}

if ( ! $related_obj || ! $related_obj->valid() ) {
if ( ! is_object( $this->alt_data ) ) {
$this->alt_data = pods_data();
}

pods_debug_log_data( [ 'field_name' => $params->name, 'sql' => $sql ], 'related-field-params', __METHOD__, __LINE__ );
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[phpcs] reported by reviewdog 🐶
WordPress.Arrays.ArrayDeclarationSpacing.AssociativeArrayFound
When a multi-item array uses associative keys, each value should start on a new line.


$item_data = $this->alt_data->select( $sql );
} else {
// Support 'find' output ordering.
Expand All @@ -1364,6 +1373,8 @@ public function field( $name, $single = null, $raw = false ) {
$sql['orderby'] = 'FIELD( `t`.`' . $table['field_id'] . '`, ' . $order_ids . ' )';
}

pods_debug_log_data( [ 'field_name' => $params->name, 'sql' => $sql ], 'related-field-params', __METHOD__, __LINE__ );
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[phpcs] reported by reviewdog 🐶
WordPress.Arrays.ArrayDeclarationSpacing.AssociativeArrayFound
When a multi-item array uses associative keys, each value should start on a new line.


$related_obj->find( $sql );

// Support 'find' output.
Expand Down Expand Up @@ -2391,6 +2402,7 @@ public function find( $params = null, $limit = 15, $where = null, $sql = null )
'search_across_picks' => false,
'search_across_files' => false,
// Advanced parameters.
'filter_var' => $this->filter_var,
'filters' => $this->filters,
'sql' => $sql,
// Caching parameters.
Expand Down Expand Up @@ -2428,6 +2440,7 @@ public function find( $params = null, $limit = 15, $where = null, $sql = null )
$this->pagination = (boolean) $params->pagination;
$this->search = (boolean) $params->search;
$this->search_var = $params->search_var;
$this->filter_var = $params->filter_var;
$params->join = (array) $params->join;

if ( empty( $params->search_query ) ) {
Expand Down Expand Up @@ -3367,28 +3380,29 @@ public function pagination( $params = null ) {
$append = '&';
}

$defaults = array(
'type' => 'advanced',
'label' => __( 'Go to page:', 'pods' ),
'show_label' => true,
'first_text' => __( '&laquo; First', 'pods' ),
'prev_text' => __( '&lsaquo; Previous', 'pods' ),
'next_text' => __( 'Next &rsaquo;', 'pods' ),
'last_text' => __( 'Last &raquo;', 'pods' ),
'prev_next' => true,
'first_last' => true,
'limit' => (int) $this->limit,
'offset' => (int) $this->offset,
'page' => max( 1, (int) $this->page ),
'mid_size' => 2,
'end_size' => 1,
'total_found' => $this->total_found(),
'page_var' => $this->page_var,
'base' => "{$url}{$append}%_%",
'format' => "{$this->page_var}=%#%",
'class' => '',
'link_class' => '',
);
$defaults = [
'type' => 'advanced',
'label' => __( 'Go to page:', 'pods' ),
'show_label' => true,
'first_text' => __( '&laquo; First', 'pods' ),
'prev_text' => __( '&lsaquo; Previous', 'pods' ),
'next_text' => __( 'Next &rsaquo;', 'pods' ),
'last_text' => __( 'Last &raquo;', 'pods' ),
'prev_next' => true,
'first_last' => true,
'limit' => (int) $this->limit,
'offset' => (int) $this->offset,
'page' => max( 1, (int) $this->page ),
'mid_size' => 2,
'end_size' => 1,
'total_found' => $this->total_found(),
'page_var' => $this->page_var,
'base' => "{$url}{$append}%_%",
'format' => "{$this->page_var}=%#%",
'class' => '',
'link_class' => '',
'wrap_pagination' => false,
];

if ( is_object( $params ) ) {
$params = get_object_vars( $params );
Expand All @@ -3408,6 +3422,8 @@ public function pagination( $params = null ) {
$pagination = 'advanced';
}

$wrap_pagination = (bool) $params->wrap_pagination;

ob_start();

pods_view( PODS_DIR . 'ui/front/pagination/' . $pagination . '.php', compact( array_keys( get_defined_vars() ) ) );
Expand Down Expand Up @@ -3526,7 +3542,7 @@ public function filters( $params = null ) {
$search = trim( $params['search'] );

if ( '' === $search ) {
$search = pods_v_sanitized( $pod->search_var, 'get', '' );
$search = sanitize_text_field( pods_v( $pod->search_var, 'get', '' ) );
}

ob_start();
Expand Down Expand Up @@ -3708,6 +3724,8 @@ public function template( $template_name, $code = null, $deprecated = false, $ch
if ( ! empty( $code ) ) {
// Only detail templates need $this->id.
if ( empty( $this->id ) ) {
$this->reset();

while ( $this->fetch() ) {
$info['item_id'] = $this->id();

Expand Down Expand Up @@ -4630,6 +4648,7 @@ public function __get( $name ) {
'page_var',
'search',
'search_var',
'filter_var',
'search_mode',
'api',
'row_number',
Expand Down Expand Up @@ -4695,6 +4714,7 @@ public function __set( $name, $value ): void {
'page_var' => 'string',
'search' => 'boolean',
'search_var' => 'string',
'filter_var' => 'string',
'search_mode' => 'string',
'id' => 'int',
);
Expand Down
89 changes: 34 additions & 55 deletions classes/PodsAPI.php
Original file line number Diff line number Diff line change
Expand Up @@ -1749,12 +1749,8 @@ public function save_pod( $params, $sanitized = false, $db = true ) {
$pod = null;
}

if ( $fail_on_load ) {
if ( is_wp_error( $pod ) ) {
return $pod;
} elseif ( empty( $pod ) ) {
return pods_error( __( 'Pod not found', 'pods' ), $this );
}
if ( $fail_on_load && ! $pod instanceof Pod ) {
return pods_error( __( 'Pod not found', 'pods' ), $this );
}
}
}
Expand Down Expand Up @@ -3285,7 +3281,7 @@ public function save_field( $params, $table_operation = true, $sanitized = false
if ( $load_params ) {
$field_obj = $this->load_field( $load_params );

if ( $fail_on_load && ( empty( $field_obj ) || is_wp_error( $field_obj ) ) ) {
if ( $fail_on_load && ! $field_obj instanceof Field ) {
return $field_obj;
}
}
Expand Down Expand Up @@ -4830,11 +4826,12 @@ public function save_pod_item( $params ) {
*
* Use for globally setting field change tracking.
*
* @param bool
* @param bool $track_changed_fields Whether to track changed fields or not.
* @param object $params The parameters passed to save_pod_item.
*
* @since 2.3.19
*/
$track_changed_fields = apply_filters( "pods_api_save_pod_item_track_changed_fields_{$pod_name}", (boolean) $params->track_changed_fields, $params );
$track_changed_fields = (bool) apply_filters( "pods_api_save_pod_item_track_changed_fields_{$pod_name}", (bool) $params->track_changed_fields, $params );

$changed_fields = array();

Expand Down Expand Up @@ -5083,10 +5080,10 @@ public function save_pod_item( $params ) {
*
* @since 3.0
*
* @param bool $is_visible Whether the field is visible from conditional logic.
* @param Field $field The field object.
* @param array $field_values The field values referenced.
* @param object $params The save_pod_item parameters.
* @param bool $is_visible Whether the field is visible from conditional logic.
* @param Field|Value_Field $field The field object.
* @param array $field_values The field values referenced.
* @param object $params The save_pod_item parameters.
*/
$is_visible = (bool) apply_filters(
'pods_api_save_pod_item_conditional_logic_field_is_visible',
Expand Down Expand Up @@ -6192,17 +6189,17 @@ public static function handle_changed_fields( $pod, $id, $mode = 'set' ) {
return [];
}

$changed_pods_cache = pods_static_cache_get( 'changed_pods_cache', __CLASS__ ) ?: [];
$old_fields_cache = pods_static_cache_get( 'old_fields_cache', __CLASS__ ) ?: [];
$changed_fields_cache = pods_static_cache_get( 'changed_fields_cache', __CLASS__ ) ?: [];
$changed_pods_cache = (array) ( pods_static_cache_get( 'changed_pods_cache', __CLASS__ ) ?: [] );
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[phpcs] reported by reviewdog 🐶
Squiz.PHP.DisallowInlineIf.Found
Inline IF statements are not allowed

$old_fields_cache = (array) ( pods_static_cache_get( 'old_fields_cache', __CLASS__ ) ?: [] );
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[phpcs] reported by reviewdog 🐶
Squiz.PHP.DisallowInlineIf.Found
Inline IF statements are not allowed

$changed_fields_cache = (array) ( pods_static_cache_get( 'changed_fields_cache', __CLASS__ ) ?: [] );
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[phpcs] reported by reviewdog 🐶
Squiz.PHP.DisallowInlineIf.Found
Inline IF statements are not allowed


$cache_key = $pod . '|' . $id;

$export_params = array(
'depth' => 1,
);

if ( in_array( $mode, array( 'set', 'reset' ), true ) ) {
if ( in_array( $mode, [ 'set', 'reset' ], true ) ) {
if ( isset( $changed_fields_cache[ $cache_key ] ) ) {
unset( $changed_fields_cache[ $cache_key ] );
}
Expand Down Expand Up @@ -7957,19 +7954,6 @@ public function delete_pod_item( $params, $wp = true ) {
// Plugin hook
$this->do_hook( 'pre_delete_pod_item', $params, $pod );
$this->do_hook( "pre_delete_pod_item_{$params->pod}", $params, $pod );

// Call any pre-save helpers (if not bypassed)
if ( ! defined( 'PODS_DISABLE_EVAL' ) || ! PODS_DISABLE_EVAL ) {
if ( ! empty( $pod ) ) {
$helpers = array( 'pre_delete_helpers', 'post_delete_helpers' );

foreach ( $helpers as $helper ) {
if ( isset( $pod[ $helper ] ) && ! empty( $pod[ $helper ] ) ) {
${$helper} = explode( ',', $pod[ $helper ] );
}
}
}
}
}

// Delete object from relationship fields
Expand Down Expand Up @@ -8349,7 +8333,7 @@ public function get_pod_type_count( $type ) {
*
* @param bool $strict Makes sure the pod exists, throws an error if it doesn't work.
*
* @return Pods\Whatsit\Pod|false Pod object or false if not found.
* @return Pods\Whatsit\Pod|false|WP_Error Pod object or false if not found.
*
* @throws Exception
* @since 1.7.9
Expand Down Expand Up @@ -9785,7 +9769,7 @@ public function lookup_related_items( $field_id, $pod_id, $ids, $field = null, $

$related = get_comments( $comment_args );

if ( ! is_wp_error( $related ) ) {
if ( $related ) {
$related_ids = $related;
}
} elseif (
Expand Down Expand Up @@ -10456,13 +10440,13 @@ public function get_table_info( $object_type, $object, $name = null, $pod = null
/**
* Allow filtering the table information for an object.
*
* @param array $info The table information.
* @param string $object_type The object type.
* @param string $object The object name.
* @param string $name The pod name.
* @param array|Pod $pod The pod config (if found).
* @param array|Field $field The field config (if found).
* @param self $obj The PodsAPI object.
* @param array $info The table information.
* @param string $object_type The object type.
* @param string $object The object name.
* @param string|null $name The pod name.
* @param array|Pod|null $pod The pod config (if found).
* @param array|Field|null $field The field config (if found).
* @param self $obj The PodsAPI object.
*/
return apply_filters( 'pods_api_get_table_info', $info, $object_type, $object, $name, $pod, $field, $this );
} else {
Expand Down Expand Up @@ -10570,13 +10554,14 @@ public function get_table_info( $object_type, $object, $name = null, $pod = null
*
* Use to change "default" post status from publish to any other status or statuses.
*
* @param array $post_status List of post statuses. Default is 'publish' or field setting (if available).
* @param string $post_type Post type of current object.
* @param array $info Array of information about the object.
* @param string $object Type of object.
* @param string $name Name of pod to load.
* @param array $pod Array with Pod information. Result of PodsAPI::load_pod().
* @param array $field Array with field information.
* @param array $post_status List of post statuses. Default is 'publish' or field setting (if available).
* @param string $post_type Post type of current object.
* @param array $info Array of information about the object.
* @param string $object_type Type of object.
* @param string $object Object name if provided.
* @param string|null $name Name of pod to load.
* @param array|Pod|null $pod The pod config (if found).
* @param array|Field|null $field The field config (if found).
*
* @since unknown
*/
Expand Down Expand Up @@ -10993,10 +10978,6 @@ public function import( $import_data, $numeric_mode = false, $format = null ) {
*/
global $wpdb;

if ( null === $format && null !== $this->format ) {
$format = $this->format;
}

if ( 'csv' === $format && ! is_array( $import_data ) ) {
$data = pods_migrate( 'sv', ',' )->parse( $import_data );

Expand All @@ -11016,8 +10997,6 @@ public function import( $import_data, $numeric_mode = false, $format = null ) {

if ( ! empty( $this->pod_data ) ) {
$pod = $this->pod_data;
} elseif ( ! empty( $this->pod ) ) {
$pod = $this->load_pod( [ 'name' => $this->pod ], false );
}

if ( false === $pod ) {
Expand Down Expand Up @@ -11183,8 +11162,6 @@ public function export( $pod = null, $params = null ) {
if ( empty( $pod ) ) {
if ( ! empty( $this->pod_data ) ) {
$pod = $this->pod_data;
} elseif ( ! empty( $this->pod ) ) {
$pod = $this->load_pod( [ 'name' => $this->pod ], false );
}
}

Expand Down Expand Up @@ -11341,6 +11318,8 @@ public function cache_flush_pods(
} else {
// Do normal cache clear.
pods_cache_clear( true );

wp_cache_flush();
}

if ( $flush_rewrites ) {
Expand Down Expand Up @@ -11681,7 +11660,7 @@ public function get_pods_object_from_wp_post( $post ) {
$post = get_post( $post );
}

if ( ! $post || is_wp_error( $post ) ) {
if ( ! $post instanceof WP_Post ) {
return false;
}

Expand Down
Loading
Loading