wp_update_comment_data

FILTER wp-includes\comment.php (ligne 2691) github
Filters the comment data immediately before it is updated in the database. Note: data being passed to the filter is already unslashed.

Paramètres

Entrée :
$data, $comment, $commentarr
Sortie :
@param array|WP_Error $data       The new, processed comment data, or WP_Error.
@param array          $comment    The old, unslashed comment data.
@param array          $commentarr The new, raw comment data.

Utilisation

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

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

Actualités

Chargement des actualités...