Changeset 57377 for trunk/src/wp-includes/blocks/post-navigation-link.php
- Timestamp:
- 01/29/2024 09:04:18 PM (12 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/blocks/post-navigation-link.php
r56945 r57377 100 100 } 101 101 102 // The dynamic portion of the function name, `$navigation_type`, 103 // refers to the type of adjacency, 'next' or 'previous'. 102 $in_same_term = isset( $attributes['inSameTerm'] ) ? $attributes['inSameTerm'] : false; 103 $taxonomy = isset( $attributes['taxonomy'] ) && $in_same_term ? $attributes['taxonomy'] : ''; 104 105 /** 106 * The dynamic portion of the function name, `$navigation_type`, 107 * Refers to the type of adjacency, 'next' or 'previous'. 108 * 109 * @See https://developer.wordpress.org/reference/functions/get_previous_post_link/ 110 * @See https://developer.wordpress.org/reference/functions/get_next_post_link/ 111 */ 104 112 $get_link_function = "get_{$navigation_type}_post_link"; 105 $content = $get_link_function( $format, $link ); 113 114 if ( $in_same_term ) { 115 $content = $get_link_function( $format, $link, $in_same_term, '', $taxonomy ); 116 } else { 117 $content = $get_link_function( $format, $link ); 118 } 119 106 120 return sprintf( 107 121 '<div %1$s>%2$s</div>',
Note: See TracChangeset
for help on using the changeset viewer.