Skip to content

Instantly share code, notes, and snippets.

@Pross
Created August 29, 2018 21:36
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Pross/148705bd83d472a85b71784da72493a4 to your computer and use it in GitHub Desktop.
Save Pross/148705bd83d472a85b71784da72493a4 to your computer and use it in GitHub Desktop.
<?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