-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Try/rest global styles controller inherits post controller #6022
base: trunk
Are you sure you want to change the base?
Try/rest global styles controller inherits post controller #6022
Conversation
Extending `WP_REST_Global_Styles_Controller` with `WP_REST_Posts_Controller`
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 Unlinked AccountsThe following contributors have not linked their GitHub and WordPress.org accounts: @jonnynews. Contributors, please read how to link your accounts to ensure your work is properly credited in WordPress releases. Core SVNIf you're a Core Committer, use this list when committing to
GitHub Merge commitsIf 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. |
Test using WordPress PlaygroundThe changes in this pull request can previewed and tested using a WordPress Playground instance. WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser. Some things to be aware of
For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation. |
src/wp-includes/rest-api/endpoints/class-wp-rest-global-styles-controller.php
Show resolved
Hide resolved
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.
Thanks for getting this alternative up. Looks like a simple approach.
I've closed #6008
Also checked manually in the site editor. Global styles endpoint is being called and loaded correctly.
// in the console
await wp.data.select( 'core' ).getEntityRecord( 'root', 'globalStyles', await wp.data.select( 'core' ).__experimentalGetCurrentGlobalStylesId()
If we get this in, I'll rebase:
Hopefully that'll be baked and ready to go too.
Thanks a lot!
Could we hang this one onto https://core.trac.wordpress.org/ticket/60131 as well? I can update the trac description if so. Cheers. |
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.
We still need the changes in:
did you mean to close that PR and incorporate its changes them into this PR?
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 (again) 😄
To clarify my last review comment, #5699 extends the Global styles revisions controller with WP_REST_Revisions_Controller - changes that are not covered by this PR.
I assumed the closing comment in #5699 meant that this PR was going to carry over its commits.
All good. Either we reopen #5699 or I can create a new PR with the same changes after this PR lands.
Cheers!
Co-authored-by: ramonjd <ramonopoly@git.wordpress.org> Co-authored-by: mukeshpanchal27 <mukesh27@git.wordpress.org> Co-authored-by: spacedmonkey <spacedmonkey@git.wordpress.org>
Co-authored-by: ramonjd <ramonopoly@git.wordpress.org> Co-authored-by: mukeshpanchal27 <mukesh27@git.wordpress.org> Co-authored-by: spacedmonkey <spacedmonkey@git.wordpress.org>
Updating generated API file
Updating generated API file
Updating generated API file
Trac ticket: https://core.trac.wordpress.org/ticket/60131
This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.