Changeset 55246 for trunk/src/wp-includes/blocks/read-more.php
- Timestamp:
- 02/07/2023 07:01:56 AM (3 years ago)
- File:
-
- 1 edited
-
trunk/src/wp-includes/blocks/read-more.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/blocks/read-more.php
r53157 r55246 20 20 21 21 $post_ID = $block->context['postId']; 22 $post_title = get_the_title( $post_ID ); 23 $screen_reader_text = sprintf( 24 /* translators: %s is either the post title or post ID to describe the link for screen readers. */ 25 __( ': %s' ), 26 '' !== $post_title ? $post_title : __( 'untitled post ' ) . $post_ID 27 ); 22 28 $justify_class_name = empty( $attributes['justifyContent'] ) ? '' : "is-justified-{$attributes['justifyContent']}"; 23 29 $wrapper_attributes = get_block_wrapper_attributes( array( 'class' => $justify_class_name ) ); 24 30 $more_text = ! empty( $attributes['content'] ) ? wp_kses_post( $attributes['content'] ) : __( 'Read more' ); 25 31 return sprintf( 26 '<a %1s href="%2s" target="%3s">%4s< /a>',32 '<a %1s href="%2s" target="%3s">%4s<span class="screen-reader-text">%5s</span></a>', 27 33 $wrapper_attributes, 28 34 get_the_permalink( $post_ID ), 29 35 esc_attr( $attributes['linkTarget'] ), 30 $more_text 36 $more_text, 37 $screen_reader_text 31 38 ); 32 39 }
Note: See TracChangeset
for help on using the changeset viewer.