wp_protected_ajax_actions

FILTER wp-includes\load.php (ligne 1248) github
Filters the array of protected Ajax actions. This filter is only fired when doing Ajax and the Ajax request has an 'action' property.

Paramètres

Entrée :
$actions_to_protect
Sortie :
@param string[] $actions_to_protect Array of strings with Ajax actions to protect.

Utilisation

// Modifier la valeur avec le filtre 'wp_protected_ajax_actions'
add_filter('wp_protected_ajax_actions', 'ma_fonction_filtre', 10, 1);

function ma_fonction_filtre($actions_to_protect) {
    // Modifier la valeur
    return $actions_to_protect;
}

Actualités

Chargement des actualités...