-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Add gutenberg_get_remote_theme_patterns
function
#49307
Conversation
gutenberg_get_remote_theme_patterns
function and use it in endpointgutenberg_get_remote_theme_patterns
function
I'm struggling to use the feature as per the testing instructions in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thank you!
Your instructions are good, but you have to ensure that the theme you're using allows remote patterns based on |
ok, updated the test instructions with a different pattern/text search and it works perfectly (both trunk and this branch). Tested empty and twentytwentythree themes. |
Backporting at WordPress/wordpress-develop#4543 |
Part of #45171
What?
Adds a new public function,
gutenberg_get_remote_theme_patterns
to query thepatterns
datum fromtheme.json
.Why?
We need to offer public APIs for consumers to add the data they need, so they don't resort to using private APIs.
How?
gutenberg_get_remote_theme_patterns
.Testing Instructions
theme.json
and add the following:Also test that by removing the
patterns
fromtheme.json
the pattern is not present.