Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
split checks
  • Loading branch information
ntsekouras committed Mar 16, 2022
commit ac9298f1c158e148c38d1941a6106384db74c0d7
10 changes: 7 additions & 3 deletions lib/compat/wordpress-6.0/block-patterns.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,13 @@ function gutenberg_register_remote_theme_patterns() {
add_action(
'current_screen',
function( $current_screen ) {
$should_load_remote = apply_filters( 'should_load_remote_block_patterns', true );
$theme_has_support = WP_Theme_JSON_Resolver_Gutenberg::theme_has_support();
if ( ! get_theme_support( 'core-block-patterns' ) || ! $should_load_remote || ! $theme_has_support ) {
if ( ! get_theme_support( 'core-block-patterns' ) ) {
return;
}
if ( ! apply_filters( 'should_load_remote_block_patterns', true ) ) {
return;
}
if ( ! WP_Theme_JSON_Resolver_Gutenberg::theme_has_support() ) {
return;
}

Expand Down