From 0890bf838e416393c08fddb96eb916a81f8e16f7 Mon Sep 17 00:00:00 2001 From: "David A. Kennedy" Date: Fri, 28 Oct 2016 23:15:42 +0000 Subject: [PATCH] Twenty Seventeen: Don't modify excerpt link in admin * Since this is a filter the original value is returned if `is_admin()` is true. * Removes portion of the doc block since function is not pluggable. Props mangeshp. Fixes #38510. git-svn-id: https://develop.svn.wordpress.org/trunk@39000 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-content/themes/twentyseventeen/functions.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/wp-content/themes/twentyseventeen/functions.php b/src/wp-content/themes/twentyseventeen/functions.php index de8dd372ea..4090cbfad8 100644 --- a/src/wp-content/themes/twentyseventeen/functions.php +++ b/src/wp-content/themes/twentyseventeen/functions.php @@ -284,13 +284,15 @@ add_action( 'widgets_init', 'twentyseventeen_widgets_init' ); * Replaces "[...]" (appended to automatically generated excerpts) with ... and * a 'Continue reading' link. * - * Create your own twentysixteen_excerpt_more() function to override in a child theme. - * * @since Twenty Seventeen 1.0 * * @return string 'Continue reading' link prepended with an ellipsis. */ -function twentyseventeen_excerpt_more() { +function twentyseventeen_excerpt_more( $link ) { + if ( is_admin() ) { + return $link; + } + $link = sprintf( '', esc_url( get_permalink( get_the_ID() ) ), /* translators: %s: Name of current post */