-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Backport from WordPress core: Improvements for the post format query loop filter #66037
Conversation
…oop filter This pull request copies changes that were made in WordPress core in WordPress/wordpress-develop#7314: The pull request that added the PHP changes related to #64167. - Improved logic for the use of the `AND` `relation` key when a user queries for both a format and a taxonomy. - Improved inline documentation, for clarity and readability. - Improved validation of the queried formats against the registered formats. - Misc: renaming of variables for better readability.
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Thank you for the review. |
Warning: Type of PR label mismatch To merge this PR, it requires exactly 1 label indicating the type of PR. Other labels are optional and not being checked here.
Read more about Type labels in Gutenberg. Don't worry if you don't have the required permissions to add labels; the PR reviewer should be able to help with the task. |
…oop filter (WordPress#66037) This pull request copies changes that were made in WordPress core in WordPress/wordpress-develop#7314: The pull request that added the PHP changes related to WordPress#64167. - Improved logic for the use of the `AND` `relation` key when a user queries for both a format and a taxonomy. - Improved inline documentation, for clarity and readability. - Improved validation of the queried formats against the registered formats. - Misc: renaming of variables for better readability. Co-authored-by: carolinan <[email protected]> Co-authored-by: Mamaduka <[email protected]>
What? Why? How?
This pull request copies changes that were made in WordPress core in WordPress/wordpress-develop#7314 The pull request that added the PHP changes related to #64167
AND
relation
key when a user queries for both a format and a taxonomy.Testing Instructions
Confirm that there are no issues and no functional changes when using the post format filter with and without the plugin active, using WordPress 6.7 Beta.
To test the functionality:
Enable post formats in a theme by adding the theme support. Example:
Create a new category.
Create a new post with a post format and assign it to the category.
Create a second post with the same post format, without the category.
Select or insert a query loop block.
In the settings sidebar for the query loop, select "custom".
Locate and open the Filter panel.
Enable the format filter, and enter the name of the format you assigned to your posts.
Save
Confirm that the two posts are showing in the query loop in the editor and front.
Go back to the filter panel and enable the taxonomy filter.
Insert the category you assigned to one of the posts.
Confirm that only the post that has both the category and the format shows in the query loop in the editor and front.