From e3100a5cb46c722e3554f7c17be50509dddd63b1 Mon Sep 17 00:00:00 2001 From: Infinite-Null Date: Thu, 4 Jun 2026 12:54:50 +0530 Subject: [PATCH] Fix sprintf format specifiers in post-date and read-more blocks --- packages/block-library/src/post-date/index.php | 2 +- packages/block-library/src/read-more/index.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/block-library/src/post-date/index.php b/packages/block-library/src/post-date/index.php index a8073dd8462170..f66cd82962d393 100644 --- a/packages/block-library/src/post-date/index.php +++ b/packages/block-library/src/post-date/index.php @@ -84,7 +84,7 @@ function render_block_core_post_date( $attributes, $content, $block ) { $time_tag = sprintf( '', $unformatted_date, $formatted_date ); if ( isset( $attributes['isLink'] ) && $attributes['isLink'] && isset( $block->context['postId'] ) ) { - $time_tag = sprintf( '%2s', get_the_permalink( $block->context['postId'] ), $time_tag ); + $time_tag = sprintf( '%2$s', get_the_permalink( $block->context['postId'] ), $time_tag ); } return sprintf( '
%2$s
', $wrapper_attributes, $time_tag ); diff --git a/packages/block-library/src/read-more/index.php b/packages/block-library/src/read-more/index.php index c01a0a377fc938..d1e31351bc7053 100644 --- a/packages/block-library/src/read-more/index.php +++ b/packages/block-library/src/read-more/index.php @@ -38,7 +38,7 @@ function render_block_core_read_more( $attributes, $content, $block ) { $wrapper_attributes = get_block_wrapper_attributes( array( 'class' => $justify_class_name ) ); $more_text = ! empty( $attributes['content'] ) ? wp_kses_post( $attributes['content'] ) : __( 'Read more' ); return sprintf( - '%4s%5s', + '%4$s%5$s', $wrapper_attributes, get_the_permalink( $post_ID ), esc_attr( $attributes['linkTarget'] ),