| 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 |
require dirname( __FILE__ ) . '/class-wp-rest-blocks-controller.php'; |
| 16 |
require dirname( __FILE__ ) . '/class-wp-rest-autosaves-controller.php'; |
| 17 |
require dirname( __FILE__ ) . '/class-wp-rest-block-renderer-controller.php'; |
| 18 |
require dirname( __FILE__ ) . '/class-wp-rest-search-controller.php'; |
| 19 |
require dirname( __FILE__ ) . '/class-wp-rest-search-handler.php'; |
| 20 |
require dirname( __FILE__ ) . '/class-wp-rest-post-search-handler.php'; |
| 21 |
require dirname( __FILE__ ) . '/rest-api.php'; |
| 22 |
} |
| 23 |
|
| 24 |
require dirname( __FILE__ ) . '/meta-box-partial-page.php'; |
| 25 |
require dirname( __FILE__ ) . '/class-wp-block-type.php'; |
| 26 |
require dirname( __FILE__ ) . '/class-wp-block-type-registry.php'; |
| 27 |
require dirname( __FILE__ ) . '/blocks.php'; |
| 28 |
require dirname( __FILE__ ) . '/client-assets.php'; |
| 29 |
require dirname( __FILE__ ) . '/compat.php'; |
| 30 |
require dirname( __FILE__ ) . '/plugin-compat.php'; |
| 31 |
require dirname( __FILE__ ) . '/i18n.php'; |
| 32 |
require dirname( __FILE__ ) . '/register.php'; |
| 33 |
|
| 34 |
|
| 35 |
// Register server-side code for individual blocks. |
| 36 |
require dirname( __FILE__ ) . '/../packages/block-library/src/archives/index.php'; |
| 37 |
require dirname( __FILE__ ) . '/../packages/block-library/src/block/index.php'; |
| 38 |
require dirname( __FILE__ ) . '/../packages/block-library/src/categories/index.php'; |
| 39 |
require dirname( __FILE__ ) . '/../packages/block-library/src/latest-comments/index.php'; |
| 40 |
require dirname( __FILE__ ) . '/../packages/block-library/src/latest-posts/index.php'; |
| 41 |
require dirname( __FILE__ ) . '/../packages/block-library/src/shortcode/index.php'; |
| 42 |
|