rest_cookie_collect_status()

Collects cookie authentication status.


Description Description

Collects errors from wp_validate_auth_cookie for use by rest_cookie_check_errors.

See also See also



Top ↑

Source Source

File: wp-includes/rest-api.php

function rest_cookie_collect_status() {
	global $wp_rest_auth_cookie;

	$status_type = current_action();

	if ( 'auth_cookie_valid' !== $status_type ) {
		$wp_rest_auth_cookie = substr( $status_type, 12 );
		return;
	}

	$wp_rest_auth_cookie = true;
}

Top ↑

Changelog Changelog

Changelog
Version Description
4.4.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.