Skip to content

Instantly share code, notes, and snippets.

@marushu
Last active December 22, 2015 23:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save marushu/5410d94ab66c9b250dc7 to your computer and use it in GitHub Desktop.
Save marushu/5410d94ab66c9b250dc7 to your computer and use it in GitHub Desktop.
<?php
printf( __( '%3$s <time class="col" %4$s><span class="ico">Published on</span>%2$s</time> ', 'sampression' ),
'meta-prep meta-prep-author', // %1
sprintf( '<a href="%1$s" title="%2$s" rel="bookmark">%3$s</a>', // %2(値を返す)
get_permalink(), // %1
esc_attr( get_the_time() ), // %2
get_the_date('Y年m月d日') // %3
),
sprintf( '<div class="post-author col"><span class="ico hello">Author</span><a class="url fn n" href="%1$s" title="%2$s">%3$s</a></div>', // %3(値を返す)
get_author_posts_url( get_the_author_meta( 'ID' ) ), // %1
sprintf( esc_attr__( 'View all posts by %s', 'sampression' ), get_the_author() ), // %2
get_the_author() // %3
),
sprintf( 'datetime="%1s"', get_the_time( 'c' ) ) // ISO 8601 日付 : http://php.net/manual/ja/function.date.php )%4(値を返す)
);
?>
@marushu
Copy link
Author

marushu commented Sep 12, 2013

timeのdatetime属性にISO 8601日付を追加する

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment