Changeset 49226 for trunk/src/wp-includes/blocks/categories.php
- Timestamp:
- 10/20/2020 01:33:02 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/blocks/categories.php
r49135 r49226 29 29 $args['id'] = $id; 30 30 $args['show_option_none'] = __( 'Select Category' ); 31 $wrapper_markup = '<div class="%1$s">%2$s</div>';31 $wrapper_markup = '<div %1$s>%2$s</div>'; 32 32 $items_markup = wp_dropdown_categories( $args ); 33 33 $type = 'dropdown'; … … 43 43 } 44 44 } else { 45 $wrapper_markup = '<ul class="%1$s">%2$s</ul>';45 $wrapper_markup = '<ul %1$s>%2$s</ul>'; 46 46 $items_markup = wp_list_categories( $args ); 47 47 $type = 'list'; 48 48 } 49 49 50 $ class = "wp-block-categories-{$type}";50 $wrapper_attributes = get_block_wrapper_attributes( array( 'class' => "wp-block-categories-{$type}" ) ); 51 51 52 52 return sprintf( 53 53 $wrapper_markup, 54 esc_attr( $class ),54 $wrapper_attributes, 55 55 $items_markup 56 56 );
Note: See TracChangeset
for help on using the changeset viewer.