wp_ajax_nopriv_{$_REQUEST[‘action’]} WordPress Action Hook
The wp_ajax_nopriv_{$_REQUEST['action']} WordPress hook allows a user to perform an action without being logged in. This hook is useful for allowing users to perform actions such as voting on a poll or submitting a form.
do_action( "wp_ajax_nopriv_{$_REQUEST['action']}" ) #
Fires non-authenticated Ajax actions for logged-out users.
Contents
Description
The dynamic portion of the hook name, $_REQUEST['action']
, refers to the name of the Ajax action callback being fired.
Source
File: wp-admin/admin-ajax.php
Changelog
Version | Description |
---|---|
2.8.0 | Introduced. |