get_comment

FUNCTION wp-includes\comment.php (ligne 204) github
Retrieves comment data given a comment ID or comment object. If an object is passed then the comment data will be cached and then returned after being passed through a filter. If the comment is empty, then the global comment variable will be used, if it is set.

Paramètres

Entrée :
$comment = null, $output = OBJECT
Sortie :
@param WP_Comment|string|int $comment Comment to retrieve.
@param string                $output  Optional. The required return type. One of OBJECT, ARRAY_A, or ARRAY_N, which
@return WP_Comment|array|null Depends on $output value.

Utilisation

// Utilisation de la fonction get_comment
$result = get_comment($comment = null, $output = OBJECT);

if ($result) {
    // Votre logique ici
}

Actualités

Chargement des actualités...