Ticket #36572: 36572.2.diff
File 36572.2.diff, 1.8 KB (added by , 9 years ago) |
---|
-
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 = ' <a href="' . get_permalink() . '" class="more-link">' . sprintf( 2923 __( '<span class="screen-reader-text">Continue reading %s</span><span aria-hidden="true">[…]</span>' ), 2924 get_the_title() 2925 ) . '</a>'; 2926 } 2927 2917 2928 $text = wp_trim_words( $text, $excerpt_length, $excerpt_more ); 2918 2929 } 2919 2930 /** -
src/wp-includes/post-template.php
263 263 $post = get_post(); 264 264 265 265 if ( null === $more_link_text ) 266 $more_link_text = __( '(more…)' ); 266 /* translators: %s: Name of current post */ 267 $more_link_text = sprintf( 268 __( '<span class="screen-reader-text">Continue reading %s</span><span aria-hidden="true">(more…)</span>' ), 269 get_the_title() 270 ); 267 271 268 272 $output = ''; 269 273 $has_teaser = false;