Advertisement
grappler

post meta updated

Apr 16th, 2013
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.12 KB | None | 0 0
  1. /**
  2.  * This function prints post meta data.
  3.  *
  4.  * Ulrich Pogson Contribution
  5.  *
  6.  */
  7. if (!function_exists('responsive_post_meta_data')) :
  8.  
  9. function responsive_post_meta_data() {
  10.     $time_string = ( get_the_time( 'U' ) == get_the_modified_time( 'U' ) )
  11.     ? '<span class="timestamp updated" datetime="%3$s">%4$s</span>'
  12.     : '<span class="timestamp updated" datetime="%5$s">%6$s</span>';
  13.  
  14.     printf( __( '<span class="%1$s">Posted on </span>%2$s<span class="%3$s"> by </span>%4$s', 'responsive' ),
  15.     'meta-prep meta-prep-author posted',
  16.     sprintf( '<a href="%1$s" title="%2$s" rel="bookmark">' . $time_string . '</a>',
  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_attr( get_the_modified_date( 'c' ) ),
  22.         esc_html( get_the_modified_date() )
  23.     ),
  24.     'byline',
  25.     sprintf( '<span class="author vcard"><a class="url fn n" href="%1$s" title="%2$s">%3$s</a></span>',
  26.         get_author_posts_url( get_the_author_meta( 'ID' ) ),
  27.         sprintf( esc_attr__( 'View all posts by %s', 'responsive' ), get_the_author() ),
  28.         esc_attr( get_the_author() )
  29.         )
  30.     );
  31. }
  32. endif;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement