Created
March 24, 2023 16:52
-
-
Save bkatusic/fb7a6e3ad231afafcfce4974f4ac4169 to your computer and use it in GitHub Desktop.
MainWP - Count users on Child Sites
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$result = count_users(); | |
echo 'There are ', $result['total_users'], ' total users'; | |
foreach( $result['avail_roles'] as $role => $count ) { | |
echo ', ', $count, ' are ', $role, 's'; | |
} | |
echo '.'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment