wp/wp-includes/blocks/post-author-name.php
changeset 22 8c2e4d02f4ef
parent 21 48c4eec2b7e6
equal deleted inserted replaced
21:48c4eec2b7e6 22:8c2e4d02f4ef
    21 	} else {
    21 	} else {
    22 		$author_id = get_query_var( 'author' );
    22 		$author_id = get_query_var( 'author' );
    23 	}
    23 	}
    24 
    24 
    25 	if ( empty( $author_id ) ) {
    25 	if ( empty( $author_id ) ) {
       
    26 		return '';
       
    27 	}
       
    28 
       
    29 	if ( isset( $block->context['postType'] ) && ! post_type_supports( $block->context['postType'], 'author' ) ) {
    26 		return '';
    30 		return '';
    27 	}
    31 	}
    28 
    32 
    29 	$author_name = get_the_author_meta( 'display_name', $author_id );
    33 	$author_name = get_the_author_meta( 'display_name', $author_id );
    30 	if ( isset( $attributes['isLink'] ) && $attributes['isLink'] ) {
    34 	if ( isset( $attributes['isLink'] ) && $attributes['isLink'] ) {