From 7f8e56914e433d0a2ee08f475f5b45240fb6375c Mon Sep 17 00:00:00 2001 From: Riad Benguella Date: Tue, 20 Oct 2020 09:52:07 +0100 Subject: [PATCH] Fix archives block render function --- packages/block-library/src/archives/index.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/block-library/src/archives/index.php b/packages/block-library/src/archives/index.php index 04e7e4957cb3a..7010b3b6a080e 100644 --- a/packages/block-library/src/archives/index.php +++ b/packages/block-library/src/archives/index.php @@ -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( - '
%2$s
', - $classnames, + '
%2$s
', + $wrapper_attributes, __( 'No archives to show.' ) ); } - $wrapper_attributes = get_block_wrapper_attributes( array( 'class' => $classnames ) ); return sprintf( '',