Advertisement
rachelbaker

TwentyEleven Meta

Jul 18th, 2012
716
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.93 KB | None | 0 0
  1. if ( ! function_exists( 'twentyeleven_posted_on' ) ) :
  2. /**
  3.  * Prints HTML with meta information for the current post-date/time and author.
  4.  * Create your own twentyeleven_posted_on to override in a child theme
  5.  *
  6.  * @since Twenty Eleven 1.0
  7.  */
  8. function twentyeleven_posted_on() {
  9.     printf( __( '<span class="sep">Posted on </span><a href="%1$s" title="%2$s" rel="bookmark"><time class="entry-date" datetime="%3$s" pubdate>%4$s</time></a><span class="by-author"> <span class="sep"> by </span> <span class="author vcard"><a class="url fn n" href="%5$s" title="%6$s" rel="author">%7$s</a></span></span>', 'twentyeleven' ),
  10.         esc_url( get_permalink() ),
  11.         esc_attr( get_the_time() ),
  12.         esc_attr( get_the_date( 'c' ) ),
  13.         esc_html( get_the_date() ),
  14.         esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),
  15.         esc_attr( sprintf( __( 'View all posts by %s', 'twentyeleven' ), get_the_author() ) ),
  16.         get_the_author()
  17.     );
  18. }
  19. endif;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement