function genesis_post_author_shortcode( $atts ) { if ( ! post_type_supports( get_post_type(), 'author' ) ) { return ''; } $author = get_the_author(); if ( ! $author ) { return ''; } $defaults = [ 'after' => '', 'before' => '', ]; $atts = shortcode_atts( $defaults, $atts, 'post_author' ); $output = sprintf( '<span %s>', genesis_attr( 'entry-author' ) ); $output .= $atts['before']; $output .= sprintf( '<span %s>', genesis_attr( 'entry-author-name' ) ) . esc_html( $author ) . '</span>'; $output .= $atts['after']; $output .= '</span>'; return apply_filters( 'genesis_post_author_shortcode', $output, $atts ); }