get_bloginfo( ‘admin_email’ ) for multiple admins’ email addresses
-
I’m writing a plugin and I need to be able to get all the admins’ email addresses of all the sites on a Multisite platform.
I’ve used this “get_bloginfo( ‘admin_email’ )”, but this of course just returns the main admin’s email address (i.e. the owner, first creator of the subsite, the OG, the head honcho, etc.).
I’m trying to get ALL the admins’ email addresses (i.e. any user who has a role set to admin on this subsite, I want their email address outputted). I will need to know which admin’s email address belongs to which subsite.
In the spirit of “throw everything you’ve got and see what sticks”, I’ve also tried array (get_bloginfo( ‘admin_email’ )), but this just me being plain dumb ditty dumb. The output is just “Array”.
I surmise I have to approach it by doing a search for all users on the subsite that have the role “Admin” and then get their email addresses.
Has anyone done this already or have any ideas, thoughts, or knowledge to contribute? Is there another function I’m overlooking? Thanks.
- The topic ‘get_bloginfo( ‘admin_email’ ) for multiple admins’ email addresses’ is closed to new replies.