diff --git a/wp-includes/blocks.php b/wp-includes/blocks.php index d9c47b64ba..98c437cae6 100644 --- a/wp-includes/blocks.php +++ b/wp-includes/blocks.php @@ -219,9 +219,7 @@ function register_block_type_from_metadata( $file_or_folder, $args = array() ) { */ $metadata = apply_filters( 'block_type_metadata', $metadata ); - /** - * Add `style` and `editor_style` for core blocks if missing. - */ + // Add `style` and `editor_style` for core blocks if missing. if ( ! empty( $metadata['name'] ) && 0 === strpos( $metadata['name'], 'core/' ) ) { $block_name = str_replace( 'core/', '', $metadata['name'] ); diff --git a/wp-includes/class-wp-theme-json-resolver.php b/wp-includes/class-wp-theme-json-resolver.php index 5e000c0b51..23d4eb0f61 100644 --- a/wp-includes/class-wp-theme-json-resolver.php +++ b/wp-includes/class-wp-theme-json-resolver.php @@ -112,7 +112,8 @@ class WP_Theme_JSON_Resolver { * @since 5.8.0 * * @param array $i18n_partial A tree that follows the format of i18n-theme.json. - * @param array $current_path Keeps track of the path as we walk down the given tree. + * @param array $current_path Optional. Keeps track of the path as we walk down the given tree. + * Default empty array. * @return array A linear array containing the paths to translate. */ private static function extract_paths_to_translate( $i18n_partial, $current_path = array() ) { @@ -265,7 +266,8 @@ class WP_Theme_JSON_Resolver { * * @since 5.8.0 * - * @param array $theme_support_data Theme support data in theme.json format. Default empty array. + * @param array $theme_support_data Optional. Theme support data in theme.json format. + * Default empty array. * @return WP_Theme_JSON Entity that holds theme data. */ public static function get_theme_data( $theme_support_data = array() ) { @@ -301,8 +303,7 @@ class WP_Theme_JSON_Resolver { * * @since 5.8.0 * - * @param array $settings Existing block editor settings. - * Empty array by default. + * @param array $settings Optional. Existing block editor settings. Default empty array. * @return WP_Theme_JSON */ public static function get_merged_data( $settings = array() ) { @@ -369,5 +370,3 @@ class WP_Theme_JSON_Resolver { } } - -add_action( 'switch_theme', array( 'WP_Theme_JSON_Resolver', 'clean_cached_data' ) ); diff --git a/wp-includes/default-filters.php b/wp-includes/default-filters.php index f5d3fb6b06..0295e7d7e2 100644 --- a/wp-includes/default-filters.php +++ b/wp-includes/default-filters.php @@ -335,6 +335,7 @@ add_action( 'init', '_register_core_block_patterns_and_categories' ); add_action( 'current_screen', '_load_remote_block_patterns' ); add_action( 'init', 'check_theme_switched', 99 ); add_action( 'init', array( 'WP_Block_Supports', 'init' ), 22 ); +add_action( 'switch_theme', array( 'WP_Theme_JSON_Resolver', 'clean_cached_data' ) ); add_action( 'after_switch_theme', '_wp_menus_changed' ); add_action( 'after_switch_theme', '_wp_sidebars_changed' ); add_action( 'wp_print_styles', 'print_emoji_styles' ); diff --git a/wp-includes/version.php b/wp-includes/version.php index 0c640bef3e..f8728c24c8 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.9-alpha-51283'; +$wp_version = '5.9-alpha-51284'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.