Advertisement
Guest User

confit-template tags-author

a guest
Mar 30th, 2014
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.30 KB | None | 0 0
  1. if ( ! function_exists( 'confit_posted_on' ) ) :
  2. /**
  3.  * Prints HTML with meta information for the current post-date/time and author.
  4.  *
  5.  * @since Confit 1.0
  6.  */
  7. function confit_posted_on() {
  8.     if ( is_sticky() && ! is_single() ) :
  9.         printf( __( '<a href="%1$s" title="Featured" rel="bookmark">Featured</a><span class="byline"> | Posted by <span class="author vcard"><a class="url fn n" href="%2$s" title="%3$s" rel="author">%4$s</a></span></span>', 'confit' ),
  10.             esc_url( get_permalink() ),
  11.             esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),
  12.             esc_attr( sprintf( __( 'View all posts by %s', 'confit' ), get_the_author() ) ),
  13.             esc_html( get_the_author() )
  14.         );
  15.     else :
  16.         printf( __( 'Posted on <a href="%1$s" title="%2$s" rel="bookmark"><time class="entry-date" datetime="%3$s" pubdate>%4$s</time></a><span class="byline"> by <span class="author vcard"><a class="url fn n" href="%5$s" title="%6$s" rel="author">%7$s</a></span></span>', 'confit' ),
  17.             esc_url( get_permalink() ),
  18.             esc_attr( get_the_time() ),
  19.             esc_attr( get_the_date( 'c' ) ),
  20.             esc_html( get_the_date() ),
  21.             esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),
  22.             esc_attr( sprintf( __( 'View all posts by %s', 'confit' ), get_the_author() ) ),
  23.             esc_html( get_the_author() )
  24.         );
  25.     endif;
  26. }
  27. endif;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement