Make WordPress Core


Ignore:
Timestamp:
06/01/2021 11:08:29 PM (4 years ago)
Author:
SergeyBiryukov
Message:

Block Editor: Load the WP_Theme_JSON_Resolver class in wp-admin/load-styles.php.

This ensures correct load order when style concatenation is used, e.g. when SCRIPT_DEBUG is off.

Additionally, make sure the WP_CONTENT_DIR constant is defined for use in get_theme_root() via get_stylesheet_directory().

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

Props nosolosw.
See #53175.

File:
1 edited

Legend:

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

    r51023 r51056  
    3434/** WordPress Styles Functions */
    3535require ABSPATH . WPINC . '/functions.wp-styles.php';
    36 
    37 // get_stylesheet_directory() is used by WP_Theme_JSON_Resolver::theme_has_support().
    38 if ( ! function_exists( 'get_stylesheet_directory' ) ) {
    39     require_once ABSPATH . WPINC . '/theme.php';
    40 }
    41 if ( ! class_exists( 'WP_Theme_JSON_Resolver' ) ) {
    42     require_once ABSPATH . WPINC . '/class-wp-theme-json-resolver.php';
    43 }
    4436
    4537/**
Note: See TracChangeset for help on using the changeset viewer.