Skip to content

Commit

Permalink
Remove unneeded type cast
Browse files Browse the repository at this point in the history
  • Loading branch information
hellofromtonya committed Feb 2, 2023
1 parent 1a0faab commit 3a4bc08
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/wp-includes/block-patterns.php
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ function _load_remote_block_patterns( $deprecated = null ) {
foreach ( $patterns as $pattern ) {
$normalized_pattern = _normalize_remote_pattern( $pattern );
$pattern_name = 'core/' . sanitize_title( $normalized_pattern['title'] );
register_block_pattern( $pattern_name, (array) $normalized_pattern );
register_block_pattern( $pattern_name, $normalized_pattern );
}
}
}
Expand Down Expand Up @@ -263,7 +263,7 @@ function _load_remote_featured_patterns() {
// Some patterns might be already registered as core patterns with the `core` prefix.
$is_registered = $registry->is_registered( $pattern_name ) || $registry->is_registered( "core/$pattern_name" );
if ( ! $is_registered ) {
register_block_pattern( $pattern_name, (array) $normalized_pattern );
register_block_pattern( $pattern_name, $normalized_pattern );
}
}
}
Expand Down Expand Up @@ -306,7 +306,7 @@ function _register_remote_theme_patterns() {
// Some patterns might be already registered as core patterns with the `core` prefix.
$is_registered = $patterns_registry->is_registered( $pattern_name ) || $patterns_registry->is_registered( "core/$pattern_name" );
if ( ! $is_registered ) {
register_block_pattern( $pattern_name, (array) $normalized_pattern );
register_block_pattern( $pattern_name, $normalized_pattern );
}
}
}
Expand Down

0 comments on commit 3a4bc08

Please sign in to comment.