WordPress at a glance
function is not described

rest_cookie_collect_status() WP 4.4.0

Collects cookie authentication status.

Collects errors from wp_validate_auth_cookie for use by rest_cookie_check_errors.

No Hooks.

Return

null. Nothing.

Usage

rest_cookie_collect_status();

Notes

  • See: current_action()
  • Global. Mixed. $wp_rest_auth_cookie

Changelog

Since 4.4.0 Introduced.

Code of rest_cookie_collect_status() WP 5.7.2

<?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;
}