-
Notifications
You must be signed in to change notification settings - Fork 4.3k
/
Copy pathload.php
132 lines (118 loc) · 4.74 KB
/
load.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
<?php
/**
* Load API functions, register scripts and actions, etc.
*
* @package gutenberg
*/
if ( ! defined( 'ABSPATH' ) ) {
die( 'Silence is golden.' );
}
/**
* Checks whether the Gutenberg experiment is enabled.
*
* @since 6.7.0
*
* @param string $name The name of the experiment.
*
* @return bool True when the experiment is enabled.
*/
function gutenberg_is_experiment_enabled( $name ) {
$experiments = get_option( 'gutenberg-experiments' );
return ! empty( $experiments[ $name ] );
}
// These files only need to be loaded if within a rest server instance
// which this class will exist if that is the case.
if ( class_exists( 'WP_REST_Controller' ) ) {
/**
* Start: Include for phase 2
*/
if ( ! class_exists( 'WP_REST_Sidebars_Controller' ) ) {
require_once dirname( __FILE__ ) . '/class-wp-rest-sidebars-controller.php';
}
if ( ! class_exists( 'WP_REST_Widget_Types_Controller' ) ) {
require_once dirname( __FILE__ ) . '/class-wp-rest-widget-types-controller.php';
}
if ( ! class_exists( 'WP_REST_Widgets_Controller' ) ) {
require_once dirname( __FILE__ ) . '/class-wp-rest-widgets-controller.php';
}
if ( ! class_exists( 'WP_REST_Block_Directory_Controller' ) ) {
require dirname( __FILE__ ) . '/class-wp-rest-block-directory-controller.php';
}
if ( ! class_exists( 'WP_REST_Block_Types_Controller' ) ) {
require dirname( __FILE__ ) . '/class-wp-rest-block-types-controller.php';
}
if ( ! class_exists( 'WP_REST_Menus_Controller' ) ) {
require_once dirname( __FILE__ ) . '/class-wp-rest-menus-controller.php';
}
if ( ! class_exists( 'WP_REST_Menu_Items_Controller' ) ) {
require_once dirname( __FILE__ ) . '/class-wp-rest-menu-items-controller.php';
}
if ( ! class_exists( 'WP_REST_Menu_Locations_Controller' ) ) {
require_once dirname( __FILE__ ) . '/class-wp-rest-menu-locations-controller.php';
}
if ( ! class_exists( 'WP_Rest_Customizer_Nonces' ) ) {
require_once dirname( __FILE__ ) . '/class-wp-rest-customizer-nonces.php';
}
if ( ! class_exists( 'WP_REST_Image_Editor_Controller' ) ) {
require dirname( __FILE__ ) . '/class-wp-rest-image-editor-controller.php';
}
if ( ! class_exists( 'WP_REST_Plugins_Controller' ) ) {
require_once dirname( __FILE__ ) . '/class-wp-rest-plugins-controller.php';
}
if ( ! class_exists( 'WP_REST_Post_Format_Search_Handler' ) ) {
require_once dirname( __FILE__ ) . '/class-wp-rest-post-format-search-handler.php';
}
if ( ! class_exists( 'WP_REST_Term_Search_Handler' ) ) {
require_once dirname( __FILE__ ) . '/class-wp-rest-term-search-handler.php';
}
if ( ! class_exists( 'WP_REST_Batch_Controller' ) ) {
require_once dirname( __FILE__ ) . '/class-wp-rest-batch-controller.php';
}
/**
* End: Include for phase 2
*/
require dirname( __FILE__ ) . '/rest-api.php';
}
if ( ! class_exists( 'WP_Block_Patterns_Registry' ) ) {
require dirname( __FILE__ ) . '/class-wp-block-patterns-registry.php';
}
if ( ! class_exists( 'WP_Block_Pattern_Categories_Registry' ) ) {
require dirname( __FILE__ ) . '/class-wp-block-pattern-categories-registry.php';
}
if ( ! class_exists( 'WP_Block' ) ) {
require dirname( __FILE__ ) . '/class-wp-block.php';
}
if ( ! class_exists( 'WP_Block_List' ) ) {
require dirname( __FILE__ ) . '/class-wp-block-list.php';
}
if ( ! class_exists( 'WP_Widget_Block' ) ) {
require_once dirname( __FILE__ ) . '/class-wp-widget-block.php';
}
require_once dirname( __FILE__ ) . '/widgets-page.php';
require dirname( __FILE__ ) . '/compat.php';
require dirname( __FILE__ ) . '/utils.php';
require dirname( __FILE__ ) . '/full-site-editing.php';
require dirname( __FILE__ ) . '/templates-sync.php';
require dirname( __FILE__ ) . '/templates.php';
require dirname( __FILE__ ) . '/template-parts.php';
require dirname( __FILE__ ) . '/template-loader.php';
require dirname( __FILE__ ) . '/edit-site-page.php';
require dirname( __FILE__ ) . '/edit-site-export.php';
require dirname( __FILE__ ) . '/block-patterns.php';
require dirname( __FILE__ ) . '/blocks.php';
require dirname( __FILE__ ) . '/client-assets.php';
require dirname( __FILE__ ) . '/block-directory.php';
require dirname( __FILE__ ) . '/demo.php';
require dirname( __FILE__ ) . '/widgets.php';
require dirname( __FILE__ ) . '/navigation.php';
require dirname( __FILE__ ) . '/navigation-page.php';
require dirname( __FILE__ ) . '/experiments-page.php';
require dirname( __FILE__ ) . '/global-styles.php';
if ( ! class_exists( 'WP_Block_Supports' ) ) {
require_once dirname( __FILE__ ) . '/class-wp-block-supports.php';
}
require dirname( __FILE__ ) . '/block-supports/generated-classname.php';
require dirname( __FILE__ ) . '/block-supports/colors.php';
require dirname( __FILE__ ) . '/block-supports/align.php';
require dirname( __FILE__ ) . '/block-supports/typography.php';
require dirname( __FILE__ ) . '/block-supports/custom-classname.php';