Skip to content

Instantly share code, notes, and snippets.

@Pross Pross/functions.php
Created Aug 29, 2018

Embed
What would you like to do?
<?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
You can’t perform that action at this time.