Advertisement
alchymyth

wp-relative-date plugin fix Twenty Eleven

May 31st, 2012
256
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.94 KB | None | 0 0
  1. /*
  2. * 'posted ... ago' fix, Twenty Eleven, fix for http://wordpress.org/extend/plugins/wp-relative-date/
  3. */
  4. function twentyeleven_posted_on() {
  5.     printf( __( '<span class="sep">Posted '.(function_exists('get_relative_date')?'':'on').' </span><a href="%1$s" title="%2$s" rel="bookmark"><time class="entry-date" datetime="%3$s" pubdate>%4$s</time></a>'.(function_exists('get_relative_date')?' ago':'').'<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' ),
  6.         esc_url( get_permalink() ),
  7.         esc_attr( get_the_time() ),
  8.         esc_attr( get_the_date( 'c' ) ),
  9.         esc_html( (function_exists('get_relative_date')?get_relative_date():get_the_date()) ),
  10.         esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),
  11.         esc_attr( sprintf( __( 'View all posts by %s', 'twentyeleven' ), get_the_author() ) ),
  12.         get_the_author()
  13.     );
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement