diff --git a/wp-includes/block-patterns.php b/wp-includes/block-patterns.php index eb008cd4a2..202bb4bde9 100644 --- a/wp-includes/block-patterns.php +++ b/wp-includes/block-patterns.php @@ -287,7 +287,7 @@ function _register_remote_theme_patterns() { return; } - $pattern_settings = WP_Theme_JSON_Resolver::get_theme_data()->get_patterns(); + $pattern_settings = wp_get_remote_theme_patterns(); if ( empty( $pattern_settings ) ) { return; } diff --git a/wp-includes/global-styles-and-settings.php b/wp-includes/global-styles-and-settings.php index 082370e7b9..f5ea9ed179 100644 --- a/wp-includes/global-styles-and-settings.php +++ b/wp-includes/global-styles-and-settings.php @@ -426,3 +426,15 @@ function wp_clean_theme_json_cache() { wp_cache_delete( 'wp_get_global_styles_custom_css', 'theme_json' ); WP_Theme_JSON_Resolver::clean_cached_data(); } + +/** + * Returns the current theme's wanted patterns (slugs) to be + * registered from Pattern Directory. + * + * @since 6.3.0 + * + * @return string[] + */ +function wp_get_remote_theme_patterns() { + return WP_Theme_JSON_Resolver::get_theme_data( array(), array( 'with_supports' => false ) )->get_patterns(); +} diff --git a/wp-includes/version.php b/wp-includes/version.php index 0348da5335..6c5bcd4ac7 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.3-alpha-55924'; +$wp_version = '6.3-alpha-55926'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.