function genesis_post_author_posts_link_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_posts_link' ); $url = get_author_posts_url( get_the_author_meta( 'ID' ) ); $output = sprintf( '<span %s>', genesis_attr( 'entry-author' ) ); $output .= $atts['before']; $output .= sprintf( '<a href="%s" %s>', $url, genesis_attr( 'entry-author-link' ) ); $output .= sprintf( '<span %s>', genesis_attr( 'entry-author-name' ) ); $output .= esc_html( $author ); $output .= '</span></a>' . $atts['after'] . '</span>'; return apply_filters( 'genesis_post_author_posts_link_shortcode', $output, $atts ); }