catchresponsive_entry_meta

Prints HTML with meta information for the current post-date/time and author.

Description

catchresponsive_entry_meta(); 

Usage

  1. if ( !function_exists( 'catchresponsive_entry_meta' ) ) { 
  2. require_once '/inc/catchresponsive-core.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = catchresponsive_entry_meta(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/inc/catchresponsive-core.php  
  1. function catchresponsive_entry_meta() { 
  2. echo '<p class="entry-meta">'; 
  3.  
  4. $time_string = '<time class="entry-date published updated" datetime="%1$s">%2$s</time>'; 
  5.  
  6. if ( get_the_time( 'U' ) !== get_the_modified_time( 'U' ) ) { 
  7. $time_string = '<time class="entry-date published" datetime="%1$s">%2$s</time><time class="updated" datetime="%3$s">%4$s</time>'; 
  8.  
  9. $time_string = sprintf( $time_string,  
  10. esc_attr( get_the_date( 'c' ) ),  
  11. esc_html( get_the_date() ),  
  12. esc_attr( get_the_modified_date( 'c' ) ),  
  13. esc_html( get_the_modified_date() ) 
  14. ); 
  15.  
  16. printf( '<span class="posted-on">%1$s<a href="%2$s" rel="bookmark">%3$s</a></span>',  
  17. sprintf( __( '<span class="screen-reader-text">Posted on</span>', 'catch-responsive' ) ),  
  18. esc_url( get_permalink() ),  
  19. $time_string 
  20. ); 
  21.  
  22. if ( is_singular() || is_multi_author() ) { 
  23. printf( '<span class="byline"><span class="author vcard">%1$s<a class="url fn n" href="%2$s">%3$s</a></span></span>',  
  24. sprintf( __( '<span class="screen-reader-text">Author</span>', 'catch-responsive' ) ),  
  25. esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),  
  26. esc_html( get_the_author() ) 
  27. ); 
  28.  
  29. if ( ! post_password_required() && ( comments_open() || '0' != get_comments_number() ) ) { 
  30. echo '<span class="comments-link">'; 
  31. comments_popup_link( esc_html__( 'Leave a comment', 'catch-responsive' ), esc_html__( '1 Comment', 'catch-responsive' ), esc_html__( '% Comments', 'catch-responsive' ) ); 
  32. echo '</span>'; 
  33.  
  34. edit_post_link( esc_html__( 'Edit', 'catch-responsive' ), '<span class="edit-link">', '</span>' ); 
  35.  
  36. echo '</p><!-- .entry-meta -->';