Switch language
wpseek on Twitter


A WordPress-centric search engine for devs and theme authors




is_network_admin [ ]

is_network_admin ( No parameters )
Returns:
  • (bool) True if inside WordPress network administration pages.
Defined at:
Codex



Whether the current request is for a network admin screen /wp-admin/network/

Does not inform on whether the user is a network admin! Use capability checks to tell if the user should be accessing a section or not.

Source

function is_network_admin() {
	if ( isset( $GLOBALS['current_screen'] ) )
		return $GLOBALS['current_screen']->in_admin( 'network' );
	elseif ( defined( 'WP_NETWORK_ADMIN' ) )
		return WP_NETWORK_ADMIN;

	return false;
}

Top Google Search Results

User Note(s)