Skip to content

Commit

Permalink
Archive Block: remove unnecessary spaces from class attributes (#44440)
Browse files Browse the repository at this point in the history
* Archive Block: remove unnecessary spaces from class attributes

* Initialize css class with the default value
  • Loading branch information
t-hamano authored Sep 26, 2022
1 parent 189fe7f commit 9580611
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions packages/block-library/src/archives/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,12 @@
function render_block_core_archives( $attributes ) {
$show_post_count = ! empty( $attributes['showPostCounts'] );
$type = isset( $attributes['type'] ) ? $attributes['type'] : 'monthly';
$class = '';

$class = 'wp-block-archives-list';

if ( ! empty( $attributes['displayAsDropdown'] ) ) {

$class .= ' wp-block-archives-dropdown';
$class = 'wp-block-archives-dropdown';

$dropdown_id = wp_unique_id( 'wp-block-archives-' );
$title = __( 'Archives' );
Expand Down Expand Up @@ -75,8 +76,6 @@ function render_block_core_archives( $attributes ) {
);
}

$class .= ' wp-block-archives-list';

/** This filter is documented in wp-includes/widgets/class-wp-widget-archives.php */
$archives_args = apply_filters(
'widget_archives_args',
Expand Down

0 comments on commit 9580611

Please sign in to comment.