-
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
Framework: Remove 5.0-merged REST API integrations #13408
Conversation
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.
🎉
lib/rest-api.php
Outdated
* | ||
* @since 2.8.0 | ||
*/ | ||
function gutenberg_register_rest_routes() { |
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.
While these functions are "internal" to the plugin, nonetheless it may be prudent to put them on a deprecation schedule similar to what's done in #13412 , and otherwise remove the implementation of the function to be a noop ?
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.
Removing them would be a noop, because the routes are already registered in WP 5.0. As long as WP 5.0 is the minimum requirement, it's duplicate code.
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.
I mean specifically the function gutenberg_register_rest_routes
, rather than removing outright, deprecating for some time, in the off-chance someone would have been calling it directly.
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.
Oh. Your call. Personally, I don't think anyone should've been calling it directly.
683daa3
to
5b74a6e
Compare
…rnmobile/372-add-title-to-gutenberg-mobile * 'master' of https://github.com/WordPress/gutenberg: (56 commits) Save package-lock.json file changes (#13481) Plugin: Deprecate gutenberg_add_responsive_body_class (#13461) Add speak messages to the feature toggle component. (#13385) Plugin: Deprecate gutenberg_kses_allowedtags (#13460) Plugin: Deprecate gutenberg_bulk_post_updated_messages (#13472) Plugin: Avoid calling deprecated gutenberg_silence_rest_errors (#13446) Plugin: Deprecate gutenberg_remove_wpcom_markdown_support (#13473) Fix: Categories block: add custom classes only to wrapper (#13439) is-shallow-equal: Use ES5 ruleset from eslint-plugin module (#13428) Update and Organize Contributors Guide per #12916 (#13352) Dismissible-notices: fix text overlapping icon (X) (#13371) Framework: Remove 5.0-merged REST API integrations (#13408) Plugin: Remove 5.0-merged block registration functions, integrations (#13412) Framework: Bump minimum required WP to 5.x (#13370) [Mobile] Improve keyboard hide button (#13415) Improve castError handling of non strings (#13315) Fix: File block add custom class (#13432) Consider making Fullscreen Mode effects visible only on larger screens (#13425) Update plugin version to 4.9.0 (#13436) DateTimePicker: fix prop warning for (#12933) ...
From #4226 (comment), I discovered: I'll plan to put together a new pull request to remove this last bit of code. |
It's not completed ported yet. See: |
* Plugin: Remove 5.0-merged REST API integrations * Re-add line break to deprecations document
* Plugin: Remove 5.0-merged REST API integrations * Re-add line break to deprecations document
Related: #11015
Blocked by: #13370
This pull request seeks to remove PHP REST API controller integration code which has been merged as part of the 5.0 release.
The controllers themselves will never have been loaded in a WordPress 5.0 environment, since they're conditionally loaded by the non-presence of the controller classes.
For extensions in
lib/rest-api.php
, reference the following list of closed Trac tickets:There is one remaining extension, from #4226, related to altering an oEmbed proxy response. The equivalent logic does not appear to me to be part of the 5.0 release, and it's unclear from the referenced ticket what remains to be done here (cc @imath, @pento). For now, I've left it remaining as-is.