diff --git a/wp-content/themes/twentynineteen/inc/template-functions.php b/wp-content/themes/twentynineteen/inc/template-functions.php index de2fa088bb..536fbd3ee4 100644 --- a/wp-content/themes/twentynineteen/inc/template-functions.php +++ b/wp-content/themes/twentynineteen/inc/template-functions.php @@ -223,3 +223,20 @@ function twentynineteen_add_mobile_parent_nav_menu_items( $sorted_menu_items, $a return $amended_menu_items; } add_filter( 'wp_nav_menu_objects', 'twentynineteen_add_mobile_parent_nav_menu_items', 10, 2 ); + +/** + * Adds a fragment identifier (to the content) to paginated links. + * + * @since Twenty Nineteen 2.6 + * + * @param string $link The page number HTML output. + * @param int $i Page number for paginated posts' page links. + * @return string Formatted output in HTML. + */ +function twentynineteen_link_pages_link( $link, $i ) { + if ( $i > 1 && preg_match( '/href="([^"]*)"/', $link, $matches ) ) { + $link = str_replace( $matches[1], $matches[1] . '#content', $link ); + } + return $link; +} +add_filter( 'wp_link_pages_link', 'twentynineteen_link_pages_link', 10, 2 ); diff --git a/wp-includes/version.php b/wp-includes/version.php index 5fd58917bd..be89e05ef5 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.3-alpha-56056'; +$wp_version = '6.3-alpha-56057'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.