Skip to content

Commit

Permalink
Switch to block_has_support method to check for support
Browse files Browse the repository at this point in the history
  • Loading branch information
glendaviesnz committed Jan 19, 2023
1 parent e5e98e1 commit 474d634
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions lib/block-supports/shadow.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,8 @@
* @param WP_Block_Type $block_type Block Type.
*/
function gutenberg_register_shadow_support( $block_type ) {
if ( ! property_exists( $block_type, 'supports' ) ) {
return;
}
$has_shadow_support = block_has_support( $block_type, array( 'shadow' ), false );

$has_shadow_support = true; // _wp_array_get( $block_type->supports, array( 'shadow' ), false );
if ( ! $has_shadow_support ) {
return;
}
Expand Down Expand Up @@ -52,7 +49,7 @@ function gutenberg_apply_shadow_support( $block_type, $block_attributes ) {
return array();
}

$has_shadow_support = true; // _wp_array_get( $block_type->supports, array( 'shadow' ), false );
$has_shadow_support = _wp_array_get( $block_type->supports, array( 'shadow' ), false );
if ( ! $has_shadow_support ) {
return array();
}
Expand Down

0 comments on commit 474d634

Please sign in to comment.