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

Patterns: change pattern category taxonomy public param to false #55748

Merged
merged 1 commit into from
Nov 1, 2023

Conversation

glendaviesnz
Copy link
Contributor

@glendaviesnz glendaviesnz commented Nov 1, 2023

What?

Sets the pattern categories taxonomy public param to false instead of true

Why?

It was suggested here that this would be a better setting for this taxonomy as it only needs to be accessed in admin, not the frontend.

How?

Changes the param from true to false

Testing Instructions

Log in as Admin, Editor, and Author users and make sure that each of these can add new and existing categories to patterns in the post editor and the site editor patterns library.

@glendaviesnz glendaviesnz added [Type] Code Quality Issues or PRs that relate to code quality Backport to WP 6.7 Beta/RC Pull request that needs to be backported to the WordPress major release that's currently in beta [Feature] Patterns A collection of blocks that can be synced (previously reusable blocks) or unsynced labels Nov 1, 2023
@glendaviesnz glendaviesnz self-assigned this Nov 1, 2023
Copy link

github-actions bot commented Nov 1, 2023

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
Member

@ramonjd ramonjd left a comment

Choose a reason for hiding this comment

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

LGTM

Tested with Admin, Editor and Author roles. I could create patterns and add new and existing patterns.

Not sure if this has already been said, but it did make me think that "My Patterns" in the Site Editor wasn't really appropriate as it shows all user patterns, not just the Admin's.

Anyway, that's for another day.

@glendaviesnz
Copy link
Contributor Author

but it did make me think that "My Patterns" in the Site Editor wasn't really appropriate as it shows all user patterns, not just the Admin's.

Yeh, that isn't really accurate. @SaxonF do you have any thoughts on better wording?

@glendaviesnz glendaviesnz merged commit a262460 into trunk Nov 1, 2023
54 checks passed
@glendaviesnz glendaviesnz deleted the update/pattern-categories-public-flag branch November 1, 2023 01:13
@github-actions github-actions bot added this to the Gutenberg 17.0 milestone Nov 1, 2023
@glendaviesnz
Copy link
Contributor Author

Core backport PR

@mikachan
Copy link
Member

mikachan commented Nov 1, 2023

I just cherry-picked this PR to the 6.4-rc3-2 branch to get it included in the next release: d25b47f

@mikachan mikachan removed the Backport to WP 6.7 Beta/RC Pull request that needs to be backported to the WordPress major release that's currently in beta label Nov 1, 2023
mikachan added a commit that referenced this pull request Nov 1, 2023
* Update label for lightbox editor UI (#55724)

* Update label for lightbox editor UI

* Change lightbox label in Global Styles

* Require queryId for enhanced pagination. (#55720)

* Change pattern category taxonomy public param to false (#55748)

* Query block enhanced pagination: Detect inner plugin blocks during render (#55714)

* Flag inner plugin blocks inside query loop

* Improve PHP logic a little

* Only disallow plugin blocks and post content

* Get rid of global variables

* Fix returned content from render callback

* Handle composed query stacks

* Disable navigation on the browser

* Replace `count` with `empty`

* Add PHPdocs and improve var naming

* Lint PHP

* Clarify docs a little

* Move the disable check before preventDefault

* Restore previous navigate logic

* Set filter priorities back to 10

* Basic inspector warnings

* Make render query filter static

* Add stable modal logic

* Switch back to ToggleControl

* Auto remove filter when query stack is empty

* Add first unit tests

* Switch to inverse control

* Add test case for nested queries

* Prevent passing `null` to the Tag Processr

* Get rid of explicit auto mode and notices

* Test directives in the Pagination Previous block

* Minor typos and improvements

* Improve modal texts

* Fix WPCS

* Reorder teardowns

* Reset the dirty flag after it's used

* Prevent usage of post content block

---------

Co-authored-by: David Arenas <david.arenas@automattic.com>

* Reuse existing screen-reader-text CSS class. (#55309)

---------

Co-authored-by: Artemio Morales <artemio.morales@a8c.com>
Co-authored-by: Peter Wilson <519727+peterwilsoncc@users.noreply.github.com>
Co-authored-by: Glen Davies <glendaviesnz@users.noreply.github.com>
Co-authored-by: Luis Herranz <luisherranz@gmail.com>
Co-authored-by: David Arenas <david.arenas@automattic.com>
Co-authored-by: Andrea Fercia <a.fercia@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Patterns A collection of blocks that can be synced (previously reusable blocks) or unsynced [Type] Code Quality Issues or PRs that relate to code quality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants