函数原型
is_network_admin(): bool
函数描述
Determines whether the current request is for the network administrative interface.
是否弃用
未弃用
函数参数
无
函数返回值
bool True if inside WordPress network administration pages.
函数位置
File: wp-includes/load.php.
函数源码
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;
}
源码链接
变更日志
| Version | Description |
|---|---|
| 3.1.0 | Introduced. |

