wppaste
WordPress

apply_filters( 'display_site_states', string[] $site_states, WP_Site $site )

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

Compatibility

WordPress
since 5.3.0
  • 6.7.7
  • 6.8.8
  • 6.9.7
  • 7.0.4
  • 7.1.0

Present in every tracked release (6.7.7 to 7.1.0).

Parameters

$site_statesstring[]
An array of site states. Default 'Main', 'Archived', 'Mature', 'Spam', 'Flagged for Deletion'.
$siteWP_Site
The current site object.

Where this hook fires · 1

  • wp-admin/includes/class-wp-ms-sites-list-table.php:696WP_MS_Sites_List_Table::site_states()

Source code

		 * @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;

Changelog

Introduced in 5.3.0. Unchanged from 6.7.7 through 7.1.0.

  1. 6.7.7
  2. 6.8.8
  3. 6.9.7
  4. 7.0.4
  5. 7.1.0

Signature, return type and hooks compared across 5 parsed releases.

About this page

Parsed data
Generated from the wordpress-develop 7.1.0 tag, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
Corrections
Something wrong on this page? Report it and it gets fixed in the next regeneration.