Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
8aee9b4
Set version to 3.3.10-a-1
sc0ttkclark Jun 7, 2026
fba5e75
Resolved fatal error when calling the `Whatsit::count_groups()` metho…
sc0ttkclark Jun 7, 2026
10ead53
Update codeception to 5.3
sc0ttkclark Jun 8, 2026
5aa55b0
Revert symfony/console to maintain PHP compat with testing
sc0ttkclark Jun 8, 2026
c49b9fa
Refactor is_empty method for better value handling
sc0ttkclark Aug 2, 2026
748fdce
Cast value to string before display processing
sc0ttkclark Aug 2, 2026
1bf39f6
Expand SQL replacement for additional network WordPress tables
sc0ttkclark Aug 9, 2026
21e6519
Update version
sc0ttkclark Aug 14, 2026
16baf37
Set version to 3.3.3-a-1
sc0ttkclark Jul 8, 2025
29d803d
Update version
sc0ttkclark May 26, 2025
cec95b2
Support duplicating groups of fields (#7426)
sc0ttkclark May 26, 2025
9169377
Auto rebuild assets
sc0ttkclark May 26, 2025
4545f40
Avoid fully flushing object cache when we don’t need to
sc0ttkclark Jun 28, 2025
88a4d81
Flush all caches when running Pods Cache Flush
sc0ttkclark Jun 28, 2025
8b2b7f9
Make all object cache flushing optional
sc0ttkclark Jun 28, 2025
652360e
Optionally flush transients
sc0ttkclark Jun 28, 2025
bfa64cc
Allow CLI to flush or skip full object cache / transients
sc0ttkclark Jun 28, 2025
77d4178
Auto rebuild assets
sc0ttkclark Jul 8, 2025
831f22c
Expanded conditional logic to include handling for relationship array…
sc0ttkclark Feb 22, 2026
3f6749c
Fix option labels
sc0ttkclark Feb 22, 2026
0af39a7
Update minimum requirements for Pods
sc0ttkclark Feb 22, 2026
8628fec
Auto rebuild assets
sc0ttkclark Mar 11, 2026
60e5dda
Refactor the file field as completely React and use the ListItem rela…
sc0ttkclark Mar 12, 2026
d55ea75
Update styles
sc0ttkclark Mar 12, 2026
540c629
Handle file field tiles with larger icons but still using the repeata…
sc0ttkclark Mar 12, 2026
bf10ea3
Fix phpstan var
sc0ttkclark Mar 12, 2026
281765c
Fixes for tests
sc0ttkclark Mar 12, 2026
4da124b
Clean up numeric comparison logic and tests so it’s easier to maintain
sc0ttkclark Mar 12, 2026
a5df33a
Add more test cases
sc0ttkclark Mar 12, 2026
2320414
Test cleanup, pending results
sc0ttkclark Mar 12, 2026
a2f688b
Test fixes
sc0ttkclark Mar 12, 2026
94baf7c
Fix tests
sc0ttkclark Mar 12, 2026
0d85927
Fix performance on conditional package
sc0ttkclark Mar 12, 2026
dbe86b5
Change file template option labels now that tiles have been replaced
sc0ttkclark Mar 12, 2026
2404870
Add Settings link to Pods plugin action links on Plugins page ( #7519…
monzuralam Apr 23, 2026
53e0bfa
Fix shortcode render for PODS_TEMPLATES_ALLOW_OTHER_SHORTCODES so it …
sc0ttkclark May 8, 2026
43359e2
fix(core): replace (boolean) cast with (bool) for PHP 8.5 (#7550)
faisalahammad Jul 2, 2026
b42a9a0
Fix PHP 8.5 compatibility with bool casts
sc0ttkclark Aug 30, 2026
0eb46e0
Fix file upload hook undefined property
sc0ttkclark Aug 31, 2026
7200a19
Merge branch 'main' into release/3.3.10
sc0ttkclark Aug 31, 2026
9b6d8e3
Update version
sc0ttkclark Aug 31, 2026
df9e096
Merge branch 'release/3.3.10' into release/3.4.0
sc0ttkclark Aug 31, 2026
1504c70
Update version
sc0ttkclark Aug 31, 2026
3b61b9f
Rebuild assets
sc0ttkclark Aug 31, 2026
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
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,11 @@ If you find an issue that you believe to be a *bug*, [let us know](https://githu

If you have restrictions on your server or site, these are the minimum versions that Pods will be supported to run on. Running the following minimum versions does bring with it their own risks including security and exposure to additional bugs that may have been resolved by the recommended versions above.

* WordPress 6.3+
* PHP 7.2+
* MySQL 5.5+
* WordPress 6.8+
* PHP 8.0+
* MySQL 5.7+

It's recommended you use the latest stable version of each available to you.

## Contributions Welcome

Expand Down
12 changes: 6 additions & 6 deletions classes/Pods.php
Original file line number Diff line number Diff line change
Expand Up @@ -673,7 +673,7 @@ public function field( $name, $single = null, $raw = false ) {
}

if ( null !== $params->single ) {
$params->single = (boolean) $params->single;
$params->single = (bool) $params->single;
}

$params->name = trim( (string) $params->name );
Expand Down Expand Up @@ -2404,9 +2404,9 @@ public function find( $params = null, $limit = 15, $where = null, $sql = null )
'offset' => null,
'page' => (int) $this->page,
'page_var' => $this->page_var,
'pagination' => (boolean) $this->pagination,
'pagination' => (bool) $this->pagination,
// Search parameters.
'search' => (boolean) $this->search,
'search' => (bool) $this->search,
'search_var' => $this->search_var,
'search_query' => null,
'search_mode' => $this->search_mode,
Expand Down Expand Up @@ -2451,8 +2451,8 @@ public function find( $params = null, $limit = 15, $where = null, $sql = null )
$this->offset = (int) $params->offset;
$this->page = (int) $params->page;
$this->page_var = $params->page_var;
$this->pagination = (boolean) $params->pagination;
$this->search = (boolean) $params->search;
$this->pagination = (bool) $params->pagination;
$this->search = (bool) $params->search;
$this->search_var = $params->search_var;
$this->filter_var = $params->filter_var;
$params->join = (array) $params->join;
Expand Down Expand Up @@ -3644,7 +3644,7 @@ public function helper( $helper, $value = null, $name = null ) {
*
* @since 2.8.0
*/
$include_obj = (boolean) apply_filters( 'pods_helper_include_obj', false, $params );
$include_obj = (bool) apply_filters( 'pods_helper_include_obj', false, $params );

// Clean up helper callback (if string).
if ( is_string( $params['helper'] ) ) {
Expand Down
131 changes: 97 additions & 34 deletions classes/PodsAPI.php
Original file line number Diff line number Diff line change
Expand Up @@ -1808,7 +1808,7 @@ public function save_pod( $params, $sanitized = false, $db = true ) {
$params->name = pods_clean_name( $params->name );
}

$params->overwrite = ! empty( $params->overwrite ) ? (boolean) $params->overwrite : false;
$params->overwrite = ! empty( $params->overwrite ) ? (bool) $params->overwrite : false;

$order_group_fields = null;

Expand Down Expand Up @@ -3250,8 +3250,8 @@ public function save_field( $params, $table_operation = true, $sanitized = false
$params->pod_id = $pod['id'];
$params->pod = $pod['name'];

$params->is_new = isset( $params->is_new ) ? (boolean) $params->is_new : false;
$params->overwrite = isset( $params->overwrite ) ? (boolean) $params->overwrite : false;
$params->is_new = isset( $params->is_new ) ? (bool) $params->is_new : false;
$params->overwrite = isset( $params->overwrite ) ? (bool) $params->overwrite : false;

$reserved_keywords = pods_reserved_keywords( 'wp-post' );

Expand Down Expand Up @@ -4268,13 +4268,13 @@ public function save_group( $params, $sanitized = false, $db = true ) {
$id_required = false;

if ( isset( $params->id_required ) ) {
$id_required = (boolean) $params->id_required;
$id_required = (bool) $params->id_required;

unset( $params->id_required );
}

$params->is_new = isset( $params->is_new ) ? (boolean) $params->is_new : false;
$params->overwrite = isset( $params->overwrite ) ? (boolean) $params->overwrite : false;
$params->is_new = isset( $params->is_new ) ? (bool) $params->is_new : false;
$params->overwrite = isset( $params->overwrite ) ? (bool) $params->overwrite : false;

if ( ! $pod && ( ! isset( $params->pod ) || empty( $params->pod ) ) && ( ! isset( $params->pod_id ) || empty( $params->pod_id ) ) ) {
return pods_error( __( 'Pod ID or name is required', 'pods' ), $this );
Expand Down Expand Up @@ -4938,7 +4938,7 @@ public function save_pod_item( $params ) {
}

if ( isset( $params->is_new_item ) ) {
$is_new_item = (boolean) $params->is_new_item;
$is_new_item = (bool) $params->is_new_item;
}

// Allow Helpers to bypass subsequent helpers in recursive save_pod_item calls
Expand Down Expand Up @@ -5448,7 +5448,7 @@ public function save_pod_item( $params ) {
|| in_array( pods_v( 'pick_object', $field_data ), $simple_tableless_objects, true )
)
);
$simple = (boolean) $this->do_hook( 'tableless_custom', $simple, $field_data, $field, $fields, $pod, $params );
$simple = (bool) $this->do_hook( 'tableless_custom', $simple, $field_data, $field, $fields, $pod, $params );

$is_repeatable_field = (
(
Expand Down Expand Up @@ -6678,6 +6678,7 @@ public function duplicate_pod( $params, $strict = false ) {
* $params['id'] int The Group ID.
* $params['name'] string The Group name.
* $params['new_name'] string The new Group name.
* $params['duplicate_fields'] bool Whether to duplicate the fields.
*
* @since 2.8.0
*
Expand Down Expand Up @@ -6716,7 +6717,11 @@ public function duplicate_group( $params, $strict = false ) {
return false;
}

$pod_data = null;

if ( $group instanceof Group ) {
$pod_data = $group->get_parent_object();

$group = $group->export(
[
'include_fields' => true,
Expand Down Expand Up @@ -6747,7 +6752,13 @@ public function duplicate_group( $params, $strict = false ) {

$fields = $group['fields'];

unset( $group['id'], $group['parent'], $group['object_type'], $group['object_storage_type'], $group['fields'] );
unset( $group['id'], $group['object_type'], $group['object_storage_type'], $group['fields'] );

if ( $pod_data ) {
unset( $group['parent'] );

$group['pod_data'] = $pod_data;
}

try {
$group_id = $this->save_group( $group );
Expand All @@ -6761,16 +6772,24 @@ public function duplicate_group( $params, $strict = false ) {
return false;
}

foreach ( $fields as $field => $field_data ) {
unset( $field_data['id'], $field_data['parent'], $field_data['object_type'], $field_data['object_storage_type'], $field_data['group'] );
$group_data = $this->load_group( [ 'id' => $group_id ] );

$field_data['group_id'] = $group_id;
if ( ! empty( $params->duplicate_fields ) ) {
foreach ( $fields as $field_data ) {
try {
$field_params = [
'pod' => $pod_data,
'id' => $field_data['id'],
'name' => $field_data['name'],
'new_group' => $group_data,
'new_group_id' => $group_id,
];

try {
$this->save_field( $field_data );
} catch ( Exception $exception ) {
// Field not saved.
pods_debug_log( $exception );
$this->duplicate_field( $field_params, true || $strict );
} catch ( Exception $exception ) {
// Field not saved.
pods_debug_log( $exception );
}
}
}

Expand Down Expand Up @@ -7049,7 +7068,7 @@ public function export_pod_item( $params, $pod = null ) {
$params['fields'] = (array) pods_v( 'fields', $params, [], true );
$params['depth'] = (int) pods_v( 'depth', $params, 2, true );
$params['object_fields'] = (array) pods_v( 'object_fields', $pod->pod_data, [], true );
$params['flatten'] = (boolean) pods_v( 'flatten', $params, false, true );
$params['flatten'] = (bool) pods_v( 'flatten', $params, false, true );
$params['context'] = pods_v( 'context', $params, null, true );

if ( empty( $params['fields'] ) ) {
Expand Down Expand Up @@ -7526,7 +7545,7 @@ public function delete_pod( $params, $strict = false, $delete_all = false ) {
$params->delete_all = $delete_all;
}

$params->delete_all = (boolean) $params->delete_all;
$params->delete_all = (bool) $params->delete_all;

// Reset content
if ( true === $params->delete_all ) {
Expand Down Expand Up @@ -7740,7 +7759,7 @@ public function delete_field( $params, $table_operation = true ) {
}

$simple = ( 'pick' === $field['type'] && in_array( pods_v( 'pick_object', $field ), $simple_tableless_objects, true ) );
$simple = (boolean) $this->do_hook( 'tableless_custom', $simple, $field, $pod, $params );
$simple = (bool) $this->do_hook( 'tableless_custom', $simple, $field, $pod, $params );

// @todo Push this logic into pods_object_storage_delete_pod action.
if ( $table_operation && $pod && 'table' === $pod['storage'] && ( ! in_array( $field['type'], $tableless_field_types, true ) || $simple ) ) {
Expand Down Expand Up @@ -7820,7 +7839,7 @@ public function delete_group( $params, $strict = false, $delete_all = false ) {
}

if ( ! isset( $params->delete_all ) ) {
$params->delete_all = (boolean) $delete_all;
$params->delete_all = (bool) $delete_all;
}

$group = $this->load_group( $params, false );
Expand Down Expand Up @@ -8542,7 +8561,7 @@ public function load_pods( $params = [] ) {
$include_internal = false;

if ( isset( $params['include_internal'] ) ) {
$include_internal = (boolean) $params['include_internal'];
$include_internal = (bool) $params['include_internal'];

unset( $params['include_internal'] );
}
Expand Down Expand Up @@ -8613,7 +8632,7 @@ public function field_exists( $params, $allow_id = true ) {
}

try {
return (boolean) $this->load_field( $load_params );
return (bool) $this->load_field( $load_params );
} catch ( Exception $exception ) {
pods_debug_log( $exception );

Expand Down Expand Up @@ -8889,7 +8908,7 @@ public function load_fields( $params = [] ) {
$include_internal = false;

if ( isset( $params['include_internal'] ) ) {
$include_internal = (boolean) $params['include_internal'];
$include_internal = (bool) $params['include_internal'];

unset( $params['include_internal'] );
}
Expand Down Expand Up @@ -8977,7 +8996,7 @@ public function group_exists( $params, $allow_id = true ) {
}

try {
return (boolean) $this->load_group( $load_params );
return (bool) $this->load_group( $load_params );
} catch ( Exception $exception ) {
pods_debug_log( $exception );

Expand Down Expand Up @@ -9121,7 +9140,7 @@ public function load_groups( $params = [] ) {
$include_internal = false;

if ( isset( $params['include_internal'] ) ) {
$include_internal = (boolean) $params['include_internal'];
$include_internal = (bool) $params['include_internal'];

unset( $params['include_internal'] );
}
Expand Down Expand Up @@ -11582,16 +11601,20 @@ public function csv_to_php( $data, $delimiter = ',' ) {
* @param bool $flush_rewrites Whether to flush rewrites.
* @param bool $flush_groups_and_fields Whether to flush cache for groups and fields.
* @param bool $static_only Whether to flush only static caches.
* @param bool $flush_object_cache Whether to fully flush object caches.
* @param bool $delete_transients Whether to fully delete transients.
*
* @return void
*
* @since 2.0.0
*/
public function cache_flush_pods(
$pod = null,
$flush_rewrites = true,
$flush_groups_and_fields = true,
$static_only = false
bool $flush_rewrites = true,
bool $flush_groups_and_fields = true,
bool $static_only = false,
bool $flush_object_cache = false,
bool $delete_transients = false
) {

/**
Expand Down Expand Up @@ -11666,11 +11689,11 @@ public function cache_flush_pods(
pods_init()->refresh_existing_content_types_cache( true );

if ( ! $static_only ) {
// Delete transients in the database
// Delete transients in the database.
$wpdb->query( "DELETE FROM `{$wpdb->options}` WHERE `option_name` LIKE '_transient_pods%'" );
$wpdb->query( "DELETE FROM `{$wpdb->options}` WHERE `option_name` LIKE '_transient_timeout_pods%'" );

// Delete Pods Options Cache in the database
// Delete Pods Options Cache in the database.
$wpdb->query( "DELETE FROM `{$wpdb->options}` WHERE `option_name` LIKE '_pods_option_%'" );

// Maybe use the test-based cache flushing to prevent major slowdowns.
Expand All @@ -11684,19 +11707,40 @@ class_exists( WP_UnitTestCase::class )
&& class_exists( \Pods_Unit_Tests\Pods_UnitTestCase::class )
) {
\Pods_Unit_Tests\Pods_UnitTestCase::flush_cache();
} else {
} else{
// Do normal cache clear.
pods_cache_clear( true );

wp_cache_flush();
// Maybe flush the full object cache.
if ( $flush_object_cache ) {
wp_cache_flush();
}

// Maybe delete all transients in the database.
if ( $delete_transients ) {
$wpdb->query( "DELETE FROM `{$wpdb->options}` WHERE `option_name` LIKE '_transient_%'" );
$wpdb->query( "DELETE FROM `{$wpdb->options}` WHERE `option_name` LIKE '_transient_timeout_%'" );
}
}

if ( $flush_rewrites ) {
pods_transient_set( 'pods_flush_rewrites', 1, WEEK_IN_SECONDS );
}
}

do_action( 'pods_cache_flushed' );
/**
* Allow hooking into the end of the Pods cache flush process.
*
* @since unknown
*
* @param array|Pod|null $pod The pod object or null of flushing general cache.
* @param bool $flush_rewrites Whether to flush rewrites.
* @param bool $flush_groups_and_fields Whether to flush cache for groups and fields.
* @param bool $static_only Whether to flush only static caches.
* @param bool $flush_object_cache Whether to fully flush object caches.
* @param bool $delete_transients Whether to fully delete transients.
*/
do_action( 'pods_cache_flushed', $pod, $flush_rewrites, $flush_groups_and_fields, $static_only, $flush_object_cache, $delete_transients );
}

/**
Expand Down Expand Up @@ -11728,6 +11772,16 @@ public function cache_flush_groups( $flush_fields = true, $static_only = false )
pods_static_cache_clear( true, \Pods\Whatsit\Storage\Collection::class . '/find_objects' );
pods_static_cache_clear( true, \Pods\Whatsit\Storage\Post_Type::class . '/find_objects/any' );
}

/**
* Allow hooking into the end of the Pods cache flush for groups process.
*
* @since 3.3.2
*
* @param bool $flush_fields Whether to flush cache for fields.
* @param bool $static_only Whether to flush only static caches.
*/
do_action( 'pods_api_cache_flush_groups', $flush_fields, $static_only );
}

/**
Expand Down Expand Up @@ -11758,6 +11812,15 @@ public function cache_flush_fields( $static_only = false ) {

pods_static_cache_clear( true, \Pods\Whatsit\Storage\Collection::class . '/find_objects' );
pods_static_cache_clear( true, \Pods\Whatsit\Storage\Post_Type::class . '/find_objects/any' );

/**
* Allow hooking into the end of the Pods cache flush for fields process.
*
* @since 3.3.2
*
* @param bool $static_only Whether to flush only static caches.
*/
do_action( 'pods_api_cache_flush_fields', $static_only );
}

/**
Expand Down
2 changes: 1 addition & 1 deletion classes/PodsArray.php
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ public function validate( $offset, $default = null, $type = null, $extra = null
$value = abs( $value );
}
} elseif ( 'boolean' === $type || 'bool' === $type ) {
$value = (boolean) $value;
$value = (bool) $value;
} elseif ( 'in_array' === $type && is_array( $default ) ) {
if ( is_array( $value ) ) {
foreach ( $value as $k => $v ) {
Expand Down
Loading
Loading