Core Function
View Source on Trac ↗ rest_authorization_required_code()
rest_authorization_required_code( ) Returns a contextual HTTP error code for authorization failure.
Return Value
(int)
401 if the user is not logged in, 403 if the user is logged in.
Function Information
Since Version
4.7.0
Source File
wp-includes/rest-api.php
Advertisement