PluginProbe
Gutenberg / 4.2.0
Gutenberg v4.2.0
23.9.1 23.9.0 23.8.0 23.7.2 23.7.1 23.7.0 23.6.1 23.6.2 23.6.0 23.5.3 23.5.2 23.5.1 23.5.0 23.4.0 23.3.2 23.3.1 23.3.0 23.2.0 23.2.1 23.2.2 23.1.1 23.1.0 23.0.1 12.6.0 7.4.0 All 402 releases
gutenberg / lib / load.php

load.php in Gutenberg 4.2.0, at lib/load.php

77 lines 2.9 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
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 if ( ! class_exists( 'WP_REST_Blocks_Controller' ) ) {
16 require dirname( __FILE__ ) . '/class-wp-rest-blocks-controller.php';
17 }
18 if ( ! class_exists( 'WP_REST_Autosaves_Controller' ) ) {
19 require dirname( __FILE__ ) . '/class-wp-rest-autosaves-controller.php';
20 }
21 if ( ! class_exists( 'WP_REST_Themes_Controller' ) ) {
22 require dirname( __FILE__ ) . '/class-wp-rest-themes-controller.php';
23 }
24 if ( ! class_exists( 'WP_REST_Block_Renderer_Controller' ) ) {
25 require dirname( __FILE__ ) . '/class-wp-rest-block-renderer-controller.php';
26 }
27 if ( ! class_exists( 'WP_REST_Search_Controller' ) ) {
28 require dirname( __FILE__ ) . '/class-wp-rest-search-controller.php';
29 }
30 if ( ! class_exists( 'WP_REST_Search_Handler' ) ) {
31 require dirname( __FILE__ ) . '/class-wp-rest-search-handler.php';
32 }
33 if ( ! class_exists( 'WP_REST_Post_Search_Handler' ) ) {
34 require dirname( __FILE__ ) . '/class-wp-rest-post-search-handler.php';
35 }
36
37 require dirname( __FILE__ ) . '/rest-api.php';
38 }
39
40 require dirname( __FILE__ ) . '/meta-box-partial-page.php';
41 if ( ! class_exists( 'WP_Block_Type' ) ) {
42 require dirname( __FILE__ ) . '/class-wp-block-type.php';
43 }
44 if ( ! class_exists( 'WP_Block_Type_Registry' ) ) {
45 require dirname( __FILE__ ) . '/class-wp-block-type-registry.php';
46 }
47 require dirname( __FILE__ ) . '/blocks.php';
48 require dirname( __FILE__ ) . '/client-assets.php';
49 require dirname( __FILE__ ) . '/compat.php';
50 require dirname( __FILE__ ) . '/plugin-compat.php';
51 require dirname( __FILE__ ) . '/i18n.php';
52 require dirname( __FILE__ ) . '/register.php';
53
54
55 // Register server-side code for individual blocks.
56 if ( ! function_exists( 'render_block_core_archives' ) ) {
57 require dirname( __FILE__ ) . '/../packages/block-library/src/archives/index.php';
58 }
59 if ( ! function_exists( 'render_block_core_block' ) ) {
60 require dirname( __FILE__ ) . '/../packages/block-library/src/block/index.php';
61 }
62 if ( ! function_exists( 'render_block_core_categories' ) ) {
63 require dirname( __FILE__ ) . '/../packages/block-library/src/categories/index.php';
64 }
65 // Currently merged in core as `gutenberg_render_block_core_latest_comments`,
66 // expected to change soon.
67 if ( ! function_exists( 'render_block_core_latest_comments' )
68 && ! function_exists( 'gutenberg_render_block_core_latest_comments' ) ) {
69 require dirname( __FILE__ ) . '/../packages/block-library/src/latest-comments/index.php';
70 }
71 if ( ! function_exists( 'render_block_core_latest_posts' ) ) {
72 require dirname( __FILE__ ) . '/../packages/block-library/src/latest-posts/index.php';
73 }
74 if ( ! function_exists( 'render_block_core_shortcode' ) ) {
75 require dirname( __FILE__ ) . '/../packages/block-library/src/shortcode/index.php';
76 }
77