Make WordPress Core


Ignore:
Timestamp:
12/12/2025 01:13:43 AM (9 months ago)
Author:
westonruter
Message:

I18N: Use wp_get_list_item_separator() as list separator for the states of sites, posts, and media.

Developed in https://github.com/WordPress/wordpress-develop/pull/10577

Follow-up to [52929].

Props geminorum.
See #39733.
Fixes #64330.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-ms-sites-list-table.php

    r60358 r61371  
    675675                if ( ! empty( $site_states ) ) {
    676676                        $state_count = count( $site_states );
     677                        $separator   = wp_get_list_item_separator();
    677678
    678679                        $i = 0;
     
    683684                                ++$i;
    684685
    685                                 $separator = ( $i < $state_count ) ? ', ' : '';
    686 
    687                                 echo "<span class='post-state'>{$state}{$separator}</span>";
     686                                $suffix = ( $i < $state_count ) ? $separator : '';
     687
     688                                echo "<span class='post-state'>{$state}{$suffix}</span>";
    688689                        }
    689690                }
Note: See TracChangeset for help on using the changeset viewer.