From 0dac111c6a6299b0b18f2671df4bbf7ef38e23c3 Mon Sep 17 00:00:00 2001 From: Daniel Dudzic Date: Mon, 9 Oct 2023 15:19:20 +0200 Subject: [PATCH] Product Gallery Thumbnails: Refactor View all html to make it more readable --- src/BlockTypes/ProductGalleryThumbnails.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/BlockTypes/ProductGalleryThumbnails.php b/src/BlockTypes/ProductGalleryThumbnails.php index 72e8fd8874e..e2cf8bb975c 100644 --- a/src/BlockTypes/ProductGalleryThumbnails.php +++ b/src/BlockTypes/ProductGalleryThumbnails.php @@ -48,7 +48,16 @@ protected function get_block_type_uses_context() { * @return string */ protected function generate_view_all_html( $remaining_thumbnails_count ) { - return ''; + $view_all_html = ''; + + return sprintf( + $view_all_html, + esc_html( $remaining_thumbnails_count ), + __( 'View all', 'woo-gutenberg-products-block' ) + ); } /**