wpseek.com
Bazujące na WordPress narzędzie wyszukiwania dla deweloperów i twórców motywów.



rest_authorization_required_code › WordPress Function

Od4.7.0
Przestarzałyn/a
rest_authorization_required_code ( Brak parametrów )
Powrót:
  • (int) 401 if the user is not logged in, 403 if the user is logged in.
Zdefiniowane na:
Codex:

Returns a contextual HTTP error code for authorization failure.



Źródło

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