You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
REST API: Make filter_wp_unique_filename() static to match core, plus avoid duplicate routes (#75782)
* REST API: Make `filter_wp_unique_filename()` static to match core
After WordPress/wordpress-develop#10868 (r61703), the core
`WP_REST_Attachments_Controller::filter_wp_unique_filename()` method
was changed to `private static`. This causes a fatal error in the
Gutenberg subclass which declares it as non-static.
Aligns the Gutenberg method signature with core by making it static
and simplifying the parameters to match.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Avoid duplicate sideload route registration when core already has it
Since core trunk now registers the sideload route in
`WP_REST_Attachments_Controller::register_routes()`, only register
it in the Gutenberg subclass when the parent class doesn't already
have the `sideload_item` method. Updates the test accordingly.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
0 commit comments