From a623dbea3815742f3e676cf7da093a2884800781 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Greg=20Zi=C3=B3=C5=82kowski?= Date: Thu, 31 Mar 2022 13:34:17 +0200 Subject: [PATCH] Plugin: Move files from `lib` to the `compat` subfolder (#39904) --- .../class-wp-rest-menu-items-controller.php | 0 ...lass-wp-rest-menu-locations-controller.php | 0 .../class-wp-rest-menus-controller.php | 0 .../class-wp-rest-url-details-controller.php | 0 .../wordpress-6.0/block-patterns-update.php} | 0 .../block-editor-settings-mobile.php | 0 lib/{compat => }/experimental/blocks.php | 0 ...-rest-block-editor-settings-controller.php | 0 ...rest-block-navigation-areas-controller.php | 0 .../class-wp-rest-customizer-nonces.php | 0 lib/load.php | 20 +++++++++---------- 11 files changed, 10 insertions(+), 10 deletions(-) rename lib/{ => compat/wordpress-5.9}/class-wp-rest-menu-items-controller.php (100%) rename lib/{ => compat/wordpress-5.9}/class-wp-rest-menu-locations-controller.php (100%) rename lib/{ => compat/wordpress-5.9}/class-wp-rest-menus-controller.php (100%) rename lib/{ => compat/wordpress-5.9}/class-wp-rest-url-details-controller.php (100%) rename lib/{block-patterns.php => compat/wordpress-6.0/block-patterns-update.php} (100%) rename lib/{compat => }/experimental/block-editor-settings-mobile.php (100%) rename lib/{compat => }/experimental/blocks.php (100%) rename lib/{ => experimental}/class-wp-rest-block-editor-settings-controller.php (100%) rename lib/{ => experimental}/class-wp-rest-block-navigation-areas-controller.php (100%) rename lib/{ => experimental}/class-wp-rest-customizer-nonces.php (100%) diff --git a/lib/class-wp-rest-menu-items-controller.php b/lib/compat/wordpress-5.9/class-wp-rest-menu-items-controller.php similarity index 100% rename from lib/class-wp-rest-menu-items-controller.php rename to lib/compat/wordpress-5.9/class-wp-rest-menu-items-controller.php diff --git a/lib/class-wp-rest-menu-locations-controller.php b/lib/compat/wordpress-5.9/class-wp-rest-menu-locations-controller.php similarity index 100% rename from lib/class-wp-rest-menu-locations-controller.php rename to lib/compat/wordpress-5.9/class-wp-rest-menu-locations-controller.php diff --git a/lib/class-wp-rest-menus-controller.php b/lib/compat/wordpress-5.9/class-wp-rest-menus-controller.php similarity index 100% rename from lib/class-wp-rest-menus-controller.php rename to lib/compat/wordpress-5.9/class-wp-rest-menus-controller.php diff --git a/lib/class-wp-rest-url-details-controller.php b/lib/compat/wordpress-5.9/class-wp-rest-url-details-controller.php similarity index 100% rename from lib/class-wp-rest-url-details-controller.php rename to lib/compat/wordpress-5.9/class-wp-rest-url-details-controller.php diff --git a/lib/block-patterns.php b/lib/compat/wordpress-6.0/block-patterns-update.php similarity index 100% rename from lib/block-patterns.php rename to lib/compat/wordpress-6.0/block-patterns-update.php diff --git a/lib/compat/experimental/block-editor-settings-mobile.php b/lib/experimental/block-editor-settings-mobile.php similarity index 100% rename from lib/compat/experimental/block-editor-settings-mobile.php rename to lib/experimental/block-editor-settings-mobile.php diff --git a/lib/compat/experimental/blocks.php b/lib/experimental/blocks.php similarity index 100% rename from lib/compat/experimental/blocks.php rename to lib/experimental/blocks.php diff --git a/lib/class-wp-rest-block-editor-settings-controller.php b/lib/experimental/class-wp-rest-block-editor-settings-controller.php similarity index 100% rename from lib/class-wp-rest-block-editor-settings-controller.php rename to lib/experimental/class-wp-rest-block-editor-settings-controller.php diff --git a/lib/class-wp-rest-block-navigation-areas-controller.php b/lib/experimental/class-wp-rest-block-navigation-areas-controller.php similarity index 100% rename from lib/class-wp-rest-block-navigation-areas-controller.php rename to lib/experimental/class-wp-rest-block-navigation-areas-controller.php diff --git a/lib/class-wp-rest-customizer-nonces.php b/lib/experimental/class-wp-rest-customizer-nonces.php similarity index 100% rename from lib/class-wp-rest-customizer-nonces.php rename to lib/experimental/class-wp-rest-customizer-nonces.php diff --git a/lib/load.php b/lib/load.php index 404c9b66a9f2ab..257b49acf6c3d8 100644 --- a/lib/load.php +++ b/lib/load.php @@ -32,27 +32,27 @@ function gutenberg_is_experiment_enabled( $name ) { // which this class will exist if that is the case. if ( class_exists( 'WP_REST_Controller' ) ) { if ( ! class_exists( 'WP_REST_Menus_Controller' ) ) { - require_once __DIR__ . '/class-wp-rest-menus-controller.php'; + require_once __DIR__ . '/compat/wordpress-5.9/class-wp-rest-menus-controller.php'; } if ( ! class_exists( 'WP_REST_Menu_Items_Controller' ) ) { - require_once __DIR__ . '/class-wp-rest-menu-items-controller.php'; + require_once __DIR__ . '/compat/wordpress-5.9/class-wp-rest-menu-items-controller.php'; } if ( ! class_exists( 'WP_REST_Block_Navigation_Areas_Controller' ) ) { - require_once __DIR__ . '/class-wp-rest-block-navigation-areas-controller.php'; + require_once __DIR__ . '/experimental/class-wp-rest-block-navigation-areas-controller.php'; } if ( ! class_exists( 'WP_REST_Menu_Locations_Controller' ) ) { - require_once __DIR__ . '/class-wp-rest-menu-locations-controller.php'; + require_once __DIR__ . '/compat/wordpress-5.9/class-wp-rest-menu-locations-controller.php'; } if ( ! class_exists( 'WP_Rest_Customizer_Nonces' ) ) { - require_once __DIR__ . '/class-wp-rest-customizer-nonces.php'; + require_once __DIR__ . '/experimental/class-wp-rest-customizer-nonces.php'; } require_once __DIR__ . '/compat/wordpress-5.9/class-gutenberg-rest-templates-controller.php'; if ( ! class_exists( 'WP_REST_Block_Editor_Settings_Controller' ) ) { - require_once dirname( __FILE__ ) . '/class-wp-rest-block-editor-settings-controller.php'; + require_once __DIR__ . '/experimental/class-wp-rest-block-editor-settings-controller.php'; } if ( ! class_exists( 'WP_REST_URL_Details_Controller' ) ) { - require_once __DIR__ . '/class-wp-rest-url-details-controller.php'; + require_once __DIR__ . '/compat/wordpress-5.9/class-wp-rest-url-details-controller.php'; } require __DIR__ . '/rest-api.php'; @@ -68,7 +68,7 @@ function gutenberg_is_experiment_enabled( $name ) { require __DIR__ . '/compat/wordpress-5.9/register-global-styles-cpt.php'; require __DIR__ . '/compat/wordpress-5.9/script-loader.php'; require __DIR__ . '/compat/wordpress-6.0/block-editor-settings.php'; -require __DIR__ . '/compat/experimental/block-editor-settings-mobile.php'; +require __DIR__ . '/experimental/block-editor-settings-mobile.php'; require __DIR__ . '/compat/wordpress-6.0/get-global-styles-and-settings.php'; require __DIR__ . '/compat/wordpress-5.9/render-svg-filters.php'; require __DIR__ . '/compat/wordpress-5.9/json-file-decode.php'; @@ -110,10 +110,10 @@ function gutenberg_is_experiment_enabled( $name ) { require __DIR__ . '/compat/wordpress-6.0/class-wp-webfonts-provider-local.php'; require __DIR__ . '/compat/wordpress-6.0/webfonts.php'; require __DIR__ . '/compat/wordpress-6.0/edit-form-blocks.php'; -require __DIR__ . '/compat/experimental/blocks.php'; +require __DIR__ . '/experimental/blocks.php'; require __DIR__ . '/blocks.php'; -require __DIR__ . '/block-patterns.php'; +require __DIR__ . '/compat/wordpress-6.0/block-patterns-update.php'; require __DIR__ . '/client-assets.php'; require __DIR__ . '/demo.php'; require __DIR__ . '/navigation.php';