comment_post_redirect

FILTER wp-comments-post.php (ligne 78) github
Filters the location URI to send the commenter after posting.

Paramètres

Entrée :
$location, $comment
Sortie :
@param string     $location The 'redirect_to' URI sent via $_POST.
@param WP_Comment $comment  Comment object.

Utilisation

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

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

Actualités

Chargement des actualités...