Ticket #36572: 36572-link-and-excerpt-linked.3.diff
File 36572-link-and-excerpt-linked.3.diff, 1.8 KB (added by , 9 years ago) |
---|
-
src/wp-includes/post-template.php
262 262 263 263 $post = get_post(); 264 264 265 if ( null === $more_link_text ) 266 $more_link_text = __( '(more…)' ); 265 if ( null === $more_link_text ) { 266 $more_link_text = sprintf( 267 '<span aria-label="%1$s">%2$s</span>', 268 sprintf( 269 /* translators: %s: Name of current post */ 270 __( 'Continue reading %s' ), 271 get_the_title() 272 ), 273 __( '(more…)' ) 274 ); 275 } 267 276 268 277 $output = ''; 269 278 $has_teaser = false; -
src/wp-includes/formatting.php
2906 2906 * @param int $number The number of words. Default 55. 2907 2907 */ 2908 2908 $excerpt_length = apply_filters( 'excerpt_length', 55 ); 2909 2910 $more_string = ' […]'; 2909 2911 /** 2910 2912 * Filter the string in the "more" link displayed after a trimmed excerpt. 2911 2913 * … … 2913 2915 * 2914 2916 * @param string $more_string The string shown within the more link. 2915 2917 */ 2916 $excerpt_more = apply_filters( 'excerpt_more', ' ' . '[…]' ); 2918 $excerpt_more = apply_filters( 'excerpt_more', $more_string ); 2919 2920 // add a more accessible default including a link if the `excerpt_more` filter is not used. 2921 if ( $more_string === $excerpt_more ) { 2922 $excerpt_more = sprintf( 2923 ' <a href="%1$s" class="more-link"><span aria-label="%2$s">[…]</span></a>', 2924 get_permalink(), 2925 sprintf( 2926 /* translators: %s: Post title */ 2927 __( 'Continue reading %s' ), 2928 get_the_title() 2929 ) 2930 ); 2931 } 2932 2917 2933 $text = wp_trim_words( $text, $excerpt_length, $excerpt_more ); 2918 2934 } 2919 2935 /**