mirror of
git://develop.git.wordpress.org/
synced 2025-01-18 05:18:42 +01:00
Block Editor: Load theme resolver class in script loader.
script-loader.php is sometimes called directly and in these situations, the Theme_JSON_Resolver class was not defined. Props nosolosw, noisysocks. Fixes #53175. git-svn-id: https://develop.svn.wordpress.org/trunk@51001 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
3d5a37a9bc
commit
d66ccc0061
@ -34,6 +34,17 @@ require ABSPATH . WPINC . '/class.wp-styles.php';
|
||||
/** WordPress Styles Functions */
|
||||
require ABSPATH . WPINC . '/functions.wp-styles.php';
|
||||
|
||||
/**
|
||||
* get_stylsheet_directory is used by
|
||||
* WP_Theme_JSON_Resolver::theme_has_support()
|
||||
*/
|
||||
if ( ! function_exists( 'get_stylesheet_directory' ) ) {
|
||||
require_once ABSPATH . WPINC . '/theme.php';
|
||||
}
|
||||
if ( ! class_exists( 'WP_Theme_JSON_Resolver' ) ) {
|
||||
require_once ABSPATH . WPINC . '/class-wp-theme-json-resolver.php';
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers TinyMCE scripts.
|
||||
*
|
||||
|
@ -299,7 +299,7 @@ require ABSPATH . WPINC . '/class-wp-block-parser.php';
|
||||
require ABSPATH . WPINC . '/blocks.php';
|
||||
require ABSPATH . WPINC . '/blocks/index.php';
|
||||
require ABSPATH . WPINC . '/class-wp-theme-json.php';
|
||||
require ABSPATH . WPINC . '/class-wp-theme-json-resolver.php';
|
||||
require_once ABSPATH . WPINC . '/class-wp-theme-json-resolver.php';
|
||||
require ABSPATH . WPINC . '/block-editor.php';
|
||||
require ABSPATH . WPINC . '/block-patterns.php';
|
||||
require ABSPATH . WPINC . '/class-wp-block-supports.php';
|
||||
|
Loading…
x
Reference in New Issue
Block a user