php - How to check super admin for WordPress multisite? -


i want check super admin in wp_config.php , i've tried following code without result.

if (get_super_admins()) {     echo 'you super admin'; } 

kindly me thanks.

try this:

if ( is_super_admin() ) {     echo 'you super admin'; } 

it not work in wp-config.php user has not been loaded @ stage. there no user check for.

use in theme functions.php file or custom plugin code.


Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -