Advertisement
grappler

functions meta

Sep 23rd, 2012
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.86 KB | None | 0 0
  1. if ( ! function_exists( 'theme_post_meta_data' ) ) :
  2. /**
  3.  * This function prints post meta data.
  4.  *
  5.  * Adopted from Twenty Eleven
  6.  */
  7. function thme_post_meta_data() {
  8.     printf( __( '%1$sPosted on %2$s by %3$s', 'theme' ),
  9.         esc_attr( '<span class="posted">'),
  10.         sprintf( '</span><a href="%1$s" title="%2$s" rel="bookmark"><span class="timestamp" "%3$s">%4$s</span></a><span class="byline">',          
  11.             esc_url( get_permalink() ),
  12.             esc_attr( get_the_time() ),
  13.             esc_attr( get_the_date( 'c' ) ),
  14.             esc_attr( get_the_date() ),
  15.         ),
  16.         esc_attr( sprintf('<span class="author vcard"><a class="url fn n" href="%1$s" title="%2$s" rel="author">%3$s</a></span></span>' ,
  17.             esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),
  18.             esc_attr( sprintf( __( 'View all posts by %s', 'theme' ), get_the_author() ) ),
  19.             get_the_author() , ),
  20.         ),
  21.     );
  22. }
  23. endif;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement