WordPress开发者和主题制作者的搜索引擎



rest_authorization_required_code ›

Since4.7.0
已弃用n/a
rest_authorization_required_code ( 没有参数 )
返回:
  • (integer) 401 if the user is not logged in, 403 if the user is logged in.
定义在:
文档:

Returns a contextual HTTP error code for authorization failure.



源码

function rest_authorization_required_code() {
	return is_user_logged_in() ? 403 : 401;
}