Created
November 12, 2012 20:47
-
-
Save billerickson/4061770 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Post Authors Post Link Shortcode | |
* | |
* @author Bill Erickson | |
* @link http://www.billerickson.net/wordpress-post-multiple-authors/ | |
* | |
* @param array $atts | |
* @return string $authors | |
*/ | |
function be_post_authors_post_link_shortcode( $atts ) { | |
$atts = shortcode_atts( array( | |
'between' => null, | |
'between_last' => null, | |
'before' => null, | |
'after' => null | |
), $atts ); | |
$authors = function_exists( 'coauthors_posts_links' ) ? coauthors_posts_links( $atts['between'], $atts['between_last'], $atts['before'], $atts['after'], false ) : $atts['before'] . get_author_posts_url() . $atts['after']; | |
return $authors; | |
} | |
add_shortcode( 'post_authors_post_link', 'be_post_authors_post_link_shortcode' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment