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

Pattern Category: Set 'publicly_queryable' to false #54567

Merged
merged 1 commit into from
Sep 19, 2023

Conversation

Mamaduka
Copy link
Member

@Mamaduka Mamaduka commented Sep 18, 2023

Fixes: #54575

What?

PR sets the publicly_queryable parameter for the Pattern Category to false; this prevents adding it to Category block variations.

The publicly_queryable argument is used for front-end queries of taxonomy, which I think doesn't apply to the Pattern Category.

Why?

An alternative to #54532, which avoid hardcoding exception for the taxonomy.

Testing Instructions

See #54532.

@Mamaduka Mamaduka added [Type] Code Quality Issues or PRs that relate to code quality [Block] Post Terms Affects the Post Terms Block [Block] Pattern Affects the Patterns Block Needs PHP backport Needs PHP backport to Core labels Sep 18, 2023
@Mamaduka Mamaduka self-assigned this Sep 18, 2023
@Mamaduka Mamaduka requested review from glendaviesnz and removed request for spacedmonkey and ajitbohra September 18, 2023 16:57
@github-actions
Copy link

This pull request has changed or added PHP files. Please confirm whether these changes need to be synced to WordPress Core, and therefore featured in the next release of WordPress.

If so, it is recommended to create a new Trac ticket and submit a pull request to the WordPress Core Github repository soon after this pull request is merged.

If you're unsure, you can always ask for help in the #core-editor channel in WordPress Slack.

Thank you! ❤️

View changed files
❔ lib/compat/wordpress-6.4/block-patterns.php

Copy link
Contributor

@aaronrobertshaw aaronrobertshaw left a comment

Choose a reason for hiding this comment

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

Simple but highly effective! Nice work @Mamaduka 👍

This tests well for me. Not only does this still solve the goal of #54532 it also fixes #54575 as per the screenshot below.

Screenshot 2023-09-19 at 11 17 36 am

Copy link
Member

@kevin940726 kevin940726 left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@Mamaduka Mamaduka merged commit b743f39 into trunk Sep 19, 2023
58 checks passed
@Mamaduka Mamaduka deleted the update/pattern-category-publicly-queryable branch September 19, 2023 05:25
@github-actions github-actions bot added this to the Gutenberg 16.7 milestone Sep 19, 2023
@Mamaduka
Copy link
Member Author

The PHP backport will be included in WordPress/wordpress-develop#5234.

@SiobhyB SiobhyB removed the Needs PHP backport Needs PHP backport to Core label Sep 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Pattern Affects the Patterns Block [Block] Post Terms Affects the Post Terms Block [Type] Code Quality Issues or PRs that relate to code quality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Site Editor: Pattern Category showing up as an option to create a new template with
4 participants