Want more features on Pastebin? Sign Up, it's FREE!
Guest

TwentyEleven Post Meta Edited for Child Theme

By: rachelbaker on Jul 19th, 2012  |  syntax: PHP  |  size: 1.10 KB  |  views: 564  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. // Because there is no conditional here, this function will override the function of the same name in the parent theme's functions.php file. //
  2. /**
  3.  * Updated July 19, 2012 to remove pubdate meta
  4.  * Prints HTML with meta information for the current post-date/time and author.
  5.  * Create your own twentyeleven_posted_on to override in a child theme
  6.  *
  7.  * @since Twenty Eleven 1.0
  8.  */
  9. function twentyeleven_posted_on() {
  10.         printf( __( '<span class="sep">Posted on </span><a href="%1$s" title="%2$s" rel="bookmark"><time class="entry-date" datetime="%3$s">%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' ),
  11.                 esc_url( get_permalink() ),
  12.                 esc_attr( get_the_time() ),
  13.                 esc_attr( get_the_date( 'c' ) ),
  14.                 esc_html( get_the_date() ),
  15.                 esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),
  16.                 esc_attr( sprintf( __( 'View all posts by %s', 'twentyeleven' ), get_the_author() ) ),
  17.                 get_the_author()
  18.         );
  19. }
  20. // no endif needed because the conditional was removed //
clone this paste RAW Paste Data