Skip to content
This repository has been archived by the owner. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #147 from jmr06005/master
Adding support for multiple authors
  • Loading branch information
jmr06005 committed Dec 23, 2016
2 parents e204877 + 1aeae32 commit ea39fc4
Showing 1 changed file with 21 additions and 11 deletions.
32 changes: 21 additions & 11 deletions inc/template-tags.php
Expand Up @@ -75,17 +75,27 @@ function cs_posted_on() {
esc_attr( get_the_modified_date( 'c' ) ),
esc_html( get_the_modified_date() )
);

printf( __( '<span class="posted-on">Posted on %1$s</span><span class="byline"> by %2$s</span>', 'cs' ),
sprintf( '<a href="%1$s" rel="bookmark">%2$s</a>',
esc_url( get_permalink() ),
$time_string
),
sprintf( '<span class="author vcard"><a class="url fn n" href="%1$s">%2$s</a></span>',
esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),
esc_html( get_the_author() )
)
);

if ( function_exists( 'coauthors_posts_links' ) ) :
printf( __( '<span class="posted-on">Posted on %1$s</span><span class="byline"> by %2$s</span>', 'cs' ),
sprintf( '<a href="%1$s" rel="bookmark">%2$s</a>',
esc_url( get_permalink() ),
$time_string
),
coauthors_posts_links( null, null, null, null, false )
);
else:
printf( __( '<span class="posted-on">Posted on %1$s</span><span class="byline"> by %2$s</span>', 'cs' ),
sprintf( '<a href="%1$s" rel="bookmark">%2$s</a>',
esc_url( get_permalink() ),
$time_string
),
sprintf( '<span class="author vcard"><a class="url fn n" href="%1$s">%2$s</a></span>',
esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),
esc_html( get_the_author() )
)
);
endif;
}
endif;

Expand Down

0 comments on commit ea39fc4

Please sign in to comment.