codemonkey-jack / shoestrap-3

A highly customizable WordPress theme with the ability to use multiple CSS frameworks
http://shoestrap.org
MIT License
395 stars 103 forks source link

Comments dates like "2005-11-13T15:21:11+00:0013 noviembre, 2005" in comments list #603

Closed jesustorresdev closed 10 years ago

jesustorresdev commented 10 years ago

In /templates/comments.php:9 comment_date() is used instead of get_comment_date so the date is output before time tag.

For example:

lagoon

2005-11-13T15:21:11+00:00

Pues sí, se podría. Me parece buena idea.

Lo comentaremos a ver como se puede enfocar y añadirlo al TODO.

Un saludo.

fovoc commented 10 years ago

Hey there,

I just tested both and I can see the same HTML markup.

<time class="entry-date" datetime="2014-10-31T08:27:20+00:00">October 31, 2014</time>

Please advise, Dimtiris

jesustorresdev commented 10 years ago

comment_date( ' c' ) displays the date a comment was posted (http://codex.wordpress.org/Function_Reference/comment_date) but get_comment_date( ' c' ) return the comment date of the current comment (http://codex.wordpress.org/Function_Reference/get_comment_date).

In my instalation of shoestrap with:

echo '<time datetime="' . comment_date( 'c' ) . '"><a href="' . htmlspecialchars( get_comment_link( $comment->comment_ID ) ) . '">';
        printf( __( '%1$s', 'shoestrap' ), get_comment_date(),  get_comment_time() );
</code>

comment_date( ' c' ) displays the date before the sentence with echo ends, so the date is shows before tha time time. And how comment_date ( 'c' ) returns nothing, this is the markup that I see:

2014-10-31T08:27:20+00:00<time class="entry-date" datetime="">October 31, 2014</time>

But using get_comment_date:

echo '

the markup is:

<time class="entry-date" datetime="2014-10-31T08:27:20+00:00">October 31, 2014</time>

because get_comment_date( 'c' ) returns the date and it joined to the string displayed by echo.

fovoc commented 10 years ago

oops, I think you're right... would it be too much for you to create a pull-request with these changes?

Dimitris

aristath commented 10 years ago

:100: