Changeset 49869 for branches/5.6
- Timestamp:
- 12/22/2020 04:19:26 PM (4 years ago)
- Location:
- branches/5.6
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/5.6
-
branches/5.6/src/wp-content/themes/twentytwentyone/comments.php
r49829 r49869 60 60 the_comments_pagination( 61 61 array( 62 /* translators: There is a space after page. */ 63 'before_page_number' => esc_html__( 'Page ', 'twentytwentyone' ), 62 'before_page_number' => esc_html__( 'Page', 'twentytwentyone' ) . ' ', 64 63 'mid_size' => 0, 65 64 'prev_text' => sprintf( -
branches/5.6/src/wp-content/themes/twentytwentyone/inc/template-tags.php
r49861 r49869 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' ) -
branches/5.6/src/wp-content/themes/twentytwentyone/single.php
r49829 r49869 37 37 $twentytwentyone_prev = is_rtl() ? twenty_twenty_one_get_icon_svg( 'ui', 'arrow_right' ) : twenty_twenty_one_get_icon_svg( 'ui', 'arrow_left' ); 38 38 39 $twentytwentyone_post_type = get_post_type_object( get_post_type() ); 40 $twentytwentyone_post_type_name = ''; 41 if ( 42 is_object( $twentytwentyone_post_type ) && 43 property_exists( $twentytwentyone_post_type, 'labels' ) && 44 is_object( $twentytwentyone_post_type->labels ) && 45 property_exists( $twentytwentyone_post_type->labels, 'singular_name' ) 46 ) { 47 $twentytwentyone_post_type_name = $twentytwentyone_post_type->labels->singular_name; 48 } 49 50 /* translators: %s: The post-type singular name (example: Post, Page, etc.) */ 51 $twentytwentyone_next_label = sprintf( esc_html__( 'Next %s', 'twentytwentyone' ), $twentytwentyone_post_type_name ); 52 /* translators: %s: The post-type singular name (example: Post, Page, etc.) */ 53 $twentytwentyone_previous_label = sprintf( esc_html__( 'Previous %s', 'twentytwentyone' ), $twentytwentyone_post_type_name ); 39 $twentytwentyone_next_label = esc_html__( 'Next post', 'twentytwentyone' ); 40 $twentytwentyone_previous_label = esc_html__( 'Previous post', 'twentytwentyone' ); 54 41 55 42 the_post_navigation(
Note: See TracChangeset
for help on using the changeset viewer.