-
Notifications
You must be signed in to change notification settings - Fork 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
(2P) Revert "Revert "FSE: Add API endpoint to side-load images"" #35344
(2P) Revert "Revert "FSE: Add API endpoint to side-load images"" #35344
Conversation
This PR does not affect the size of JS and CSS bundles shipped to the user's browser. Generated by performance advisor bot at iscalypsofastyet.com. |
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've compared against the diff that reverted these changes and it looks to be a correct revert of that revert (help me!).
Just to confirm you've moved everything into the A8C\FSE
namespace right?
* @package A8C\FSE | ||
*/ | ||
|
||
namespace A8C\FSE; |
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.
So here is where you've moved the class into the namespace?
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.
Correct
public function register_rest_api() { | ||
require_once __DIR__ . '/class-wp-rest-sideload-image-controller.php'; | ||
|
||
( new WP_REST_Sideload_Image_Controller() )->register_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.
Just to confirm there is no global namespace qualifier here because the WP_REST_Sideload_Image_Controller
class is now in the A8C\FSE
namespace?
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.
Right, no qualifier needed because the current namespace also applies to WP_REST_Sideload_Image_Controller
.
Reverts #35328
Adds proper namespacing.