From 150bea29a193badacd2dd0ef42b998995afbd31e Mon Sep 17 00:00:00 2001 From: Nick Diego Date: Thu, 30 Jun 2022 07:39:49 -0500 Subject: [PATCH 1/2] Remove core and remote pattern checks --- src/wp-includes/block-patterns.php | 9 --------- 1 file changed, 9 deletions(-) diff --git a/src/wp-includes/block-patterns.php b/src/wp-includes/block-patterns.php index 58ec8443b147e..b1ea05737e576 100644 --- a/src/wp-includes/block-patterns.php +++ b/src/wp-includes/block-patterns.php @@ -133,15 +133,6 @@ function _load_remote_featured_patterns() { * @access private */ function _register_remote_theme_patterns() { - if ( ! get_theme_support( 'core-block-patterns' ) ) { - return; - } - - /** This filter is documented in wp-includes/block-patterns.php */ - if ( ! apply_filters( 'should_load_remote_block_patterns', true ) ) { - return; - } - if ( ! WP_Theme_JSON_Resolver::theme_has_support() ) { return; } From fda21f48934eedfde923989e323991bea55fe927 Mon Sep 17 00:00:00 2001 From: Nick Diego Date: Mon, 4 Jul 2022 15:29:04 -0500 Subject: [PATCH 2/2] Add back remote check. --- src/wp-includes/block-patterns.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/wp-includes/block-patterns.php b/src/wp-includes/block-patterns.php index b1ea05737e576..5c3f7518b8edf 100644 --- a/src/wp-includes/block-patterns.php +++ b/src/wp-includes/block-patterns.php @@ -133,6 +133,11 @@ function _load_remote_featured_patterns() { * @access private */ function _register_remote_theme_patterns() { + /** This filter is documented in wp-includes/block-patterns.php */ + if ( ! apply_filters( 'should_load_remote_block_patterns', true ) ) { + return; + } + if ( ! WP_Theme_JSON_Resolver::theme_has_support() ) { return; }