- Timestamp:
- 12/22/2020 04:13:51 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-content/themes/twentytwentyone/inc/template-tags.php
r49860 r49866 224 224 */ 225 225 function twenty_twenty_one_the_posts_navigation() { 226 $post_type = get_post_type_object( get_post_type() );227 $post_type_name = '';228 if (229 is_object( $post_type ) &&230 property_exists( $post_type, 'labels' ) &&231 is_object( $post_type->labels ) &&232 property_exists( $post_type->labels, 'name' )233 ) {234 $post_type_name = $post_type->labels->name;235 }236 237 226 the_posts_pagination( 238 227 array( 239 /* translators: There is a space after page. */ 240 'before_page_number' => esc_html__( 'Page ', 'twentytwentyone' ), 228 'before_page_number' => esc_html__( 'Page', 'twentytwentyone' ) . ' ', 241 229 'mid_size' => 0, 242 230 'prev_text' => sprintf( 243 231 '%s <span class="nav-prev-text">%s</span>', 244 232 is_rtl() ? twenty_twenty_one_get_icon_svg( 'ui', 'arrow_right' ) : twenty_twenty_one_get_icon_svg( 'ui', 'arrow_left' ), 245 sprintf( 246 /* translators: %s: The post-type name. */ 247 esc_html__( 'Newer %s', 'twentytwentyone' ), 248 '<span class="nav-short">' . esc_html( $post_type_name ) . '</span>' 233 wp_kses( 234 __( 'Newer <span class="nav-short">posts</span>', 'twentytwentyone' ), 235 array( 236 'span' => array( 237 'class' => array(), 238 ), 239 ) 249 240 ) 250 241 ), 251 242 'next_text' => sprintf( 252 243 '<span class="nav-next-text">%s</span> %s', 253 sprintf( 254 /* translators: %s: The post-type name. */ 255 esc_html__( 'Older %s', 'twentytwentyone' ), 256 '<span class="nav-short">' . esc_html( $post_type_name ) . '</span>' 244 wp_kses( 245 __( 'Older <span class="nav-short">posts</span>', 'twentytwentyone' ), 246 array( 247 'span' => array( 248 'class' => array(), 249 ), 250 ) 257 251 ), 258 252 is_rtl() ? twenty_twenty_one_get_icon_svg( 'ui', 'arrow_left' ) : twenty_twenty_one_get_icon_svg( 'ui', 'arrow_right' )
Note: See TracChangeset
for help on using the changeset viewer.