| 1 |
<?php |
| 2 |
/** |
| 3 |
* Load API functions, register scripts and actions, etc. |
| 4 |
* |
| 5 |
* @package gutenberg |
| 6 |
*/ |
| 7 |
|
| 8 |
if ( ! defined( 'ABSPATH' ) ) { |
| 9 |
die( 'Silence is golden.' ); |
| 10 |
} |
| 11 |
|
| 12 |
// These files only need to be loaded if within a rest server instance |
| 13 |
// which this class will exist if that is the case. |
| 14 |
if ( class_exists( 'WP_REST_Controller' ) ) { |
| 15 |
/** |
| 16 |
* Start: Include for phase 2 |
| 17 |
*/ |
| 18 |
if ( ! class_exists( 'WP_REST_Widget_Updater_Controller' ) ) { |
| 19 |
require dirname( __FILE__ ) . '/class-wp-rest-widget-updater-controller.php'; |
| 20 |
} |
| 21 |
if ( ! class_exists( 'WP_REST_Widget_Areas_Controller' ) ) { |
| 22 |
require dirname( __FILE__ ) . '/class-experimental-wp-widget-blocks-manager.php'; |
| 23 |
require dirname( __FILE__ ) . '/class-wp-rest-widget-areas-controller.php'; |
| 24 |
} |
| 25 |
/** |
| 26 |
* End: Include for phase 2 |
| 27 |
*/ |
| 28 |
|
| 29 |
if ( ! class_exists( 'WP_REST_Block_Directory_Controller' ) ) { |
| 30 |
require dirname( __FILE__ ) . '/class-wp-rest-block-directory-controller.php'; |
| 31 |
} |
| 32 |
|
| 33 |
require dirname( __FILE__ ) . '/rest-api.php'; |
| 34 |
} |
| 35 |
|
| 36 |
if ( ! class_exists( 'WP_Block_Styles_Registry' ) ) { |
| 37 |
require dirname( __FILE__ ) . '/class-wp-block-styles-registry.php'; |
| 38 |
} |
| 39 |
|
| 40 |
require dirname( __FILE__ ) . '/compat.php'; |
| 41 |
|
| 42 |
require dirname( __FILE__ ) . '/blocks.php'; |
| 43 |
require dirname( __FILE__ ) . '/client-assets.php'; |
| 44 |
require dirname( __FILE__ ) . '/demo.php'; |
| 45 |
require dirname( __FILE__ ) . '/widgets.php'; |
| 46 |
require dirname( __FILE__ ) . '/widgets-page.php'; |
| 47 |
require dirname( __FILE__ ) . '/experiments-page.php'; |
| 48 |
require dirname( __FILE__ ) . '/customizer.php'; |
| 49 |
|