wp_protected_ajax_actions WordPress Action Hook
This hook is used to protect AJAX actions from being executed by unauthorized users. It does this by checking the user's permissions before allowing the action to be executed. This is a security measure to prevent potential attacks on your site.
apply_filters( 'wp_protected_ajax_actions', string[] $actions_to_protect ) #
Filters the array of protected Ajax actions.
Description
This filter is only fired when doing Ajax and the Ajax request has an ‘action’ property.
Parameters
- $actions_to_protect
(string[])Array of strings with Ajax actions to protect.
Source
File: wp-includes/load.php
Changelog
Version | Description |
---|---|
5.2.0 | Introduced. |