Switch language

wpseek.com
A WordPress-centric search engine for devs and theme authors




get_comment_time [ WordPress Function ]

get_comment_time ( $d = '', $gmt = false, $translate = true )
Parameters:
  • (string) $d Optional. The format of the time (defaults to user's config)
  • (bool) $gmt Whether to use the GMT date
  • (bool) $translate Whether to translate the time (for use in feeds)
Uses:
  • $comment
  • apply_filter()
Returns:
  • (string) The formatted time
Defined at:



Retrieve the comment time of the current comment.

Source


<?php
function get_comment_time$d ''$gmt false$translate true ) {
    global 
$comment;
    
$comment_date $gmt $comment->comment_date_gmt $comment->comment_date;
    if ( 
'' == $d )
        
$date mysql2date(get_option('time_format'), $comment_date$translate);
    else
        
$date mysql2date($d$comment_date$translate);
    return 
apply_filters('get_comment_time'$date$d$gmt$translate);
}
?>

Examples [ wp-snippets.com ]

Top Google zoekresultaten

Meer ...

Gebruikersdiscussies [ wordpress.org ]

0 User Note(s)

Nog geen één. Wees de eerste!

Nieuw toevoegen ...



HTML5 Powered with CSS3 / Styling, Performance & Integration, and Semantics