dustom-classname.php
function wp_apply_custom_classname_support( $block_type, $block_attributes ) {
$has_custom_classname_support = block_has_support( $block_type, array( 'customClassName' ), true );
$attributes = array();
if ( $has_custom_classname_support && is_array( $block_attributes) ) {
$has_custom_classnames = array_key_exists( 'className', $block_attributes );
if ( $has_custom_classnames ) {
$attributes['class'] = $block_attributes['className'];
}
}
return $attributes;
}
&& is_array( $block_attributes) を追加し
修正10/27/11:00