check_ajax_referer action-hook . WP 2.1.0
Fires once the Ajax request has been validated or not.
Usage
add_action( 'check_ajax_referer', 'action_function_name_4565', 10, 2 ); function action_function_name_4565( $action, $result ){ // action... }
- $action(string)
- The Ajax nonce action.
- $result(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.
Changelog
Since 2.1.0 | Introduced. |
Where the hook is called
check_ajax_referer
wp-includes/pluggable.php 1204
do_action( 'check_ajax_referer', $action, $result );