Changeset 56057
- Timestamp:
- 06/27/2023 08:09:29 AM (16 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-content/themes/twentynineteen/inc/template-functions.php
r55963 r56057 224 224 } 225 225 add_filter( 'wp_nav_menu_objects', 'twentynineteen_add_mobile_parent_nav_menu_items', 10, 2 ); 226 227 /** 228 * Adds a fragment identifier (to the content) to paginated links. 229 * 230 * @since Twenty Nineteen 2.6 231 * 232 * @param string $link The page number HTML output. 233 * @param int $i Page number for paginated posts' page links. 234 * @return string Formatted output in HTML. 235 */ 236 function twentynineteen_link_pages_link( $link, $i ) { 237 if ( $i > 1 && preg_match( '/href="([^"]*)"/', $link, $matches ) ) { 238 $link = str_replace( $matches[1], $matches[1] . '#content', $link ); 239 } 240 return $link; 241 } 242 add_filter( 'wp_link_pages_link', 'twentynineteen_link_pages_link', 10, 2 );
Note: See TracChangeset
for help on using the changeset viewer.