Guest User

Untitled

a guest
Dec 14th, 2018
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.08 KB | None | 0 0
  1. if ( $author == 'no' && $date == 'no' ) {
  2. return;
  3. }
  4.  
  5. $post_author = the_author_posts_link();
  6. // add compatibility when used in header before loop
  7. if ( empty( $post_author ) ) {
  8. global $post;
  9. $post_author = get_the_author_meta( 'display_name', $post->post_author );
  10. }
  11. $u_modified_time = get_the_modified_time(ā€˜Uā€™);
  12. $post_date = date_i18n( get_option( 'date_format' ), strtotime( get_the_date('r') ) );
  13. $u_time = get_the_time('U');
  14. $u_modified_time = get_the_modified_time('U');
  15. $updated_date = get_the_modified_time('F jS, Y');
  16.  
  17. echo '<div class="post-byline">';
  18. if ($u_modified_time >= $u_time + 120) {
  19. // translators: %1$s = the author who published the post. %2$s = the date it was modified
  20. printf( esc_html_x( 'By %1$s | Last Updated on %3$s', 'This blog post was published by some author on some date ', 'mission-news' ), esc_html( $post_author ), esc_html( $post_date ), esc_html( $updated_date )) ;}
  21. echo '</div>';
  22. }
  23.  
  24. <div class="post-byline">
  25. <a href="localhost/root/author" title="Posts by author" rel="author">Author</a>
  26. By | Last Updated on December 13th, 2018
  27. </div>
Add Comment
Please, Sign In to add comment