Advertisement
grappler

sanitized post meta

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