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

Fixes #6907 -- display_filter always set to the_title for Display Field in Selection List #6909

Merged

Conversation

therealgilles
Copy link
Contributor

Description

This fixes the filter applied to the Display Field in Selection List field when applicable. Before this fix, the default the_title filter was applied to the field, even though it may not have been applicable. An example is if the field value is set to {@permalink} to display the field as a slug (i.e. post_name).

Related GitHub issue(s)

Fixes #6907.

Testing instructions

See #6907.

Screenshots / screencast

Changelog text for these changes

Bug:$display_filter needs to be computed with the updated $field_index value. #6907

PR checklist

@therealgilles therealgilles changed the title Fixes #6907 Fixes #6907 -- display_filter is always set to the_title for Display Field in Selection List field Sep 19, 2022
@therealgilles therealgilles changed the title Fixes #6907 -- display_filter is always set to the_title for Display Field in Selection List field Fixes #6907 -- display_filter always set to the_title for Display Field in Selection List field Sep 19, 2022
@therealgilles therealgilles changed the title Fixes #6907 -- display_filter always set to the_title for Display Field in Selection List field Fixes #6907 -- display_filter always set to the_title for Display Field in Selection List Sep 19, 2022
@therealgilles
Copy link
Contributor Author

@JoryHogeveen In the code below:

              $display_filter_args = pods_v( 'display_filter_args', pods_v( $field_index, $search_data->pod_data['object_fields'] ) );

Is $search_data->pod_data['object_fields'] the same as $search_data->object_fields? If so, this line could be replaced with:

              $display_filter_args = pods_v( 'display_filter_args', $display_filter ) );

which would make most sense.

@sc0ttkclark sc0ttkclark added this to the Pods 2.9.4 milestone Sep 19, 2022
@sc0ttkclark sc0ttkclark self-assigned this Sep 19, 2022
@sc0ttkclark sc0ttkclark changed the base branch from main to release/2.9.4 September 20, 2022 02:00
@sc0ttkclark sc0ttkclark merged commit c9b4734 into pods-framework:release/2.9.4 Sep 20, 2022
@therealgilles therealgilles deleted the bugfix/display-filter branch September 20, 2022 04:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Bug with $display_filter in pods/classes/fields/pick.php
2 participants