mainwp_getsites

Description
The mainwp_getsites filter may be used to retrieve information about the child sites added to MainWP.

Usage

$sites = apply_filters('mainwp-getsites', $pluginFile, $childKey, $siteId);

Parameters
$pluginFile
(string) (required) The pluginfile is required here, mostly __FILE__
$childKey
(string) (required) The child-key is required here, how to retrieve your child key is explained here
$siteId
(integer) (optional) The id of the child-site you wish to retrieve

Return Values
(array)
An array which contains an array per child-site with the following keys: id, url, name

Usage Examples
Display the number of child-sites:

Display the information of a specific child site:

Display the information of all child sites: