From 9eb6f6f7fe4d16ac1834bb6597e212f71c327faa Mon Sep 17 00:00:00 2001 From: Lance Willett Date: Sat, 1 Nov 2014 03:39:04 +0000 Subject: [PATCH] Twenty Ten and Eleven: don't display modified excerpt link in wp-admin. Props kraftbj, fixes #30026. git-svn-id: https://develop.svn.wordpress.org/trunk@30145 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-content/themes/twentyeleven/functions.php | 7 +++++-- src/wp-content/themes/twentyten/functions.php | 7 +++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/wp-content/themes/twentyeleven/functions.php b/src/wp-content/themes/twentyeleven/functions.php index b713933ca7..41cd96865d 100644 --- a/src/wp-content/themes/twentyeleven/functions.php +++ b/src/wp-content/themes/twentyeleven/functions.php @@ -390,7 +390,10 @@ endif; // twentyeleven_continue_reading_link * @return The filtered Read More text. */ function twentyeleven_auto_excerpt_more( $more ) { - return ' …' . twentyeleven_continue_reading_link(); + if ( ! is_admin() ) { + return ' …' . twentyeleven_continue_reading_link(); + } + return $more; } add_filter( 'excerpt_more', 'twentyeleven_auto_excerpt_more' ); @@ -406,7 +409,7 @@ add_filter( 'excerpt_more', 'twentyeleven_auto_excerpt_more' ); * @return string The filtered "Continue Reading" link. */ function twentyeleven_custom_excerpt_more( $output ) { - if ( has_excerpt() && ! is_attachment() ) { + if ( has_excerpt() && ! is_attachment() && ! is_admin() ) { $output .= twentyeleven_continue_reading_link(); } return $output; diff --git a/src/wp-content/themes/twentyten/functions.php b/src/wp-content/themes/twentyten/functions.php index 341f57b894..75b6ba46d4 100644 --- a/src/wp-content/themes/twentyten/functions.php +++ b/src/wp-content/themes/twentyten/functions.php @@ -295,7 +295,10 @@ endif; * @return string An ellipsis. */ function twentyten_auto_excerpt_more( $more ) { - return ' …' . twentyten_continue_reading_link(); + if ( ! is_admin() ) { + return ' …' . twentyten_continue_reading_link(); + } + return $more; } add_filter( 'excerpt_more', 'twentyten_auto_excerpt_more' ); @@ -311,7 +314,7 @@ add_filter( 'excerpt_more', 'twentyten_auto_excerpt_more' ); * @return string Excerpt with a pretty "Continue Reading" link. */ function twentyten_custom_excerpt_more( $output ) { - if ( has_excerpt() && ! is_attachment() ) { + if ( has_excerpt() && ! is_attachment() && ! is_admin() ) { $output .= twentyten_continue_reading_link(); } return $output;