From d6d7626b06a9d5e283d5906ec93f2919b6446d80 Mon Sep 17 00:00:00 2001 From: Riad Benguella Date: Thu, 22 Oct 2020 11:45:38 +0100 Subject: [PATCH] Fix archives block render function (#26309) --- packages/block-library/src/archives/index.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/packages/block-library/src/archives/index.php b/packages/block-library/src/archives/index.php index 04e7e4957cb3a8..7b51169e2114e8 100644 --- a/packages/block-library/src/archives/index.php +++ b/packages/block-library/src/archives/index.php @@ -88,17 +88,16 @@ function render_block_core_archives( $attributes ) { $classnames = esc_attr( $class ); - if ( empty( $archives ) ) { + $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( '', $wrapper_attributes,