wp_ajax_nopriv_(action) action-hook . WP 2.8.0
Fires non-authenticated Ajax actions for logged-out users.
The dynamic portion of the hook name, $action, refers to the name of the Ajax action callback being fired.
Usage
add_action( 'wp_ajax_nopriv_(action)', 'action_function_name_3604' ); function action_function_name_3604(){ // action... }
Changelog
Since 2.8.0 | Introduced. |
Where the hook is called
In file: /wp-admin/admin-ajax.php
wp-admin/admin-ajax.php 199
do_action( "wp_ajax_nopriv_{$action}" );
Where in WP core the hook is used WordPress
wp-admin/admin-ajax.php 166
add_action( 'wp_ajax_nopriv_heartbeat', 'wp_ajax_nopriv_heartbeat', 1 );