- Timestamp:
- 04/15/2021 02:41:38 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/block-supports/generated-classname.php
r49787 r50761 4 4 * 5 5 * @package WordPress 6 * @since 5.6.0 6 7 */ 7 8 … … 46 47 * 47 48 * @param WP_Block_Type $block_type Block Type. 48 * @param array $block_attributes Block attributes.49 49 * 50 50 * @return array Block CSS classes and inline styles. 51 51 */ 52 function wp_apply_generated_classname_support( $block_type, $block_attributes ) { 53 $has_generated_classname_support = true; 52 function wp_apply_generated_classname_support( $block_type ) { 54 53 $attributes = array(); 55 if ( property_exists( $block_type, 'supports' ) ) { 56 $has_generated_classname_support = _wp_array_get( $block_type->supports, array( 'className' ), true ); 57 } 54 $has_generated_classname_support = block_has_support( $block_type, array( 'className' ), true ); 58 55 if ( $has_generated_classname_support ) { 59 56 $block_classname = wp_get_block_default_classname( $block_type->name );
Note: See TracChangeset
for help on using the changeset viewer.