Skip to content

Commit eff534e

Browse files
Use null coalescing operator
Co-authored-by: Weston Ruter <[email protected]>
1 parent 810d5ac commit eff534e

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/wp-includes/class-wp-block-supports.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,8 +209,8 @@ function get_block_wrapper_attributes( $extra_attributes = array() ) {
209209

210210
$attributes = array();
211211
foreach ( $attribute_merge_callbacks as $attribute_name => $merge_callback ) {
212-
$new_attribute = isset( $new_attributes[ $attribute_name ] ) ? $new_attributes[ $attribute_name ] : '';
213-
$extra_attribute = isset( $extra_attributes[ $attribute_name ] ) ? $extra_attributes[ $attribute_name ] : '';
212+
$new_attribute = $new_attributes[ $attribute_name ] ?? '';
213+
$extra_attribute = $extra_attributes[ $attribute_name ] ?? '';
214214
$new_attribute = is_string( $new_attribute ) ? $new_attribute : '';
215215
$extra_attribute = is_string( $extra_attribute ) ? $extra_attribute : '';
216216

0 commit comments

Comments
 (0)