Changeset 52929
- Timestamp:
- 03/13/2022 08:01:05 PM (3 years ago)
- Location:
- trunk/src
- Files:
-
- 20 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/class-wp-media-list-table.php
r52842 r52929 634 634 ); 635 635 } 636 /* translators: Used between list items, there is a space after the comma. */ 637 echo implode( __( ', ' ), $out ); 636 echo implode( wp_get_list_item_separator(), $out ); 638 637 } else { 639 638 echo '<span aria-hidden="true">—</span><span class="screen-reader-text">' . get_taxonomy( $taxonomy )->labels->no_terms . '</span>'; -
trunk/src/wp-admin/includes/class-wp-posts-list-table.php
r52215 r52929 1295 1295 $term_links = apply_filters( 'post_column_taxonomy_links', $term_links, $taxonomy, $terms ); 1296 1296 1297 /* translators: Used between list items, there is a space after the comma. */ 1298 echo implode( __( ', ' ), $term_links ); 1297 echo implode( wp_get_list_item_separator(), $term_links ); 1299 1298 } else { 1300 1299 echo '<span aria-hidden="true">—</span><span class="screen-reader-text">' . $taxonomy_object->labels->no_terms . '</span>'; -
trunk/src/wp-content/themes/twentyeleven/content-featured.php
r47886 r52929 33 33 <footer class="entry-meta"> 34 34 <?php 35 /* translators: Used between list items, there is a space after the comma. */ 36 $tags_list = get_the_tag_list( '', __( ', ', 'twentyeleven' ) ); 35 $tags_list = get_the_tag_list( '', wp_get_list_item_separator() ); 37 36 38 37 if ( $tags_list && ! is_wp_error( $tags_list ) ) { … … 46 45 printf( 47 46 $utility_text, 48 /* translators: Used between list items, there is a space after the comma. */ 49 get_the_category_list( __( ', ', 'twentyeleven' ) ), 47 get_the_category_list( wp_get_list_item_separator() ), 50 48 $tags_list, 51 49 esc_url( get_permalink() ), -
trunk/src/wp-content/themes/twentyeleven/content-gallery.php
r47886 r52929 73 73 74 74 <?php 75 /* translators: Used between list items, there is a space after the comma. */ 76 $categories_list = get_the_category_list( __( ', ', 'twentyeleven' ) ); 75 $categories_list = get_the_category_list( wp_get_list_item_separator() ); 77 76 78 77 if ( $categories_list ) : … … 88 87 89 88 <?php 90 /* translators: Used between list items, there is a space after the comma. */ 91 $tags_list = get_the_tag_list( '', __( ', ', 'twentyeleven' ) ); 89 $tags_list = get_the_tag_list( '', wp_get_list_item_separator() ); 92 90 93 91 if ( $tags_list && ! is_wp_error( $tags_list ) ) : -
trunk/src/wp-content/themes/twentyeleven/content-image.php
r47886 r52929 56 56 <div class="entry-meta"> 57 57 <?php 58 /* translators: Used between list items, there is a space after the comma. */ 59 $categories_list = get_the_category_list( __( ', ', 'twentyeleven' ) ); 58 $categories_list = get_the_category_list( wp_get_list_item_separator() ); 60 59 61 60 if ( $categories_list ) : … … 70 69 71 70 <?php 72 /* translators: Used between list items, there is a space after the comma. */ 73 $tags_list = get_the_tag_list( '', __( ', ', 'twentyeleven' ) ); 71 $tags_list = get_the_tag_list( '', wp_get_list_item_separator() ); 74 72 75 73 if ( $tags_list && ! is_wp_error( $tags_list ) ) : -
trunk/src/wp-content/themes/twentyeleven/content-quote.php
r47886 r52929 49 49 50 50 <?php 51 /* translators: Used between list items, there is a space after the comma. */ 52 $categories_list = get_the_category_list( __( ', ', 'twentyeleven' ) ); 51 $categories_list = get_the_category_list( wp_get_list_item_separator() ); 53 52 54 53 if ( $categories_list ) : … … 64 63 65 64 <?php 66 /* translators: Used between list items, there is a space after the comma. */ 67 $tags_list = get_the_tag_list( '', __( ', ', 'twentyeleven' ) ); 65 $tags_list = get_the_tag_list( '', wp_get_list_item_separator() ); 68 66 69 67 if ( $tags_list && ! is_wp_error( $tags_list ) ) : -
trunk/src/wp-content/themes/twentyeleven/content-single.php
r47886 r52929 34 34 <footer class="entry-meta"> 35 35 <?php 36 /* translators: Used between list items, there is a space after the comma. */ 37 $categories_list = get_the_category_list( __( ', ', 'twentyeleven' ) ); 36 $categories_list = get_the_category_list( wp_get_list_item_separator() ); 38 37 39 /* translators: Used between list items, there is a space after the comma. */ 40 $tags_list = get_the_tag_list( '', __( ', ', 'twentyeleven' ) ); 38 $tags_list = get_the_tag_list( '', wp_get_list_item_separator() ); 41 39 42 40 if ( $tags_list && ! is_wp_error( $tags_list ) ) { -
trunk/src/wp-content/themes/twentyeleven/content.php
r47886 r52929 56 56 <?php if ( is_object_in_taxonomy( get_post_type(), 'category' ) ) : // Hide category text when not supported. ?> 57 57 <?php 58 /* translators: Used between list items, there is a space after the comma. */ 59 $categories_list = get_the_category_list( __( ', ', 'twentyeleven' ) ); 58 $categories_list = get_the_category_list( wp_get_list_item_separator() ); 60 59 61 60 if ( $categories_list ) : … … 73 72 <?php if ( is_object_in_taxonomy( get_post_type(), 'post_tag' ) ) : // Hide tag text when not supported. ?> 74 73 <?php 75 /* translators: Used between list items, there is a space after the comma. */ 76 $tags_list = get_the_tag_list( '', __( ', ', 'twentyeleven' ) ); 74 $tags_list = get_the_tag_list( '', wp_get_list_item_separator() ); 77 75 78 76 if ( $tags_list && ! is_wp_error( $tags_list ) ) : -
trunk/src/wp-content/themes/twentyeleven/functions.php
r51103 r52929 930 930 } 931 931 add_action( 'wp_body_open', 'twentyeleven_skip_link', 5 ); 932 933 if ( ! function_exists( 'wp_get_list_item_separator' ) ) : 934 /** 935 * Retrieves the list item separator based on the locale. 936 * 937 * Added for backward compatibility to support pre-6.0.0 WordPress versions. 938 * 939 * @since 6.0.0 940 */ 941 function wp_get_list_item_separator() { 942 /* translators: Used between list items, there is a space after the comma. */ 943 return __( ', ', 'twentyeleven' ); 944 } 945 endif; -
trunk/src/wp-content/themes/twentynineteen/functions.php
r49901 r52929 183 183 add_action( 'after_setup_theme', 'twentynineteen_setup' ); 184 184 185 if ( ! function_exists( 'wp_get_list_item_separator' ) ) : 186 /** 187 * Retrieves the list item separator based on the locale. 188 * 189 * Added for backward compatibility to support pre-6.0.0 WordPress versions. 190 * 191 * @since 6.0.0 192 */ 193 function wp_get_list_item_separator() { 194 /* translators: Used between list items, there is a space after the comma. */ 195 return __( ', ', 'twentynineteen' ); 196 } 197 endif; 198 185 199 /** 186 200 * Register widget area. -
trunk/src/wp-content/themes/twentynineteen/inc/template-tags.php
r52182 r52929 83 83 twentynineteen_posted_on(); 84 84 85 /* translators: Used between list items, there is a space after the comma. */ 86 $categories_list = get_the_category_list( __( ', ', 'twentynineteen' ) ); 85 $categories_list = get_the_category_list( wp_get_list_item_separator() ); 87 86 if ( $categories_list ) { 88 87 printf( … … 95 94 } 96 95 97 /* translators: Used between list items, there is a space after the comma. */ 98 $tags_list = get_the_tag_list( '', __( ', ', 'twentynineteen' ) ); 96 $tags_list = get_the_tag_list( '', wp_get_list_item_separator() ); 99 97 if ( $tags_list && ! is_wp_error( $tags_list ) ) { 100 98 printf( -
trunk/src/wp-content/themes/twentyseventeen/functions.php
r51607 r52929 648 648 } 649 649 650 if ( ! function_exists( 'wp_get_list_item_separator' ) ) : 651 /** 652 * Retrieves the list item separator based on the locale. 653 * 654 * Added for backward compatibility to support pre-6.0.0 WordPress versions. 655 * 656 * @since 6.0.0 657 */ 658 function wp_get_list_item_separator() { 659 /* translators: Used between list items, there is a space after the comma. */ 660 return __( ', ', 'twentyseventeen' ); 661 } 662 endif; 663 650 664 /** 651 665 * Implement the Custom Header feature. -
trunk/src/wp-content/themes/twentyseventeen/inc/template-tags.php
r49120 r52929 63 63 function twentyseventeen_entry_footer() { 64 64 65 /* translators: Used between list items, there is a space after the comma. */ 66 $separate_meta = __( ', ', 'twentyseventeen' ); 65 $separate_meta = wp_get_list_item_separator(); 67 66 68 67 // Get Categories for posts. -
trunk/src/wp-content/themes/twentythirteen/functions.php
r52928 r52929 439 439 add_action( 'widgets_init', 'twentythirteen_widgets_init' ); 440 440 441 if ( ! function_exists( 'wp_get_list_item_separator' ) ) : 442 /** 443 * Retrieves the list item separator based on the locale. 444 * 445 * Added for backward compatibility to support pre-6.0.0 WordPress versions. 446 * 447 * @since 6.0.0 448 */ 449 function wp_get_list_item_separator() { 450 /* translators: Used between list items, there is a space after the comma. */ 451 return __( ', ', 'twentythirteen' ); 452 } 453 endif; 454 441 455 if ( ! function_exists( 'twentythirteen_paging_nav' ) ) : 442 456 /** … … 518 532 } 519 533 520 /* translators: Used between list items, there is a space after the comma. */ 521 $categories_list = get_the_category_list( __( ', ', 'twentythirteen' ) ); 534 $categories_list = get_the_category_list( wp_get_list_item_separator() ); 522 535 if ( $categories_list ) { 523 536 echo '<span class="categories-links">' . $categories_list . '</span>'; 524 537 } 525 538 526 /* translators: Used between list items, there is a space after the comma. */ 527 $tags_list = get_the_tag_list( '', __( ', ', 'twentythirteen' ) ); 539 $tags_list = get_the_tag_list( '', wp_get_list_item_separator() ); 528 540 if ( $tags_list && ! is_wp_error( $tags_list ) ) { 529 541 echo '<span class="tags-links">' . $tags_list . '</span>'; -
trunk/src/wp-content/themes/twentytwelve/functions.php
r51967 r52929 384 384 } 385 385 add_action( 'widgets_init', 'twentytwelve_widgets_init' ); 386 387 if ( ! function_exists( 'wp_get_list_item_separator' ) ) : 388 /** 389 * Retrieves the list item separator based on the locale. 390 * 391 * Added for backward compatibility to support pre-6.0.0 WordPress versions. 392 * 393 * @since 6.0.0 394 */ 395 function wp_get_list_item_separator() { 396 /* translators: Used between list items, there is a space after the comma. */ 397 return __( ', ', 'twentytwelve' ); 398 } 399 endif; 386 400 387 401 if ( ! function_exists( 'twentytwelve_content_nav' ) ) : … … 503 517 */ 504 518 function twentytwelve_entry_meta() { 505 /* translators: Used between list items, there is a space after the comma. */ 506 $categories_list = get_the_category_list( __( ', ', 'twentytwelve' ) ); 507 508 /* translators: Used between list items, there is a space after the comma. */ 509 $tags_list = get_the_tag_list( '', __( ', ', 'twentytwelve' ) ); 519 $categories_list = get_the_category_list( wp_get_list_item_separator() ); 520 521 $tags_list = get_the_tag_list( '', wp_get_list_item_separator() ); 510 522 511 523 $date = sprintf( -
trunk/src/wp-content/themes/twentytwentyone/functions.php
r52191 r52929 641 641 } 642 642 add_action( 'wp_footer', 'twentytwentyone_add_ie_class' ); 643 644 if ( ! function_exists( 'wp_get_list_item_separator' ) ) : 645 /** 646 * Retrieves the list item separator based on the locale. 647 * 648 * Added for backward compatibility to support pre-6.0.0 WordPress versions. 649 * 650 * @since 6.0.0 651 */ 652 function wp_get_list_item_separator() { 653 /* translators: Used between list items, there is a space after the comma. */ 654 return __( ', ', 'twentytwentyone' ); 655 } 656 endif; -
trunk/src/wp-content/themes/twentytwentyone/inc/template-tags.php
r50233 r52929 101 101 echo '<div class="post-taxonomies">'; 102 102 103 /* translators: Used between list items, there is a space after the comma. */ 104 $categories_list = get_the_category_list( __( ', ', 'twentytwentyone' ) ); 103 $categories_list = get_the_category_list( wp_get_list_item_separator() ); 105 104 if ( $categories_list ) { 106 105 printf( … … 111 110 } 112 111 113 /* translators: Used between list items, there is a space after the comma. */ 114 $tags_list = get_the_tag_list( '', __( ', ', 'twentytwentyone' ) ); 112 $tags_list = get_the_tag_list( '', wp_get_list_item_separator() ); 115 113 if ( $tags_list ) { 116 114 printf( … … 145 143 echo '<div class="post-taxonomies">'; 146 144 147 /* translators: Used between list items, there is a space after the comma. */ 148 $categories_list = get_the_category_list( __( ', ', 'twentytwentyone' ) ); 145 $categories_list = get_the_category_list( wp_get_list_item_separator() ); 149 146 if ( $categories_list ) { 150 147 printf( … … 155 152 } 156 153 157 /* translators: Used between list items, there is a space after the comma. */ 158 $tags_list = get_the_tag_list( '', __( ', ', 'twentytwentyone' ) ); 154 $tags_list = get_the_tag_list( '', wp_get_list_item_separator() ); 159 155 if ( $tags_list ) { 160 156 printf( -
trunk/src/wp-includes/class-wp-locale.php
r52652 r52929 95 95 */ 96 96 public $number_format; 97 98 /** 99 * The separator string used for localizing list item separator. 100 * 101 * @since 6.0.0 102 * @var string 103 */ 104 public $list_item_separator; 97 105 98 106 /** … … 210 218 $this->number_format['decimal_point'] = ( 'number_format_decimal_point' === $decimal_point ) ? '.' : $decimal_point; 211 219 220 /* translators: used between list items, there is a space after the comma */ 221 $this->list_item_separator = __( ', ' ); 222 212 223 // Set text direction. 213 224 if ( isset( $GLOBALS['text_direction'] ) ) { … … 367 378 __( 'F j, Y g:i a' ); 368 379 } 380 381 /** 382 * Retrieve the localized list item separator. 383 * 384 * @since 6.0.0 385 * 386 * @return string Localized list item separator. 387 */ 388 public function get_list_item_separator() { 389 return $this->list_item_separator; 390 } 369 391 } -
trunk/src/wp-includes/class-wp-theme.php
r52652 r52929 925 925 static $comma = null; 926 926 if ( ! isset( $comma ) ) { 927 /* translators: Used between list items, there is a space after the comma. */ 928 $comma = __( ', ' ); 927 $comma = wp_get_list_item_separator(); 929 928 } 930 929 $value = implode( $comma, $value ); -
trunk/src/wp-includes/functions.php
r52832 r52929 8372 8372 return abs( (float) $expected - (float) $actual ) <= $precision; 8373 8373 } 8374 8375 /** 8376 * Retrieves the list item separator based on the locale. 8377 * 8378 * @since 6.0.0 8379 * 8380 * @global WP_Locale $wp_locale WordPress date and time locale object. 8381 * 8382 * @return string Locale specific list item separator. 8383 */ 8384 function wp_get_list_item_separator() { 8385 global $wp_locale; 8386 return $wp_locale->get_list_item_separator(); 8387 }
Note: See TracChangeset
for help on using the changeset viewer.