Skip to content

Instantly share code, notes, and snippets.

@marushu marushu/datetime.php Secret
Last active Dec 22, 2015

Embed
What would you like to do?
<?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

This comment has been minimized.

Copy link
Owner 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
You can’t perform that action at this time.