Skip to content

Commit

Permalink
Fix archives block render function
Browse files Browse the repository at this point in the history
  • Loading branch information
youknowriad committed Oct 21, 2020
1 parent 9ce9380 commit 195b5cc
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions packages/block-library/src/archives/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,16 +88,17 @@ function render_block_core_archives( $attributes ) {

$classnames = esc_attr( $class );

$wrapper_attributes = get_block_wrapper_attributes( array( 'class' => $classnames ) );

if ( empty( $archives ) ) {

return sprintf(
'<div class="%1$s">%2$s</div>',
$classnames,
'<div %1$s>%2$s</div>',
$wrapper_attributes,
__( 'No archives to show.' )
);
}

$wrapper_attributes = get_block_wrapper_attributes( array( 'class' => $classnames ) );

return sprintf(
'<ul %1$s>%2$s</ul>',
Expand Down

0 comments on commit 195b5cc

Please sign in to comment.