Make WordPress Core

Ticket #30135: 30135.2.patch

File 30135.2.patch, 1.5 KB (added by kraftbj, 10 years ago)

Disables the filter when is_admin

  • src/wp-admin/press-this.php

     
    638638                        $content .= $selection;
    639639
    640640                if ( $url ) {
    641                         $content .= '<p>';
     641                        $content .= '<p class="wppt-source">';
    642642
    643643                        if ( $selection )
    644644                                $content .= __('via ');
  • src/wp-content/themes/twentyfifteen/inc/template-tags.php

     
    295295
    296296        return $has_url ? $has_url : apply_filters( 'the_permalink', get_permalink() );
    297297}
    298 endif;
    299  No newline at end of file
     298endif;
     299
     300if ( ! function_exists( 'twentyfifteen_excerpt_more' ) && ! is_admin() ) :
     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' );
     315endif;