Make WordPress Core

Changeset 51013


Ignore:
Timestamp:
05/25/2021 09:39:38 PM (3 years ago)
Author:
SergeyBiryukov
Message:

Block Editor: Only load the WP_Theme_JSON_Resolver class once.

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.

Location:
trunk/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/script-loader.php

    r51003 r51013  
    3535require ABSPATH . WPINC . '/functions.wp-styles.php';
    3636
    37 /**
    38  * get_stylsheet_directory is used by
    39  * WP_Theme_JSON_Resolver::theme_has_support()
    40  */
     37// get_stylesheet_directory() is used by WP_Theme_JSON_Resolver::theme_has_support().
    4138if ( ! function_exists( 'get_stylesheet_directory' ) ) {
    4239    require_once ABSPATH . WPINC . '/theme.php';
  • trunk/src/wp-settings.php

    r51003 r51013  
    171171require ABSPATH . WPINC . '/theme.php';
    172172require ABSPATH . WPINC . '/class-wp-theme.php';
     173require ABSPATH . WPINC . '/class-wp-theme-json.php';
    173174require ABSPATH . WPINC . '/class-wp-block-template.php';
    174175require ABSPATH . WPINC . '/block-template-utils.php';
     
    304305require ABSPATH . WPINC . '/blocks.php';
    305306require ABSPATH . WPINC . '/blocks/index.php';
    306 require ABSPATH . WPINC . '/class-wp-theme-json.php';
    307 require_once ABSPATH . WPINC . '/class-wp-theme-json-resolver.php';
    308307require ABSPATH . WPINC . '/block-editor.php';
    309308require ABSPATH . WPINC . '/block-patterns.php';
Note: See TracChangeset for help on using the changeset viewer.