Fires non-authenticated Ajax actions for logged-out users.
Description
The dynamic portion of the hook name, $_REQUEST['action']
, refers to the name of the Ajax action callback being fired.
Source
'query-themes',
Changelog
Version | Description |
---|---|
2.8.0 | Introduced. |
Used to hook an ajax action to server function when a user is not logged into the front-end,
On the front-end you would have some js script executed based on some event,
for more info, checkout https://developer.wordpress.org/plugins/javascript/ajax/
wp_json_send($data)
should bewp_send_json($data)