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.

Built from https://develop.svn.wordpress.org/trunk@39000


git-svn-id: http://core.svn.wordpress.org/trunk@38942 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
David A. Kennedy 2016-10-28 23:16:34 +00:00
parent f7552bbf53
commit 42f804e4cb
2 changed files with 6 additions and 4 deletions

View File

@ -284,13 +284,15 @@ add_action( 'widgets_init', 'twentyseventeen_widgets_init' );
* Replaces "[...]" (appended to automatically generated excerpts) with ... and * Replaces "[...]" (appended to automatically generated excerpts) with ... and
* a 'Continue reading' link. * a 'Continue reading' link.
* *
* Create your own twentysixteen_excerpt_more() function to override in a child theme.
*
* @since Twenty Seventeen 1.0 * @since Twenty Seventeen 1.0
* *
* @return string 'Continue reading' link prepended with an ellipsis. * @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>', $link = sprintf( '<p class="link-more"><a href="%1$s" class="more-link">%2$s</a></p>',
esc_url( get_permalink( get_the_ID() ) ), esc_url( get_permalink( get_the_ID() ) ),
/* translators: %s: Name of current post */ /* translators: %s: Name of current post */

View File

@ -4,7 +4,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '4.7-beta1-38999'; $wp_version = '4.7-beta1-39000';
/** /**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.