Skip to content

Commit

Permalink
Block Editor: Only load the WP_Theme_JSON_Resolver class once.
Browse files Browse the repository at this point in the history
Since the class is now loaded via `wp-includes/script-loader.php`, which is required earlier in `wp-settings.php`, loading it again in `wp-settings.php` is redundant.

Follow-up to [50992], [51001].

See #53175.
Built from https://develop.svn.wordpress.org/trunk@51013


git-svn-id: http://core.svn.wordpress.org/trunk@50622 1a063a9b-81f0-0310-95a4-ce76da25c4cd
  • Loading branch information
SergeyBiryukov committed May 25, 2021
1 parent d8b8ceb commit 3c3a18a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
5 changes: 1 addition & 4 deletions wp-includes/script-loader.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,7 @@
/** WordPress Styles Functions */
require ABSPATH . WPINC . '/functions.wp-styles.php';

/**
* get_stylsheet_directory is used by
* WP_Theme_JSON_Resolver::theme_has_support()
*/
// get_stylesheet_directory() is used by WP_Theme_JSON_Resolver::theme_has_support().
if ( ! function_exists( 'get_stylesheet_directory' ) ) {
require_once ABSPATH . WPINC . '/theme.php';
}
Expand Down
2 changes: 1 addition & 1 deletion wp-includes/version.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.8-alpha-51012';
$wp_version = '5.8-alpha-51013';

/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
Expand Down
3 changes: 1 addition & 2 deletions wp-settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@
require ABSPATH . WPINC . '/class-wp-date-query.php';
require ABSPATH . WPINC . '/theme.php';
require ABSPATH . WPINC . '/class-wp-theme.php';
require ABSPATH . WPINC . '/class-wp-theme-json.php';
require ABSPATH . WPINC . '/class-wp-block-template.php';
require ABSPATH . WPINC . '/block-template-utils.php';
require ABSPATH . WPINC . '/block-template.php';
Expand Down Expand Up @@ -303,8 +304,6 @@
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_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';
Expand Down

0 comments on commit 3c3a18a

Please sign in to comment.