wppaste
WordPress

do_action( 'check_admin_referer', string $action, false|int $result )

Since
1.5.1
Fires once the admin request has been validated or not.

Compatibility

WordPress
since 1.5.1
  • 6.7.10
  • 6.8.11
  • 6.9.10
  • 7.0.7
  • 7.1.3

Present in every tracked release (6.7.10 to 7.1.3).

Parameters

$actionstring
The nonce action.
$resultfalse|int
False if the nonce is invalid, 1 if the nonce is valid and generated between 0-12 hours ago, 2 if the nonce is valid and generated between 12-24 hours ago.

Where this hook fires · 1

  • wp-includes/pluggable.php:1386check_admin_referer()

Source code

		 * @since 1.5.1		 *		 * @param string    $action The nonce action.		 * @param false|int $result False if the nonce is invalid, 1 if the nonce is valid and generated between		 *                          0-12 hours ago, 2 if the nonce is valid and generated between 12-24 hours ago.		 */		do_action( 'check_admin_referer', $action, $result ); 		if ( ! $result && ! ( -1 === $action && str_starts_with( $referer, $adminurl ) ) ) {			wp_nonce_ays( $action );			die();		}

Changelog

Introduced in 1.5.1. Unchanged from 6.7.10 through 7.1.3.

  1. 6.7.10
  2. 6.8.11
  3. 6.9.10
  4. 7.0.7
  5. 7.1.3

Signature, return type and hooks compared across 5 parsed releases.

About this page

Parsed data
Generated from the wordpress-develop 6.9.10 tag, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
Corrections
Something wrong on this page? Report it and it gets fixed in the next regeneration.