is_login

函数


is_login ( No parameters )
返回值
  • (bool) True if inside WordPress login screen, false otherwise.
相关
  • wp_login_url()
定义位置
  • wp-includes/load.php
    , line 1152
引入
6.1.0
弃用

Determines whether the current request is for the login screen.

function is_login() {
	return false !== stripos( wp_login_url(), $_SERVER['SCRIPT_NAME'] );
}