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.


Description

The dynamic portion of the hook name, $_REQUEST['action'], refers to the name of the Ajax action callback being fired.


Top ↑

Source

File: wp-admin/admin-ajax.php

View on Trac


Top ↑

Changelog

Changelog
VersionDescription
2.8.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.