Changeset 49831
- Timestamp:
- 12/17/2020 06:19:48 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-content/themes/twentynineteen/functions.php
r49348 r49831 206 206 207 207 /** 208 * Replaces "[...]" (appended to automatically generated excerpts) with ... and 209 * a 'Continue reading' link. 210 * 211 * @since Twenty Nineteen 2.6 212 * 213 * @param string $link Link to single post/page. 214 * @return string 'Continue reading' link prepended with an ellipsis. 215 */ 216 function twentynineteen_excerpt_more( $link ) { 217 if ( is_admin() ) { 218 return $link; 219 } 220 221 $link = sprintf( 222 '<p class="link-more"><a href="%1$s" class="more-link">%2$s</a></p>', 223 esc_url( get_permalink( get_the_ID() ) ), 224 /* translators: %s: Post title. */ 225 sprintf( __( 'Continue reading<span class="screen-reader-text"> "%s"</span>', 'twentynineteen' ), get_the_title( get_the_ID() ) ) 226 ); 227 return ' … ' . $link; 228 } 229 add_filter( 'excerpt_more', 'twentynineteen_excerpt_more' ); 230 231 /** 208 232 * Set the content width in pixels, based on the theme's design and stylesheet. 209 233 *
Note: See TracChangeset
for help on using the changeset viewer.