Description
The mainwp_getgroups
filter may be used to retrieve information about the groups added to MainWP.
Usage
$sites = apply_filters('mainwp_getgroups', $pluginFile, $childKey, $groupId); Parameters $pluginFile (string) (required) The plugin file is required here, mostly __FILE__ $childKey (string) (required) The child-key is required here, how to retrieve your child key is explained here $groupId (integer) (optional) The id of the group you wish to retrieve Return Values (array) An array that contains an array per group with the following keys: id, name, websites, where websites is an array of website ids.
Usage Examples
Display information about the groups:
Display the information of a the child-sites in a specific group (uses mainwp-getsites):