From 65025c128ccf9d3de25a802b88c2c199ef83ef68 Mon Sep 17 00:00:00 2001 From: Daniel Richards Date: Mon, 16 Jul 2018 16:29:22 +0800 Subject: [PATCH] Render archives list container as `ul` when a list and `div` when a dropdown --- core-blocks/archives/index.php | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/core-blocks/archives/index.php b/core-blocks/archives/index.php index b6e6d06ab4e44d..9c221590e5c31d 100644 --- a/core-blocks/archives/index.php +++ b/core-blocks/archives/index.php @@ -57,6 +57,12 @@ function render_block_core_archives( $attributes ) { $block_content = ' '; + + $block_content = sprintf( + '
%2$s
', + esc_attr( $class ), + $block_content + ); } else { /** This filter is documented in wp-includes/widgets/class-wp-widget-archives.php */ @@ -68,13 +74,13 @@ function render_block_core_archives( $attributes ) { $archives_args['echo'] = 0; $block_content = wp_get_archives( $archives_args ); - } - $block_content = sprintf( - '
%2$s
', - esc_attr( $class ), - $block_content - ); + $block_content = sprintf( + '', + esc_attr( $class ), + $block_content + ); + } return $block_content; }