duplicate_comment_id

FILTER wp-includes\comment.php (ligne 727) github
Filters the ID, if any, of the duplicate comment found when creating a new comment. Return an empty value from this filter to allow what WP considers a duplicate comment.

Paramètres

Entrée :
$dupe_id, $commentdata
Sortie :
@param int   $dupe_id     ID of the comment identified as a duplicate.
@param array $commentdata Data for the comment being created.

Utilisation

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

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

Actualités

Chargement des actualités...