diff --git a/lib/compat/wordpress-6.5/class-gutenberg-rest-global-styles-revisions-controller-6-5.php b/lib/compat/wordpress-6.5/class-gutenberg-rest-global-styles-revisions-controller-6-5.php index 3723c33f1a7a90..74fa31d53199e0 100644 --- a/lib/compat/wordpress-6.5/class-gutenberg-rest-global-styles-revisions-controller-6-5.php +++ b/lib/compat/wordpress-6.5/class-gutenberg-rest-global-styles-revisions-controller-6-5.php @@ -14,11 +14,6 @@ * * @see WP_REST_Controller */ - -if ( class_exists( 'Gutenberg_REST_Global_Styles_Revisions_Controller_6_5' ) ) { - return; -} - class Gutenberg_REST_Global_Styles_Revisions_Controller_6_5 extends Gutenberg_REST_Global_Styles_Revisions_Controller_6_4 { /** * Registers the controller's routes. diff --git a/lib/compat/wordpress-6.6/class-wp-rest-edit-site-export-controller-gutenberg-6-6.php b/lib/compat/wordpress-6.6/class-wp-rest-edit-site-export-controller-gutenberg-6-6.php index f0a42badccda04..4ee8e15576190e 100644 --- a/lib/compat/wordpress-6.6/class-wp-rest-edit-site-export-controller-gutenberg-6-6.php +++ b/lib/compat/wordpress-6.6/class-wp-rest-edit-site-export-controller-gutenberg-6-6.php @@ -15,7 +15,11 @@ * @see WP_REST_Controller */ -class WP_REST_Edit_Site_Export_Controller_6_6 extends WP_REST_Edit_Site_Export_Controller { +if ( class_exists( 'Gutenberg_REST_Edit_Site_Export_Controller_6_6' ) ) { + return; +} + +class Gutenberg_REST_Edit_Site_Export_Controller_6_6 extends WP_REST_Edit_Site_Export_Controller { /** * Output a ZIP file with an export of the current templates * and template parts from the site editor, and close the connection. diff --git a/lib/compat/wordpress-6.6/rest-api.php b/lib/compat/wordpress-6.6/rest-api.php index 3c72e010dc1c36..049a58a70d39f7 100644 --- a/lib/compat/wordpress-6.6/rest-api.php +++ b/lib/compat/wordpress-6.6/rest-api.php @@ -81,7 +81,7 @@ function gutenberg_add_class_list_to_public_post_types() { * Registers the Edit Site Export REST API routes. */ function gutenberg_register_edit_site_export_controller_endpoints() { - $edit_site_export_controller = new WP_REST_Edit_Site_Export_Controller_6_6(); + $edit_site_export_controller = new Gutenberg_REST_Edit_Site_Export_Controller_6_6(); $edit_site_export_controller->register_routes(); }