Make WordPress Core

Ticket #30026: 30026.diff

File 30026.diff, 1.8 KB (added by kraftbj, 10 years ago)

Adds an ! is_admin check to the filters.

  • src/wp-content/themes/twentyeleven/functions.php

     
    390390 * @return The filtered Read More text.
    391391 */
    392392function twentyeleven_auto_excerpt_more( $more ) {
    393         return ' …' . twentyeleven_continue_reading_link();
     393        if ( ! is_admin() ) {
     394                return ' …' . twentyeleven_continue_reading_link();
     395        }
     396        return $more;
    394397}
    395398add_filter( 'excerpt_more', 'twentyeleven_auto_excerpt_more' );
    396399
     
    406409 * @return string The filtered "Continue Reading" link.
    407410 */
    408411function twentyeleven_custom_excerpt_more( $output ) {
    409         if ( has_excerpt() && ! is_attachment() ) {
     412        if ( has_excerpt() && ! is_attachment() && ! is_admin() ) {
    410413                $output .= twentyeleven_continue_reading_link();
    411414        }
    412415        return $output;
  • src/wp-content/themes/twentyten/functions.php

     
    295295 * @return string An ellipsis.
    296296 */
    297297function twentyten_auto_excerpt_more( $more ) {
    298         return ' …' . twentyten_continue_reading_link();
     298        if ( ! is_admin() ) {
     299                return ' …' . twentyten_continue_reading_link();
     300        }
     301        return $more;
    299302}
    300303add_filter( 'excerpt_more', 'twentyten_auto_excerpt_more' );
    301304
     
    311314 * @return string Excerpt with a pretty "Continue Reading" link.
    312315 */
    313316function twentyten_custom_excerpt_more( $output ) {
    314         if ( has_excerpt() && ! is_attachment() ) {
     317        if ( has_excerpt() && ! is_attachment() && ! is_admin() ) {
    315318                $output .= twentyten_continue_reading_link();
    316319        }
    317320        return $output;