Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function amplify_posted_on() {
- $time_string = '<time class="entry-date published updated" datetime="%1$s">%2$s</time>';
- if ( get_the_time( 'U' ) !== get_the_modified_time( 'U' ) ) {
- $time_string = '<time class="entry-date published" datetime="%1$s">%2$s</time><time class="updated" datetime="%3$s">%4$s</time>';
- }
- $time_string = sprintf( $time_string,
- esc_attr( get_the_date( 'c' ) ),
- esc_html( get_the_date() ),
- esc_attr( get_the_modified_date( 'c' ) ),
- esc_html( get_the_modified_date() )
- );
- $posted_on = sprintf(
- '<i class="fa fa-calendar"></i> %s',
- '<a href="' . esc_url( get_permalink() ) . '" rel="bookmark">' . $time_string . '</a>'
- );
- $byline = sprintf(
- '<i class="fa fa-user"></i> %s',
- '<span class="author vcard"><a class="url fn n" href="' . esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ) . '">' . esc_html( get_the_author_meta('display_name', 1) ) . '</a></span>'
- );
- echo '<span class="posted-on">' . $posted_on . '</span><span class="byline"> ' . $byline . '</span>';
- if ( ! is_single() && ! post_password_required() && ( comments_open() || get_comments_number() ) ) {
- echo '<span class="comments-link">';
- comments_popup_link( __( 'Leave a comment', 'amplify' ), __( '1 Comment', 'amplify' ), __( '% Comments', 'amplify' ) );
- echo '</span>';
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement