Opens in a new tab
A picture of Jeff Brigman
I CODE TODAY FOR
A BETTER TOMORROW

Glossary Term

check_ajax_referer()

3 tags 1 category

check_ajax_referer() — Verifies the Ajax request to prevent processing requests external of the blog.

Inputs: $action (int|string): Action nonce. $query_arg (false|string): Optional. Key to check for the nonce in $_REQUEST (since 2.5). If false, $_REQUEST values will be evaluated for ‘_ajax_nonce’, and ‘_wpnonce’ (in that order). Default false. $stop (bool): Optional. Whether to stop early when the nonce cannot be verified. Default true.

Returns int|false: 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. False if the nonce is invalid. Only possible when $stop is false, as the function otherwise exits rather than returning false.

Term Connections

Explore related terms connected by shared tags, shared categories, and relationship phrases. This map loads only when it comes into view.

Loading term connections…