Ticket #39733: 39733.2022011300.patch
| File 39733.2022011300.patch, 19.2 KB (added by , 4 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/functions.php
182 182 endif; 183 183 add_action( 'after_setup_theme', 'twentynineteen_setup' ); 184 184 185 if ( ! function_exists( 'wp_get_list_item_separator' ) ) : 186 /** 187 * Retrieve the list item separator based on the locale. 188 * 189 * Added for backward compatibility to support pre-5.9.0 WordPress versions. 190 * 191 * @since 5.9.0 192 */ 193 function wp_get_list_item_separator() { 194 return __( ', ', 'twentyeleven' ); 195 } 196 endif; 197 185 198 /** 186 199 * Register widget area. 187 200 * -
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/functions.php
676 676 * Block Patterns. 677 677 */ 678 678 require get_template_directory() . '/inc/block-patterns.php'; 679 680 if ( ! function_exists( 'wp_get_list_item_separator' ) ) : 681 /** 682 * Retrieve the list item separator based on the locale. 683 * 684 * Added for backward compatibility to support pre-5.9.0 WordPress versions. 685 * 686 * @since 5.9.0 687 */ 688 function wp_get_list_item_separator() { 689 return __( ', ', 'twentyseventeen' ); 690 } 691 endif; -
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
411 411 } 412 412 add_action( 'widgets_init', 'twentythirteen_widgets_init' ); 413 413 414 if ( ! function_exists( 'wp_get_list_item_separator' ) ) : 415 /** 416 * Retrieve the list item separator based on the locale. 417 * 418 * Added for backward compatibility to support pre-5.9.0 WordPress versions. 419 * 420 * @since 5.9.0 421 */ 422 function wp_get_list_item_separator() { 423 return __( ', ', 'twentythirteen' ); 424 } 425 endif; 426 414 427 if ( ! function_exists( 'twentythirteen_paging_nav' ) ) : 415 428 /** 416 429 * Display navigation to next/previous set of posts when applicable. … … 490 503 twentythirteen_entry_date(); 491 504 } 492 505 493 /* translators: Used between list items, there is a space after the comma. */ 494 $categories_list = get_the_category_list( __( ', ', 'twentythirteen' ) ); 506 $categories_list = get_the_category_list( wp_get_list_item_separator() ); 495 507 if ( $categories_list ) { 496 508 echo '<span class="categories-links">' . $categories_list . '</span>'; 497 509 } 498 510 499 /* translators: Used between list items, there is a space after the comma. */ 500 $tags_list = get_the_tag_list( '', __( ', ', 'twentythirteen' ) ); 511 $tags_list = get_the_tag_list( '', wp_get_list_item_separator() ); 501 512 if ( $tags_list && ! is_wp_error( $tags_list ) ) { 502 513 echo '<span class="tags-links">' . $tags_list . '</span>'; 503 514 } -
src/wp-content/themes/twentytwelve/functions.php
384 384 } 385 385 add_action( 'widgets_init', 'twentytwelve_widgets_init' ); 386 386 387 if ( ! function_exists( 'wp_get_list_item_separator' ) ) : 388 /** 389 * Retrieve the list item separator based on the locale. 390 * 391 * Added for backward compatibility to support pre-5.9.0 WordPress versions. 392 * 393 * @since 5.9.0 394 */ 395 function wp_get_list_item_separator() { 396 return __( ', ', 'twentytwelve' ); 397 } 398 endif; 399 387 400 if ( ! function_exists( 'twentytwelve_content_nav' ) ) : 388 401 /** 389 402 * Displays navigation to next/previous pages when applicable. … … 502 515 * @since Twenty Twelve 1.0 503 516 */ 504 517 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' ) ); 518 $categories_list = get_the_category_list( wp_get_list_item_separator() ); 507 519 508 /* translators: Used between list items, there is a space after the comma. */ 509 $tags_list = get_the_tag_list( '', __( ', ', 'twentytwelve' ) ); 520 $tags_list = get_the_tag_list( '', wp_get_list_item_separator() ); 510 521 511 522 $date = sprintf( 512 523 '<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/functions.php
640 640 <?php 641 641 } 642 642 add_action( 'wp_footer', 'twentytwentyone_add_ie_class' ); 643 644 if ( ! function_exists( 'wp_get_list_item_separator' ) ) : 645 /** 646 * Retrieve the list item separator based on the locale. 647 * 648 * Added for backward compatibility to support pre-5.9.0 WordPress versions. 649 * 650 * @since 5.9.0 651 */ 652 function wp_get_list_item_separator() { 653 return __( ', ', 'twentytwentyone' ); 654 } 655 endif; -
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
924 924 case 'Tags': 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 ); 931 930 break; -
src/wp-includes/functions.php
8376 8376 function wp_fuzzy_number_match( $expected, $actual, $precision = 1 ) { 8377 8377 return abs( (float) $expected - (float) $actual ) <= $precision; 8378 8378 } 8379 8380 /** 8381 * Retrieve the list item separator based on the locale. 8382 * 8383 * @since 5.9.0 8384 * 8385 * @global WP_Locale $wp_locale WordPress date and time locale object. 8386 * 8387 * @return string Locale specific list item separator. 8388 */ 8389 function wp_get_list_item_separator() { 8390 global $wp_locale; 8391 return $wp_locale->get_list_item_separator(); 8392 }