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.1 #7282

Merged
merged 7 commits into from
Mar 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
7 changes: 7 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@ 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.1 - March 29th, 2024 =

* Performance: The Advanced Filters popup now uses Autocomplete for relationship fields to improve performance for large itemsets. FYI filters are a feature in the Manage Content UI for Advanced Content Types only. (@sc0ttkclark)
* Fixed: Conditional logic for display callbacks 'allowed' field now showing when choosing the Customized option. (@sc0ttkclark)
* Fixed: PHP 8.1 compatibility fix for null values passed to esc_* functions in WP. (@sc0ttkclark)
* Fixed: PHP 8.1 compatibility fix for html_entity_decode. (@sc0ttkclark)

= 3.2.0 - March 25th, 2024 =

* Feature: New support for Custom Field revisions in Pods that are Post Types that use Meta storage. You can optionally enable the feature per-pod or per-field. #7265 (@sc0ttkclark)
Expand Down
27 changes: 21 additions & 6 deletions classes/PodsUI.php
Original file line number Diff line number Diff line change
Expand Up @@ -3292,6 +3292,15 @@ public function filters() {
foreach ( $filters as $filter ) {
$value = pods_v( 'filter_' . $filter );

// Only support the first item of the array.
if ( is_array( $value ) ) {
if ( empty( $value ) ) {
$value = null;
} else {
$value = current( $value );
}
}

if ( isset( $this->pod->fields[ $filter ] ) ) {
$filter_field = $this->pod->fields[ $filter ];

Expand Down Expand Up @@ -3407,6 +3416,12 @@ public function filters() {
public function filters_popup() {

$filters = $this->filters;

$pod = null;

if ( $this->pod ) {
$pod = $this->pod;
}
?>
<div id="pods-ui-posts-filter-popup" class="pods-hidden">
<form action="" method="get" class="pods-ui-posts-filter-popup">
Expand Down Expand Up @@ -3512,7 +3527,7 @@ public function filters_popup() {
'<span',
'</span>',
),
PodsForm::field( 'filter_' . $filter . '_start', $start, $filter_field['type'], $filter_field )
PodsForm::field( 'filter_' . $filter . '_start', $start, $filter_field['type'], $filter_field, $pod )
);
?>

Expand All @@ -3528,7 +3543,7 @@ public function filters_popup() {
'<span',
'</span>',
),
PodsForm::field( 'filter_' . $filter . '_end', $end, $filter_field['type'], $filter_field )
PodsForm::field( 'filter_' . $filter . '_end', $end, $filter_field['type'], $filter_field, $pod )
);
?>
</span>
Expand All @@ -3544,7 +3559,7 @@ public function filters_popup() {
$filter_field['default_value'] = '';

$filter_field['pick_format_type'] = 'single';
$filter_field['pick_format_single'] = 'dropdown';
$filter_field['pick_format_single'] = 'autocomplete';
$filter_field['pick_allow_add_new'] = 0;

$filter_field['input_helper'] = pods_v( 'ui_input_helper', pods_v( $filter, $this->fields['search'] ?: $this->fields['manage'], array(), true ), '', true );
Expand All @@ -3571,7 +3586,7 @@ public function filters_popup() {
'<span',
'</span>',
),
PodsForm::field( 'filter_' . $filter, $value, 'pick', $options )
PodsForm::field( 'filter_' . $filter, $value, 'pick', $options, $pod )
);
?>
</span>
Expand Down Expand Up @@ -3620,7 +3635,7 @@ public function filters_popup() {
'<span',
'</span>',
),
PodsForm::field( 'filter_' . $filter, $value, 'pick', $options )
PodsForm::field( 'filter_' . $filter, $value, 'pick', $options, $pod )
);
?>
</span>
Expand Down Expand Up @@ -3659,7 +3674,7 @@ public function filters_popup() {
'<span',
'</span>',
),
PodsForm::field( 'filter_' . $filter, $value, 'text', $options )
PodsForm::field( 'filter_' . $filter, $value, 'text', $options, $pod )
);
?>
</span>
Expand Down
10 changes: 5 additions & 5 deletions classes/fields/pick.php
Original file line number Diff line number Diff line change
Expand Up @@ -1703,11 +1703,11 @@ public function build_dfv_field_item_data_recurse_item( $item_id, $item_title, $
}

$item = array(
'id' => html_entity_decode( esc_html( $item_id ) ),
'icon' => esc_attr( $icon ),
'name' => wp_strip_all_tags( html_entity_decode( $item_title ) ),
'edit_link' => html_entity_decode( esc_url( $edit_link ) ),
'link' => html_entity_decode( esc_url( $link ) ),
'id' => null !== $item_id ? html_entity_decode( esc_html( $item_id ), ENT_COMPAT ) : '',
'icon' => null !== $icon ? esc_attr( $icon ) : '',
'name' => null !== $item_title ? wp_strip_all_tags( html_entity_decode( $item_title, ENT_COMPAT ) ) : '',
'edit_link' => null !== $edit_link ? html_entity_decode( esc_url( $edit_link ), ENT_COMPAT ) : '',
'link' => null !== $link ? html_entity_decode( esc_url( $link ), ENT_COMPAT ) : '',
'selected' => $selected,
);

Expand Down
2 changes: 1 addition & 1 deletion includes/access.php
Original file line number Diff line number Diff line change
Expand Up @@ -2017,7 +2017,7 @@ function pods_access_settings_config(): array {
'default' => 'esc_attr,esc_html',
'depends-on' => [
'dynamic_features_allow' => '1',
'display_callbacks' => 'allowed',
'display_callbacks' => 'customized',
],
'depends-on-multi' => [
'dynamic_features_enabled' => 'display',
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.2.0
* Version: 3.2.1
* 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.2.0' );
define( 'PODS_VERSION', '3.2.1' );

// 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.2.0",
"version": "3.2.1",
"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
9 changes: 8 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.5
Requires PHP: 7.2
Stable tag: 3.2.0
Stable tag: 3.2.1
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

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

== Changelog ==

= 3.2.1 - March 29th, 2024 =

* Performance: The Advanced Filters popup now uses Autocomplete for relationship fields to improve performance for large itemsets. FYI filters are a feature in the Manage Content UI for Advanced Content Types only. (@sc0ttkclark)
* Fixed: Conditional logic for display callbacks 'allowed' field now showing when choosing the Customized option. (@sc0ttkclark)
* Fixed: PHP 8.1 compatibility fix for null values passed to esc_* functions in WP. (@sc0ttkclark)
* Fixed: PHP 8.1 compatibility fix for html_entity_decode. (@sc0ttkclark)

= 3.2.0 - March 25th, 2024 =

* Feature: New support for Custom Field revisions in Pods that are Post Types that use Meta storage. You can optionally enable the feature per-pod or per-field. #7265 (@sc0ttkclark)
Expand Down
Loading