display_site_states filter-hookWP 5.3.0

Filters the default site display states for items in the Sites list table.

Usage

add_filter( 'display_site_states', 'wp_kama_display_site_states_filter', 10, 2 );

/**
 * Function for `display_site_states` filter-hook.
 * 
 * @param string[] $site_states An array of site states.
 * @param WP_Site  $site        The current site object.
 *
 * @return string[]
 */
function wp_kama_display_site_states_filter( $site_states, $site ){

	// filter...
	return $site_states;
}
$site_states(string[])
An array of site states.
Default: 'Main', 'Archived', 'Mature', 'Spam', 'Deleted'
$site(WP_Site)
The current site object.

Changelog

Since 5.3.0 Introduced.

Where the hook is called

WP_MS_Sites_List_Table::site_states()
display_site_states
wp-admin/includes/class-wp-ms-sites-list-table.php 642
$site_states = apply_filters( 'display_site_states', $site_states, $_site );

Where the hook is used in WordPress

Usage not found.