Ticket #52047: 52047.2.diff
File 52047.2.diff, 4.3 KB (added by , 4 years ago) |
---|
-
src/wp-content/themes/twentytwentyone/comments.php
59 59 <?php 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( 66 65 '%s <span class="nav-prev-text">%s</span>', -
src/wp-content/themes/twentytwentyone/inc/template-tags.php
223 223 * @return void 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>' 249 ) 233 __( 'Newer <span class="nav-short">posts</span>', 'twentytwentyone' ) 250 234 ), 251 235 'next_text' => sprintf( 252 236 '<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>' 257 ), 237 __( 'Older <span class="nav-short">posts</span>', 'twentytwentyone' ), 258 238 is_rtl() ? twenty_twenty_one_get_icon_svg( 'ui', 'arrow_left' ) : twenty_twenty_one_get_icon_svg( 'ui', 'arrow_right' ) 259 239 ), 260 240 ) -
src/wp-content/themes/twentytwentyone/single.php
36 36 $twentytwentyone_next = is_rtl() ? twenty_twenty_one_get_icon_svg( 'ui', 'arrow_left' ) : twenty_twenty_one_get_icon_svg( 'ui', 'arrow_right' ); 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 } 39 $twentytwentyone_next_label = esc_html__( 'Next post', 'twentytwentyone' ); 40 $twentytwentyone_previous_label = esc_html__( 'Previous post', 'twentytwentyone' ); 49 41 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 );54 55 42 the_post_navigation( 56 43 array( 57 44 'next_text' => '<p class="meta-nav">' . $twentytwentyone_next_label . $twentytwentyone_next . '</p><p class="post-title">%title</p>',