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.


Top ↑

Parameters

$actions_to_protect

(string[])Array of strings with Ajax actions to protect.


Top ↑

Source

File: wp-includes/load.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
5.2.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.