check_ajax_referer хук-событие . WP 2.1.0
Fires once the Ajax request has been validated or not.
Использование
add_action( 'check_ajax_referer', 'action_function_name_8236', 10, 2 ); function action_function_name_8236( $action, $result ){ // action... }
- $action(строка)
- The Ajax nonce action.
- $result(false/число)
- 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.
Список изменений
С версии 2.1.0 | Введена. |
Где вызывается хук
check_ajax_referer
wp-includes/pluggable.php 1204
do_action( 'check_ajax_referer', $action, $result );