is_admin()

最后更新于:2021-11-27 08:00:07

is_admin()

Determines whether the current request is for an administrative interface page.

响应

(bool) True if inside GeChiUI administration interface, false otherwise.

源文件

文件: gc-includes/load.php

function is_admin() {
	if ( isset( $GLOBALS['current_screen'] ) ) {
		return $GLOBALS['current_screen']->in_admin();
	} elseif ( defined( 'GC_ADMIN' ) ) {
		return GC_ADMIN;
	}

	return false;
}