updated theme Twenty Nineteen version 2.0

This commit is contained in:
2021-03-22 16:13:27 +00:00
committed by Gitium
parent a27d917629
commit ca7eb56a01
58 changed files with 9715 additions and 9780 deletions

View File

@ -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.0
*
* @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(
'<p class="link-more"><a href="%1$s" class="more-link">%2$s</a></p>',
esc_url( get_permalink( get_the_ID() ) ),
/* translators: %s: Post title. */
sprintf( __( 'Continue reading<span class="screen-reader-text"> "%s"</span>', 'twentynineteen' ), get_the_title( get_the_ID() ) )
);
return ' &hellip; ' . $link;
}
add_filter( 'excerpt_more', 'twentynineteen_excerpt_more' );
/**
* Set the content width in pixels, based on the theme's design and stylesheet.
*