wp-admin/includes/class-wp-ms-sites-list-table.php:668Determines whether to output comma-separated site states.
$siteOne hook fires while WP_MS_Sites_List_Table::site_states() runs, in this order:
Filters the default site display states for items in the Sites list table.
protected function site_states( $site ) { $site_states = array(); // $site is still an array, so get the object. $_site = WP_Site::get_instance( $site['blog_id'] ); if ( is_main_site( $_site->id ) ) { $site_states['main'] = __( 'Main' ); } reset( $this->status_list ); $site_status = isset( $_REQUEST['status'] ) ? wp_unslash( trim( $_REQUEST['status'] ) ) : ''; foreach ( $this->status_list as $status => $col ) { if ( '1' === $_site->{$status} && $site_status !== $status ) { $site_states[ $col[0] ] = $col[1]; } } /** * Filters the default site display states for items in the Sites list table. * * @since 5.3.0 * * @param string[] $site_states An array of site states. Default 'Main', * 'Archived', 'Mature', 'Spam', 'Flagged for Deletion'. * @param WP_Site $site The current site object. */ $site_states = apply_filters( 'display_site_states', $site_states, $_site ); if ( ! empty( $site_states ) ) { $state_count = count( $site_states ); $separator = wp_get_list_item_separator(); $i = 0; echo ' — '; foreach ( $site_states as $state ) { ++$i; $suffix = ( $i < $state_count ) ? $separator : ''; echo "<span class='post-state'>{$state}{$suffix}</span>"; } } }Introduced in 5.3.0. One change between 6.7.7 and 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
$site retyped from array to untyped.verified against sourcesrc/wp-admin/includes/class-wp-ms-sites-list-table.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.