Changeset 58187 for trunk/src/wp-includes/blocks/latest-posts.php
- Timestamp:
- 05/23/2024 07:37:08 PM (9 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/blocks/latest-posts.php
r56816 r58187 18 18 * Callback for the excerpt_length filter used by 19 19 * the Latest Posts block at render time. 20 * 21 * @since 5.4.0 20 22 * 21 23 * @return int Returns the global $block_core_latest_posts_excerpt_length variable … … 29 31 /** 30 32 * Renders the `core/latest-posts` block on server. 33 * 34 * @since 5.0.0 31 35 * 32 36 * @param array $attributes The block attributes. … … 149 153 */ 150 154 if ( str_ends_with( $trimmed_excerpt, ' […]' ) ) { 155 /** This filter is documented in wp-includes/formatting.php */ 151 156 $excerpt_length = (int) apply_filters( 'excerpt_length', $block_core_latest_posts_excerpt_length ); 152 157 if ( $excerpt_length <= $block_core_latest_posts_excerpt_length ) { … … 154 159 $trimmed_excerpt .= sprintf( 155 160 /* translators: 1: A URL to a post, 2: Hidden accessibility text: Post title */ 156 __( '… <a href="%1$s" rel="noopener noreferrer">Read more<span class="screen-reader-text">: %2$s</span></a>' ),161 __( '… <a class="wp-block-latest-posts__read-more" href="%1$s" rel="noopener noreferrer">Read more<span class="screen-reader-text">: %2$s</span></a>' ), 157 162 esc_url( $post_link ), 158 163 esc_html( $title ) … … 219 224 /** 220 225 * Registers the `core/latest-posts` block on server. 226 * 227 * @since 5.0.0 221 228 */ 222 229 function register_block_core_latest_posts() { … … 241 248 * TODO: Remove when and if the bottom client-side deprecation for this block 242 249 * is removed. 250 * 251 * @since 5.5.0 243 252 * 244 253 * @param array $block A single parsed block object.
Note: See TracChangeset
for help on using the changeset viewer.