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


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

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

Return Values
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: