Make WordPress Core

Ticket #30135: 30135.patch

File 30135.patch, 1.1 KB (added by davidakennedy, 10 years ago)
  • wp-content/themes/twentyfifteen/inc/template-tags.php

     
    295295
    296296        return $has_url ? $has_url : apply_filters( 'the_permalink', get_permalink() );
    297297}
     298endif;
     299
     300if ( ! function_exists( 'twentyfifteen_excerpt_more' ) ) :
     301/**
     302 * Replaces "[...]" (appended to automatically generated excerpts) with a Continue reading link.
     303 *
     304 * @since Twenty Fifteen 1.0
     305 *
     306 */
     307function twentyfifteen_excerpt_more( $more ) {
     308        return sprintf( ' <a href="%1$s" class="more-link">%2$s</a>',
     309                esc_url( get_permalink( get_the_ID() ) ),
     310                /* translators: %s: Name of current post */
     311                sprintf( esc_html__( 'Continue reading %s', 'twentyfifteen' ), '<span class="screen-reader-text">' . get_the_title( get_the_ID() ) . '</span> <span class="meta-nav">&rarr;</span>' )
     312                );
     313}
     314add_filter( 'excerpt_more', 'twentyfifteen_excerpt_more' );
    298315endif;
     316 No newline at end of file