Changeset 56065 for trunk/src/wp-includes/blocks/latest-posts.php
- Timestamp:
- 06/27/2023 02:20:18 PM (3 years ago)
- File:
-
- 1 edited
-
trunk/src/wp-includes/blocks/latest-posts.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/blocks/latest-posts.php
r55246 r56065 48 48 $block_core_latest_posts_excerpt_length = $attributes['excerptLength']; 49 49 add_filter( 'excerpt_length', 'block_core_latest_posts_get_excerpt_length', 20 ); 50 51 $filter_latest_posts_excerpt_more = static function( $more ) use ( $attributes ) { 52 $use_excerpt = 'excerpt' === $attributes['displayPostContentRadio']; 53 /* translators: %1$s is a URL to a post, excerpt truncation character, default … */ 54 return $use_excerpt ? sprintf( __( ' … <a href="%1$s" rel="noopener noreferrer">Read more</a>', 'gutenberg' ), esc_url( get_permalink() ) ) : $more; 55 }; 56 57 add_filter( 'excerpt_more', $filter_latest_posts_excerpt_more ); 50 58 51 59 if ( isset( $attributes['categories'] ) ) {
Note: See TracChangeset
for help on using the changeset viewer.