diff --git a/wp-includes/block-supports/border.php b/wp-includes/block-supports/border.php index bb81e88134..a11c099d9e 100644 --- a/wp-includes/block-supports/border.php +++ b/wp-includes/block-supports/border.php @@ -152,7 +152,7 @@ function wp_apply_border_support( $block_type, $block_attributes ) { */ function wp_has_border_feature_support( $block_type, $feature, $default_value = false ) { // Check if all border support features have been opted into via `"__experimentalBorder": true`. - if ( property_exists( $block_type, 'supports' ) ) { + if ( $block_type instanceof WP_Block_Type ) { $block_type_supports_border = isset( $block_type->supports['__experimentalBorder'] ) ? $block_type->supports['__experimentalBorder'] : $default_value; diff --git a/wp-includes/block-supports/colors.php b/wp-includes/block-supports/colors.php index 053ec239dc..f14b718b88 100644 --- a/wp-includes/block-supports/colors.php +++ b/wp-includes/block-supports/colors.php @@ -17,7 +17,7 @@ */ function wp_register_colors_support( $block_type ) { $color_support = false; - if ( property_exists( $block_type, 'supports' ) ) { + if ( $block_type instanceof WP_Block_Type ) { $color_support = isset( $block_type->supports['color'] ) ? $block_type->supports['color'] : false; } $has_text_colors_support = true === $color_support || diff --git a/wp-includes/block-supports/typography.php b/wp-includes/block-supports/typography.php index 2358d304c4..bccde4f5c0 100644 --- a/wp-includes/block-supports/typography.php +++ b/wp-includes/block-supports/typography.php @@ -16,7 +16,7 @@ * @param WP_Block_Type $block_type Block Type. */ function wp_register_typography_support( $block_type ) { - if ( ! property_exists( $block_type, 'supports' ) ) { + if ( ! ( $block_type instanceof WP_Block_Type ) ) { return; } @@ -85,7 +85,7 @@ function wp_register_typography_support( $block_type ) { * @return array Typography CSS classes and inline styles. */ function wp_apply_typography_support( $block_type, $block_attributes ) { - if ( ! property_exists( $block_type, 'supports' ) ) { + if ( ! ( $block_type instanceof WP_Block_Type ) ) { return array(); } diff --git a/wp-includes/class-wp-block-supports.php b/wp-includes/class-wp-block-supports.php index ee2791dd17..afc011803b 100644 --- a/wp-includes/class-wp-block-supports.php +++ b/wp-includes/class-wp-block-supports.php @@ -142,7 +142,7 @@ class WP_Block_Supports { $block_registry = WP_Block_Type_Registry::get_instance(); $registered_block_types = $block_registry->get_all_registered(); foreach ( $registered_block_types as $block_type ) { - if ( ! property_exists( $block_type, 'supports' ) ) { + if ( ! ( $block_type instanceof WP_Block_Type ) ) { continue; } if ( ! $block_type->attributes ) { diff --git a/wp-includes/version.php b/wp-includes/version.php index 85bc18bb7e..ced110f7d7 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.4-beta1-56741'; +$wp_version = '6.4-beta1-56742'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.