Skip to content

Commit ca4d0f7

Browse files
committed
I18N: Use wp_get_list_item_separator() as list separator for the states of sites, posts, and media.
Developed in WordPress/wordpress-develop#10577 Follow-up to [52929]. Props geminorum. See #39733. Fixes #64330. Built from https://develop.svn.wordpress.org/trunk@61371 git-svn-id: https://core.svn.wordpress.org/trunk@60683 1a063a9b-81f0-0310-95a4-ce76da25c4cd
1 parent f5d8d96 commit ca4d0f7

3 files changed

Lines changed: 10 additions & 7 deletions

File tree

wp-admin/includes/class-wp-ms-sites-list-table.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -674,6 +674,7 @@ protected function site_states( $site ) {
674674

675675
if ( ! empty( $site_states ) ) {
676676
$state_count = count( $site_states );
677+
$separator = wp_get_list_item_separator();
677678

678679
$i = 0;
679680

@@ -682,9 +683,9 @@ protected function site_states( $site ) {
682683
foreach ( $site_states as $state ) {
683684
++$i;
684685

685-
$separator = ( $i < $state_count ) ? ', ' : '';
686+
$suffix = ( $i < $state_count ) ? $separator : '';
686687

687-
echo "<span class='post-state'>{$state}{$separator}</span>";
688+
echo "<span class='post-state'>{$state}{$suffix}</span>";
688689
}
689690
}
690691
}

wp-admin/includes/template.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2251,6 +2251,7 @@ function _post_states( $post, $display = true ) {
22512251

22522252
if ( ! empty( $post_states ) ) {
22532253
$state_count = count( $post_states );
2254+
$separator = wp_get_list_item_separator();
22542255

22552256
$i = 0;
22562257

@@ -2259,9 +2260,9 @@ function _post_states( $post, $display = true ) {
22592260
foreach ( $post_states as $state ) {
22602261
++$i;
22612262

2262-
$separator = ( $i < $state_count ) ? ', ' : '';
2263+
$suffix = ( $i < $state_count ) ? $separator : '';
22632264

2264-
$post_states_html .= "<span class='post-state'>{$state}{$separator}</span>";
2265+
$post_states_html .= "<span class='post-state'>{$state}{$suffix}</span>";
22652266
}
22662267
}
22672268

@@ -2379,6 +2380,7 @@ function _media_states( $post, $display = true ) {
23792380

23802381
if ( ! empty( $media_states ) ) {
23812382
$state_count = count( $media_states );
2383+
$separator = wp_get_list_item_separator();
23822384

23832385
$i = 0;
23842386

@@ -2387,9 +2389,9 @@ function _media_states( $post, $display = true ) {
23872389
foreach ( $media_states as $state ) {
23882390
++$i;
23892391

2390-
$separator = ( $i < $state_count ) ? ', ' : '';
2392+
$suffix = ( $i < $state_count ) ? $separator : '';
23912393

2392-
$media_states_string .= "<span class='post-state'>{$state}{$separator}</span>";
2394+
$media_states_string .= "<span class='post-state'>{$state}{$suffix}</span>";
23932395
}
23942396
}
23952397

wp-includes/version.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
*
1717
* @global string $wp_version
1818
*/
19-
$wp_version = '7.0-alpha-61370';
19+
$wp_version = '7.0-alpha-61371';
2020

2121
/**
2222
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.

0 commit comments

Comments
 (0)