wp_ajax_$action

wp_ajax_$action

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: action
See hook in action

See hook in core

Displaying hooks found in version: wordpress-6.7

do_action('wp_ajax_$action') is found 1 times:

  • /wp-admin/admin-ajax.php line 192
    	 * to the name of the Ajax action callback being fired.
    	 *
    	 * @since 2.1.0
    	 */
    	do_action( "wp_ajax_{$action}" );
    } else {
    	// If no action is registered, return a Bad Request response.
    	if ( ! has_action( "wp_ajax_nopriv_{$action}" ) ) {
    		wp_die( '0', 400 );
    	}
    
    

See this hook used in plugins: