rest_authorization_required_code

Advertisement

Summery Summery

Returns a contextual HTTP error code for authorization failure.

Syntax Syntax

rest_authorization_required_code()

Return Return

(integer) 401 if the user is not logged in, 403 if the user is logged in.

Source Source

File: wp-includes/rest-api.php

	$status_type = current_action();

	if ( 'auth_cookie_valid' !== $status_type ) {

Advertisement

Changelog Changelog

Changelog
Version Description
4.7.0 Introduced.

Advertisement

Leave a Reply