diff --git a/wp-content/themes/twentynineteen/functions.php b/wp-content/themes/twentynineteen/functions.php index ed23d3e0d9..4fd0b76d6e 100644 --- a/wp-content/themes/twentynineteen/functions.php +++ b/wp-content/themes/twentynineteen/functions.php @@ -204,6 +204,30 @@ function twentynineteen_widgets_init() { } add_action( 'widgets_init', 'twentynineteen_widgets_init' ); +/** + * Replaces "[...]" (appended to automatically generated excerpts) with ... and + * a 'Continue reading' link. + * + * @since Twenty Nineteen 2.6 + * + * @param string $link Link to single post/page. + * @return string 'Continue reading' link prepended with an ellipsis. + */ +function twentynineteen_excerpt_more( $link ) { + if ( is_admin() ) { + return $link; + } + + $link = sprintf( + '', + esc_url( get_permalink( get_the_ID() ) ), + /* translators: %s: Post title. */ + sprintf( __( 'Continue reading "%s"', 'twentynineteen' ), get_the_title( get_the_ID() ) ) + ); + return ' … ' . $link; +} +add_filter( 'excerpt_more', 'twentynineteen_excerpt_more' ); + /** * Set the content width in pixels, based on the theme's design and stylesheet. * diff --git a/wp-includes/version.php b/wp-includes/version.php index 3297596799..20966c0de8 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.7-alpha-49830'; +$wp_version = '5.7-alpha-49831'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.