check_ajax_referer

check_ajax_referer

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: action
See hook in action

See hook in core

Displaying hooks found in version: wordpress-6.7.2

do_action('check_ajax_referer') is found 1 times:

  • /wp-includes/pluggable.php line 1343
    1339
    1340
    1341
    1342
    1343
    1344
    1345
    1346
    1347
    1348
    1349
    * @param string    $action The Ajax 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_ajax_referer', $action, $result );
     
    if ( $stop && false === $result ) {
        if ( wp_doing_ajax() ) {
            wp_die( -1, 403 );
        } else {
            die( '-1' );

See this hook used in plugins: