-
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
Templates: only resolve patterns for REST API endpoints #61757
Conversation
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. |
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.6/class-gutenberg-rest-templates-controller-6-6.php ❔ lib/compat/wordpress-6.6/resolve-patterns.php |
60d9f7f
to
cdb7dbd
Compare
Flaky tests detected in cdb7dbd. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/9163086626
|
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.
LGTM 👍
This was fixed in Gutenberg: WordPress/gutenberg#61757 Fixes: #12
See WordPress/gutenberg#60349. See WordPress/gutenberg#61757. See #6673. Fixes #61228. Props ellatrix, antonvlasenko. git-svn-id: https://develop.svn.wordpress.org/trunk@58303 602fd350-edb4-49c9-b593-d223f7449a82
See WordPress/gutenberg#60349. See WordPress/gutenberg#61757. See WordPress/wordpress-develop#6673. Fixes #61228. Props ellatrix, antonvlasenko. Built from https://develop.svn.wordpress.org/trunk@58303 git-svn-id: http://core.svn.wordpress.org/trunk@57760 1a063a9b-81f0-0310-95a4-ce76da25c4cd
See WordPress/gutenberg#60349. See WordPress/gutenberg#61757. See WordPress/wordpress-develop#6673. Fixes #61228. Props ellatrix, antonvlasenko. Built from https://develop.svn.wordpress.org/trunk@58303 git-svn-id: https://core.svn.wordpress.org/trunk@57760 1a063a9b-81f0-0310-95a4-ce76da25c4cd
) Co-authored-by: ellatrix <ellatrix@git.wordpress.org> Co-authored-by: youknowriad <youknowriad@git.wordpress.org> Co-authored-by: joemcgill <joemcgill@git.wordpress.org> Co-authored-by: westonruter <westonruter@git.wordpress.org> Co-authored-by: justintadlock <greenshady@git.wordpress.org> Co-authored-by: talldan <talldanwp@git.wordpress.org> Co-authored-by: ryelle <ryelle@git.wordpress.org>
) Co-authored-by: ellatrix <ellatrix@git.wordpress.org> Co-authored-by: youknowriad <youknowriad@git.wordpress.org> Co-authored-by: joemcgill <joemcgill@git.wordpress.org> Co-authored-by: westonruter <westonruter@git.wordpress.org> Co-authored-by: justintadlock <greenshady@git.wordpress.org> Co-authored-by: talldan <talldanwp@git.wordpress.org> Co-authored-by: ryelle <ryelle@git.wordpress.org>
What?
This PR resolves patterns more conservatively in templates. Instead of always resolving all patterns when getting templates, it only resolves them when accessing templates through the REST API endpoints.
Why?
This fixes #61454: people might be relying on filters when rendering templates server side.
How?
For REST API endpoints, these templates were never rendered anyway, they are raw block markup, to be render in the editor. For the endpoints, these filters never ran anyway.
Testing Instructions
Testing Instructions for Keyboard
Screenshots or screencast