get_comment_time

FUNCTION wp-includes\comment-template.php (ligne 1079) github
Filters the text of a comment to be displayed.

Paramètres

Entrée :
$format = '', $gmt = false, $translate = true, $comment_id = 0
Sortie :
@param string          $comment_text Text of the comment.
@param WP_Comment|null $comment      The comment object. Null if not found.
@param array           $args         An array of arguments.
@param string         $format     Optional. PHP date format. Defaults to the 'time_format' option.
@param bool           $gmt        Optional. Whether to use the GMT date. Default false.
@param bool           $translate  Optional. Whether to translate the time (for use in feeds).
@param int|WP_Comment $comment_id Optional. WP_Comment or ID of the comment for which to get the time.
@return string The formatted time.

Utilisation

// Utilisation de la fonction get_comment_time
$result = get_comment_time($format = '', $gmt = false, $translate = true, $comment_id = 0);

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

Actualités

Chargement des actualités...