Ticket #39733: 39733.2021092000.patch
File 39733.2021092000.patch, 16.0 KB (added by , 2 years ago) |
---|
-
src/wp-admin/includes/class-wp-media-list-table.php
633 633 esc_html( sanitize_term_field( 'name', $t->name, $t->term_id, $taxonomy, 'display' ) ) 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>'; 640 639 } -
src/wp-admin/includes/class-wp-posts-list-table.php
1294 1294 */ 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>'; 1301 1300 } -
src/wp-content/themes/twentyeleven/content-featured.php
32 32 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 ) ) { 39 38 /* translators: 1: Category list, 2: Tag list, 3: Post permalink, 4: Post title. */ … … 45 44 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() ), 52 50 the_title_attribute( 'echo=0' ) -
src/wp-content/themes/twentyeleven/content-gallery.php
72 72 <?php $show_sep = false; ?> 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 ) : 79 78 ?> … … 87 86 <?php endif; // End if categories. ?> 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 ) ) : 94 92 if ( $show_sep ) : -
src/wp-content/themes/twentyeleven/content-image.php
55 55 </div><!-- .entry-meta --> 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 ) : 62 61 ?> … … 69 68 <?php endif; // End if categories. ?> 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 ) ) : 76 74 ?> -
src/wp-content/themes/twentyeleven/content-quote.php
48 48 <?php $show_sep = false; ?> 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 ) : 55 54 ?> … … 64 63 65 64 <?php 66 65 /* translators: Used between list items, there is a space after the comma. */ 67 $tags_list = get_the_tag_list( '', __( ', ', 'twentyeleven') );66 $tags_list = get_the_tag_list( '', wp_get_list_item_separator() ); 68 67 69 68 if ( $tags_list && ! is_wp_error( $tags_list ) ) : 70 69 if ( $show_sep ) : -
src/wp-content/themes/twentyeleven/content-single.php
33 33 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 ) ) { 43 41 /* translators: 1: Categories list, 2: Tag list, 3: Permalink, 4: Post title, 5: Author name, 6: Author URL. */ -
src/wp-content/themes/twentyeleven/content.php
55 55 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 ) : 62 61 ?> … … 72 71 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 ) ) : 79 77 if ( $show_sep ) : -
src/wp-content/themes/twentyeleven/functions.php
929 929 } 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 * Retrieve the list item separator based on the locale. 936 * 937 * Added for backward compatibility to support pre-5.9.0 WordPress versions. 938 * 939 * @since 5.9.0 940 */ 941 function wp_get_list_item_separator() { 942 return __( ', ', 'twentyeleven' ); 943 } 944 endif; -
src/wp-content/themes/twentynineteen/inc/template-tags.php
82 82 // Posted on. 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( 89 88 /* translators: 1: SVG icon. 2: Posted in label, only visible to screen readers. 3: List of categories. */ … … 94 93 ); // WPCS: XSS OK. 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( 101 99 /* translators: 1: SVG icon. 2: Posted in label, only visible to screen readers. 3: List of tags. */ -
src/wp-content/themes/twentyseventeen/inc/template-tags.php
62 62 */ 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. 69 68 $categories_list = get_the_category_list( $separate_meta ); -
src/wp-content/themes/twentythirteen/functions.php
490 490 twentythirteen_entry_date(); 491 491 } 492 492 493 /* translators: Used between list items, there is a space after the comma. */ 494 $categories_list = get_the_category_list( __( ', ', 'twentythirteen' ) ); 493 $categories_list = get_the_category_list( wp_get_list_item_separator() ); 495 494 if ( $categories_list ) { 496 495 echo '<span class="categories-links">' . $categories_list . '</span>'; 497 496 } 498 497 499 /* translators: Used between list items, there is a space after the comma. */ 500 $tags_list = get_the_tag_list( '', __( ', ', 'twentythirteen' ) ); 498 $tags_list = get_the_tag_list( '', wp_get_list_item_separator() ); 501 499 if ( $tags_list && ! is_wp_error( $tags_list ) ) { 502 500 echo '<span class="tags-links">' . $tags_list . '</span>'; 503 501 } -
src/wp-content/themes/twentytwelve/functions.php
502 502 * @since Twenty Twelve 1.0 503 503 */ 504 504 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' ) ); 505 $categories_list = get_the_category_list( wp_get_list_item_separator() ); 507 506 508 /* translators: Used between list items, there is a space after the comma. */ 509 $tags_list = get_the_tag_list( '', __( ', ', 'twentytwelve' ) ); 507 $tags_list = get_the_tag_list( '', wp_get_list_item_separator() ); 510 508 511 509 $date = sprintf( 512 510 '<a href="%1$s" title="%2$s" rel="bookmark"><time class="entry-date" datetime="%3$s">%4$s</time></a>', -
src/wp-content/themes/twentytwentyone/inc/template-tags.php
100 100 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( 107 106 /* translators: %s: List of categories. */ … … 110 109 ); 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( 117 115 /* translators: %s: List of tags. */ … … 144 142 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( 151 148 /* translators: %s: List of categories. */ … … 154 151 ); 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( 161 157 /* translators: %s: List of tags. */ -
src/wp-includes/class-wp-locale.php
96 96 public $number_format; 97 97 98 98 /** 99 * The separator string used for localizing list item separator. 100 * 101 * @since 5.9.0 102 * @var string 103 */ 104 public $list_item_separator; 105 106 /** 99 107 * Constructor which calls helper methods to set up object variables. 100 108 * 101 109 * @since 2.1.0 … … 209 217 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'] ) ) { 214 225 $this->text_direction = $GLOBALS['text_direction']; … … 366 377 /* translators: Localized date and time format, see https://www.php.net/manual/datetime.format.php */ 367 378 __( 'F j, Y g:i a' ); 368 379 } 380 381 /** 382 * Retrieve the localized list item separator. 383 * 384 * @since 5.9.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 } -
src/wp-includes/class-wp-theme.php
923 923 case 'Tags': 924 924 static $comma = null; 925 925 if ( ! isset( $comma ) ) { 926 /* translators: Used between list items, there is a space after the comma. */ 927 $comma = __( ', ' ); 926 $comma = wp_get_list_item_separator(); 928 927 } 929 928 $value = implode( $comma, $value ); 930 929 break; -
src/wp-includes/functions.php
8281 8281 function wp_fuzzy_number_match( $expected, $actual, $precision = 1 ) { 8282 8282 return abs( (float) $expected - (float) $actual ) <= $precision; 8283 8283 } 8284 8285 /** 8286 * Retrieve the list item separator based on the locale. 8287 * 8288 * @since 5.9.0 8289 * 8290 * @global WP_Locale $wp_locale WordPress date and time locale object. 8291 * 8292 * @return string Locale specific list item separator. 8293 */ 8294 function wp_get_list_item_separator() { 8295 global $wp_locale; 8296 return $wp_locale->get_list_item_separator(); 8297 }