-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Global styles revisions: move from experimental to 6.3 #51474
Global styles revisions: move from experimental to 6.3 #51474
Conversation
…s not required for 6.3 and was unrelated to the addition of the /revisions endpoint in the first place Moving global styles revisions endpoint file to 6-3 since it'll be included in 6.3 and is not experimental
Flaky tests detected in abad5d9. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/5262111962
|
*/ | ||
function gutenberg_update_global_styles_rest_controller( $args, $post_type ) { | ||
if ( in_array( $post_type, array( 'wp_global_styles' ), true ) ) { | ||
$args['rest_controller_class'] = 'Gutenberg_REST_Templates_Controller_6_3'; |
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.
LOL Gutenberg_REST_Templates_Controller_6_3
was way off 😮💨
… endpoint test :)
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.
Code change looks good, and smoke tested that the global styles revisions still work correctly wherever they're exposed in the site editor (browse mode revisions button, revisions screen under global styles, etc)
LGTM! ✨
* Removing `gutenberg_update_global_styles_rest_controller` hook as it's not required for 6.3 and was unrelated to the addition of the /revisions endpoint in the first place Moving global styles revisions endpoint file to 6-3 since it'll be included in 6.3 and is not experimental * Class needs to be named after file name, hence the 6_3 suffix * Backporting changes from core to gutenberg: adding prepare_date_response to parse dates * Tearing down after class in tests * Post name should be different to the one created in the global styles endpoint test :)
Does not require backporting to Core - shuffling files in Gutenberg and backporting from core changes in WordPress/wordpress-develop#4606 only
What and why?
gutenberg_update_global_styles_rest_controller
hook as its not required for 6.3 and was unrelated to the addition of the global styles /revisions endpoint in the first place. (Introduced in Rest API: add /revisions endpoint for global styles #49974)prepare_date_response
to parse dates (From Rest API: add /revisions endpoint for global styles wordpress-develop#4606)Testing
Tests should pass as expected