wp_count_sites

SummerySummery

Count number of sites grouped by site status.

Syntax

wp_count_sites( int $network_id = null )

ParametersParameters

$network_id

(int) (Optional) The network to get counts for. Default is the current network ID.

Default value: null

ReturnReturn

(int[]) Numbers of sites grouped by site status.

  • 'all'
    (int) The total number of sites.
  • 'public'
    (int) The number of public sites.
  • 'archived'
    (int) The number of archived sites.
  • 'mature'
    (int) The number of mature sites.
  • 'spam'
    (int) The number of spam sites.
  • 'deleted'
    (int) The number of deleted sites.

SourceSource

File: wp-includes/ms-blogs.php


			

ChangelogChangelog

Changelog
Version Description
5.3.0 Introduced.
Scroll to Top