check_admin_referer


check_admin_referer ( $action = -1, $query_arg = '_wpnonce' )

Parameters:
  • (int|string) $action Action nonce.
  • (string) $query_arg Optional. Key to check for nonce in `$_REQUEST` (since 2.5). Default '_wpnonce'.
Returns:
  • (false|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.
Defined at:

Description

Makes sure that a user was referred from another admin page.

To avoid security exploits.

Related Functions

check_ajax_referer, check_password_reset_key, check_upload_mimes, wp_admin_bar_render, _get_admin_bar_pref

Top Google Results

User discussions

wpseek mobile