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
This commit is contained in:
David A. Kennedy 2016-10-28 23:15:42 +00:00
parent 78a664b210
commit 0890bf838e

View File

@ -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( '<p class="link-more"><a href="%1$s" class="more-link">%2$s</a></p>',
esc_url( get_permalink( get_the_ID() ) ),
/* translators: %s: Name of current post */