| @@ -28,18 +28,44 @@ | ||
| 28 | 28 | if ( class_exists( 'WP_REST_Controller' ) ) { |
| 29 | 29 | /** |
| 30 | 30 | * Start: Include for phase 2 |
| 31 | 31 | */ |
| 32 | - if ( ! class_exists( 'WP_REST_Widget_Forms' ) ) { | |
| 33 | - require dirname( __FILE__ ) . '/class-wp-rest-widget-forms.php'; | |
| 32 | + if ( ! class_exists( 'WP_REST_Widget_Utils_Controller' ) ) { | |
| 33 | + require dirname( __FILE__ ) . '/class-wp-rest-widget-utils-controller.php'; | |
| 34 | 34 | } |
| 35 | - if ( ! class_exists( 'WP_REST_Widget_Areas_Controller' ) ) { | |
| 36 | - require dirname( __FILE__ ) . '/class-experimental-wp-widget-blocks-manager.php'; | |
| 37 | - require dirname( __FILE__ ) . '/class-wp-rest-widget-areas-controller.php'; | |
| 35 | + if ( ! class_exists( 'WP_REST_Sidebars_Controller' ) ) { | |
| 36 | + require_once dirname( __FILE__ ) . '/class-wp-rest-sidebars-controller.php'; | |
| 38 | 37 | } |
| 39 | 38 | if ( ! class_exists( 'WP_REST_Block_Directory_Controller' ) ) { |
| 40 | 39 | require dirname( __FILE__ ) . '/class-wp-rest-block-directory-controller.php'; |
| 41 | 40 | } |
| 41 | + if ( ! class_exists( 'WP_REST_Block_Types_Controller' ) ) { | |
| 42 | + require dirname( __FILE__ ) . '/class-wp-rest-block-types-controller.php'; | |
| 43 | + } | |
| 44 | + if ( ! class_exists( 'WP_REST_Menus_Controller' ) ) { | |
| 45 | + require_once dirname( __FILE__ ) . '/class-wp-rest-menus-controller.php'; | |
| 46 | + } | |
| 47 | + if ( ! class_exists( 'WP_REST_Menu_Items_Controller' ) ) { | |
| 48 | + require_once dirname( __FILE__ ) . '/class-wp-rest-menu-items-controller.php'; | |
| 49 | + } | |
| 50 | + if ( ! class_exists( 'WP_REST_Menu_Locations_Controller' ) ) { | |
| 51 | + require_once dirname( __FILE__ ) . '/class-wp-rest-menu-locations-controller.php'; | |
| 52 | + } | |
| 53 | + if ( ! class_exists( 'WP_Rest_Customizer_Nonces' ) ) { | |
| 54 | + require_once dirname( __FILE__ ) . '/class-wp-rest-customizer-nonces.php'; | |
| 55 | + } | |
| 56 | + if ( ! class_exists( 'WP_REST_Image_Editor_Controller' ) ) { | |
| 57 | + require dirname( __FILE__ ) . '/class-wp-rest-image-editor-controller.php'; | |
| 58 | + } | |
| 59 | + if ( ! class_exists( 'WP_REST_Plugins_Controller' ) ) { | |
| 60 | + require_once dirname( __FILE__ ) . '/class-wp-rest-plugins-controller.php'; | |
| 61 | + } | |
| 62 | + if ( ! class_exists( 'WP_REST_Post_Format_Search_Handler' ) ) { | |
| 63 | + require_once dirname( __FILE__ ) . '/class-wp-rest-post-format-search-handler.php'; | |
| 64 | + } | |
| 65 | + if ( ! class_exists( 'WP_REST_Term_Search_Handler' ) ) { | |
| 66 | + require_once dirname( __FILE__ ) . '/class-wp-rest-term-search-handler.php'; | |
| 67 | + } | |
| 42 | 68 | /** |
| 43 | 69 | * End: Include for phase 2 |
| 44 | 70 | */ |
| 45 | 71 | |
| @@ -45,23 +71,53 @@ | ||
| 45 | 71 | |
| 46 | 72 | require dirname( __FILE__ ) . '/rest-api.php'; |
| 47 | 73 | } |
| 48 | 74 | |
| 49 | -if ( ! class_exists( 'WP_Block_Styles_Registry' ) ) { | |
| 50 | - require dirname( __FILE__ ) . '/class-wp-block-styles-registry.php'; | |
| 75 | +if ( ! class_exists( 'WP_Block_Patterns_Registry' ) ) { | |
| 76 | + require dirname( __FILE__ ) . '/class-wp-block-patterns-registry.php'; | |
| 51 | 77 | } |
| 52 | 78 | |
| 79 | +if ( ! class_exists( 'WP_Block_Pattern_Categories_Registry' ) ) { | |
| 80 | + require dirname( __FILE__ ) . '/class-wp-block-pattern-categories-registry.php'; | |
| 81 | +} | |
| 82 | + | |
| 83 | +if ( ! class_exists( 'WP_Block' ) ) { | |
| 84 | + require dirname( __FILE__ ) . '/class-wp-block.php'; | |
| 85 | +} | |
| 86 | + | |
| 87 | +if ( ! class_exists( 'WP_Block_List' ) ) { | |
| 88 | + require dirname( __FILE__ ) . '/class-wp-block-list.php'; | |
| 89 | +} | |
| 90 | +if ( ! class_exists( 'WP_Widget_Block' ) ) { | |
| 91 | + require_once dirname( __FILE__ ) . '/class-wp-widget-block.php'; | |
| 92 | +} | |
| 93 | +require_once dirname( __FILE__ ) . '/widgets-page.php'; | |
| 94 | + | |
| 53 | 95 | require dirname( __FILE__ ) . '/compat.php'; |
| 96 | +require dirname( __FILE__ ) . '/utils.php'; | |
| 54 | 97 | |
| 98 | +// Include FSE related files only if the experiment is enabled. | |
| 99 | +if ( gutenberg_is_experiment_enabled( 'gutenberg-full-site-editing' ) ) { | |
| 100 | + require dirname( __FILE__ ) . '/templates.php'; | |
| 101 | + require dirname( __FILE__ ) . '/template-parts.php'; | |
| 102 | + require dirname( __FILE__ ) . '/template-loader.php'; | |
| 103 | + require dirname( __FILE__ ) . '/edit-site-page.php'; | |
| 104 | + require dirname( __FILE__ ) . '/edit-site-export.php'; | |
| 105 | +} | |
| 106 | + | |
| 107 | +require dirname( __FILE__ ) . '/block-patterns.php'; | |
| 55 | 108 | require dirname( __FILE__ ) . '/blocks.php'; |
| 56 | -require dirname( __FILE__ ) . '/templates.php'; | |
| 57 | -require dirname( __FILE__ ) . '/template-parts.php'; | |
| 58 | -require dirname( __FILE__ ) . '/template-loader.php'; | |
| 59 | 109 | require dirname( __FILE__ ) . '/client-assets.php'; |
| 60 | 110 | require dirname( __FILE__ ) . '/block-directory.php'; |
| 61 | 111 | require dirname( __FILE__ ) . '/demo.php'; |
| 62 | 112 | require dirname( __FILE__ ) . '/widgets.php'; |
| 63 | -require dirname( __FILE__ ) . '/widgets-page.php'; | |
| 113 | +require dirname( __FILE__ ) . '/navigation.php'; | |
| 114 | +require dirname( __FILE__ ) . '/navigation-page.php'; | |
| 64 | 115 | require dirname( __FILE__ ) . '/experiments-page.php'; |
| 65 | 116 | require dirname( __FILE__ ) . '/customizer.php'; |
| 66 | -require dirname( __FILE__ ) . '/edit-site-page.php'; | |
| 67 | 117 | require dirname( __FILE__ ) . '/global-styles.php'; |
| 118 | +require dirname( __FILE__ ) . '/block-supports/index.php'; | |
| 119 | +require dirname( __FILE__ ) . '/block-supports/align.php'; | |
| 120 | +require dirname( __FILE__ ) . '/block-supports/colors.php'; | |
| 121 | +require dirname( __FILE__ ) . '/block-supports/typography.php'; | |
| 122 | +require dirname( __FILE__ ) . '/block-supports/custom-classname.php'; | |
| 123 | +require dirname( __FILE__ ) . '/block-supports/generated-classname.php'; | |