Make WordPress Core

Changeset 39000


Ignore:
Timestamp:
10/28/2016 11:15:42 PM (7 years ago)
Author:
davidakennedy
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-content/themes/twentyseventeen/functions.php

    r38991 r39000  
    285285 * a 'Continue reading' link.
    286286 *
    287  * Create your own twentysixteen_excerpt_more() function to override in a child theme.
    288  *
    289287 * @since Twenty Seventeen 1.0
    290288 *
    291289 * @return string 'Continue reading' link prepended with an ellipsis.
    292290 */
    293 function twentyseventeen_excerpt_more() {
     291function twentyseventeen_excerpt_more( $link ) {
     292    if ( is_admin() ) {
     293        return $link;
     294    }
     295
    294296    $link = sprintf( '<p class="link-more"><a href="%1$s" class="more-link">%2$s</a></p>',
    295297        esc_url( get_permalink( get_the_ID() ) ),
Note: See TracChangeset for help on using the changeset viewer.