Created
August 29, 2018 21:36
-
-
Save Pross/148705bd83d472a85b71784da72493a4 to your computer and use it in GitHub Desktop.
This file contains 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
<?php // added for syntax highlighting. | |
add_shortcode( 'coauthors', 'coauthors_func' ); | |
function coauthors_func( $atts ) { | |
$atts = shortcode_atts( array( | |
'between' => null, | |
'betweenLast' => null, | |
'before' => null, | |
'after' => null, | |
), $atts, 'coauthors' ); | |
return coauthors__echo('display_name', 'field', array( | |
'between' => $atts['between'], | |
'betweenLast' => $atts['betweenLast'], | |
'before' => $atts['before'], | |
'after' => $atts['after'], | |
), null, false ); | |
} | |
add_shortcode( 'coauthors_posts_links', 'coauthors_posts_links_func' ); | |
function coauthors_posts_links_func( $atts ) { | |
$atts = shortcode_atts( array( | |
'between' => null, | |
'betweenLast' => null, | |
'before' => null, | |
'after' => null, | |
), $atts, 'coauthors' ); | |
return coauthors__echo('coauthors_posts_links_single', 'callback', array( | |
'between' => $atts['between'], | |
'betweenLast' => $atts['betweenLast'], | |
'before' => $atts['before'], | |
'after' => $atts['after'], | |
), null, false ); | |
} | |
add_shortcode( 'coauthors_links', 'coauthors_links_func' ); | |
function coauthors_links_func( $atts ) { | |
$atts = shortcode_atts( array( | |
'between' => null, | |
'betweenLast' => null, | |
'before' => null, | |
'after' => null, | |
), $atts, 'coauthors' ); | |
return coauthors__echo('coauthors_links_single', 'callback', array( | |
'between' => $atts['between'], | |
'betweenLast' => $atts['betweenLast'], | |
'before' => $atts['before'], | |
'after' => $atts['after'], | |
), null, false ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment