Guest User

Untitled

a guest
May 25th, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.33 KB | None | 0 0
  1. if ( ! function_exists( 'heatmapthemead_posted_on' ) ) :
  2.  
  3. // Prints HTML with meta information for the current post-date/time and author.
  4.  
  5. function heatmapthemead_posted_on() {
  6.  
  7. $options = heatmapthemead_get_theme_options();
  8.  
  9. print '<div class="heatmapthemead-header-entry-meta entry-meta">';
  10.  
  11. if (( $options['meta_date'] == 'on' ) || ( $options['meta_author'] == 'on' )) {
  12. print '<span class="heatmapthemead-post-details">';
  13. _e ('Posted','heatmapthemead');
  14. }
  15.  
  16. if ( $options['meta_date'] == 'on' ) {
  17. print ' ';
  18. _e ('on','heatmapthemead');
  19. print ' ';
  20. print '<a href="'. esc_url( get_permalink() ) . '" title="' . esc_attr( get_the_time() ) . '" rel="bookmark">';
  21. print '<time class="entry-date updated" datetime="' . esc_attr( get_the_date( 'c' ) ) . '">' . esc_html( get_the_date() ) . '</time>';
  22. print '</a>';
  23. }
  24.  
  25. if ( $options['meta_author'] == 'on' ) {
  26. print '<span class="byline">';
  27. print ' ';
  28. _e ('by','heatmapthemead');
  29. print ' ';
  30. print '<span class="author vcard">';
  31. print '<a class="url fn n" href="' . esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ) . '" title="' . esc_attr( sprintf( __( 'View all posts by %s', 'heatmapthemead' ), get_the_author() ) ) . '" rel="author">' . esc_html( get_the_author() ) . '</a>';
  32. print '</span>';
  33. print '</span>';
  34. }
  35.  
  36. if (( $options['meta_date'] == 'on' ) || ( $options['meta_author'] == 'on' )) print '</span>';
  37.  
  38. if ( $options['meta_comments'] == 'on' ) {
  39. if ( comments_open() || ( '0' != get_comments_number() && ! comments_open() ) ) : ?>
  40. <span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'heatmapthemead' ), __( '1 Comment', 'heatmapthemead' ), __( '% Comments', 'heatmapthemead' ) ); ?></span>
  41. <?php
  42. endif;
  43. }
  44. ?>
  45. </div><!-- .heatmapthemead-entry-meta -->
  46. <?php
  47. }
  48. endif;
Add Comment
Please, Sign In to add comment