On this page
is_network_admin(): bool
Determines whether the current request is for the network administrative interface.
Description
e.g. /wp-admin/network/
Does not check if the user is an administrator; use current_user_can() for checking roles and capabilities.
Does not check if the site is a Multisite network; use is_multisite() for checking if Multisite is enabled.
Return
bool True if inside WordPress network administration pages.
Source
File: wp-includes/load.php. View all references
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;
}
Related
Used By
| Used By | Description |
|---|---|
| WP_Site_Health_Auto_Updates::test_wp_version_check_attached() wp-admin/includes/class-wp-site-health-auto-updates.php | Checks if updates are intercepted by a filter. |
| Theme_Upgrader_Skin::after() wp-admin/includes/class-theme-upgrader-skin.php | Action to perform following a single theme update. |
| Theme_Installer_Skin::after() wp-admin/includes/class-theme-installer-skin.php | Action to perform following a single theme install. |
| _access_denied_splash() wp-admin/includes/ms.php | Displays an access denied message when a user tries to view a site’s dashboard they do not have access to. |
| wp_plugin_update_row() wp-admin/includes/update.php | Displays update information for a plugin. |
| wp_dashboard_right_now() wp-admin/includes/dashboard.php | Dashboard widget that displays some basic stats about the site. |
| wp_dashboard_setup() wp-admin/includes/dashboard.php | Registers dashboard widgets. |
| WP_Plugin_Install_List_Table::display_rows() wp-admin/includes/class-wp-plugin-install-list-table.php | |
| load_default_textdomain() wp-includes/l10n.php | Loads default translated strings based on locale. |
| add_thickbox() wp-includes/general-template.php | Enqueues the default ThickBox js and css. |
| self_admin_url() wp-includes/link-template.php | Retrieves the URL to the admin area for either the current site or the network depending on context. |
| get_edit_profile_url() wp-includes/link-template.php | Retrieves the URL to the user’s profile editor. |
| WP_Admin_Bar::add_menus() wp-includes/class-wp-admin-bar.php | Adds menus to the admin bar. |
| wp_admin_bar_site_menu() wp-includes/admin-bar.php | Adds the “Site Name” menu. |
| wp_validate_logged_in_cookie() wp-includes/user.php | Validates the logged-in cookie. |
Changelog
| Version | Description |
|---|---|
| 3.1.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/is_network_admin