Skip to content

Commit

Permalink
Add an empty Select Category option to Categories block dropdown
Browse files Browse the repository at this point in the history
  • Loading branch information
tyxla committed Aug 3, 2017
1 parent 2dfb411 commit 2cc2804
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/blocks/categories.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ function gutenberg_render_block_core_categories( $attributes ) {
if ( ! empty( $attributes['displayAsDropdown'] ) ) {
$id = 'wp-block-categories-' . wp_rand();
$args['id'] = $id;
$args['show_option_none'] = __( 'Select Category', 'gutenberg' );
$wrapper_markup = '<div class="%1$s">%2$s</div>';
$items_markup = wp_dropdown_categories( $args );
$type = 'dropdown';
Expand Down

0 comments on commit 2cc2804

Please sign in to comment.