/**
 * Outputs a post's author.
 *
 * @since  2.0.0
 * @access public
 * @param  array   $args
 * @return void
 */
function hybrid_post_author($args = array())
{
    echo hybrid_get_post_author($args);
}
Ejemplo n.º 2
0
/**
 * This is simply a wrapper function for hybrid_get_post_author which adds a few
 * filters to make the function a bit more flexible. This will allow us to avoid
 * passing args into the function by default in our templates. Instead, we can
 * filter the defaults globally which gives us a cleaner template file.
 *
 * @since  1.1.0
 * @access public
 * @param  $args array
 * @return string
 */
function flagship_get_entry_author($args = array())
{
    $defaults = apply_filters('flagship_entry_author_defaults', array('text' => '%s', 'before' => '', 'after' => '', 'wrap' => '<span %s>%s</span>'));
    $args = wp_parse_args($args, $defaults);
    return apply_filters('flagship_entry_author', hybrid_get_post_author($args), $args);
}