wp/wp-includes/blocks/post-author.php
changeset 22 8c2e4d02f4ef
parent 21 48c4eec2b7e6
equal deleted inserted replaced
21:48c4eec2b7e6 22:8c2e4d02f4ef
    21 	} else {
    21 	} else {
    22 		$author_id = get_post_field( 'post_author', $block->context['postId'] );
    22 		$author_id = get_post_field( 'post_author', $block->context['postId'] );
    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 	$avatar = ! empty( $attributes['avatarSize'] ) ? get_avatar(
    33 	$avatar = ! empty( $attributes['avatarSize'] ) ? get_avatar(
    30 		$author_id,
    34 		$author_id,