Skip to content
Browse files

Corrected timestamp formatting for comments

  • Loading branch information...
1 parent 053923d commit d433e90b7d0a05e0664a407a99dfad94cb1eefbb @kwight committed Oct 11, 2012
Showing with 17 additions and 3 deletions.
  1. +17 −3 functions.php
View
20 functions.php
@@ -252,7 +252,7 @@ function debut_comment( $comment, $args, $depth ) {
if ( $can_edit_post ) { edit_comment_link( __( 'Edit', 'debut' ), ' ⋅ ' ); } ?>
</div><!-- .perma-reply-edit -->
<h4><?php echo get_comment_author_link(); ?></h4>
- <?php comment_time( 'F j, Y \a\t g:ia' ); ?><br />
+ <?php echo debut_comment_time(); ?><br />
</div><!-- .comment-meta -->
<div id="comment-content-<?php comment_ID(); ?>" class="<?php echo esc_attr( $content_class ); ?>">
<?php if ( $comment->comment_approved == '0' ): ?>
@@ -418,12 +418,26 @@ function debut_lang_switcher() {
*
* @since 1.05
*/
-
function debut_date() {
if ( 'fr' == ICL_LANGUAGE_CODE ) {
$date = get_the_time( 'j F Y' );
} else {
$date = get_the_time( 'F j, Y' );
}
return $date;
-}
+}
+
+
+/**
+ * Output the comment timestamp with correct formatting per language
+ *
+ * @since 1.05
+ */
+function debut_comment_time() {
+ if ( 'fr' == ICL_LANGUAGE_CODE ) {
+ $timestamp = comment_time( '\l\e j F Y \à H\hi' );
+ } else {
+ $timestamp = comment_time( 'F j, Y \a\t g:ia' );
+ }
+ return $timestamp;
+}

0 comments on commit d433e90

Please sign in to comment.
Something went wrong with that request. Please try again.