-
Notifications
You must be signed in to change notification settings - Fork 4.5k
REST API: Add additional default template data fields for the active theme #69417
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
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. |
Size Change: -49 B (0%) Total Size: 1.84 MB
ℹ️ View Unchanged
|
This looks like the right approach to me. Thanks @Mamaduka! Just a note, we do need to correct the schemas. |
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.
This looks like a good approach to me.
I've confirmed admins can see the results on /themes
and that authors can see the results on /themes/theme-slug
.
For classic themes without a result, both of the values are null
, block themes return an array of template types and parts.
Thanks for your patience as we worked through this, I appreciate it.
Tested this PR, and it’s working well for me. Thanks, @Mamaduka |
35ad5f1
to
1d15338
Compare
Updated the schema and am going to merge this as soon as CI checks are passing. |
Flaky tests detected in dd46d92. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/13757558412
|
…theme (#69417) Co-authored-by: Mamaduka <mamaduka@git.wordpress.org> Co-authored-by: peterwilsoncc <peterwilsoncc@git.wordpress.org> Co-authored-by: TimothyBJacobs <timothyblynjacobs@git.wordpress.org> Co-authored-by: joemcgill <joemcgill@git.wordpress.org>
I just cherry-picked this PR to the wp/6.8 branch to get it included in the next release: 18bf6a5 |
…theme (WordPress#69417) Co-authored-by: Mamaduka <mamaduka@git.wordpress.org> Co-authored-by: peterwilsoncc <peterwilsoncc@git.wordpress.org> Co-authored-by: TimothyBJacobs <timothyblynjacobs@git.wordpress.org> Co-authored-by: joemcgill <joemcgill@git.wordpress.org>
What?
Closes #69195.
Fixes https://core.trac.wordpress.org/ticket/63055.
PR changes the method for exposing
default_template_types
anddefault_template_part_areas
data via REST API. This data is now provided as additional fields for the active theme and consumed using thegetCurrentTheme
selector.Why?
It is based on the recent discussion in the core sync ticket - https://core.trac.wordpress.org/ticket/62574#comment:29.
Testing Instructions
Testing Instructions for Keyboard
Same.
Screenshots or screencast