wp/wp-includes/blocks/post-author.php
changeset 22 8c2e4d02f4ef
parent 21 48c4eec2b7e6
--- a/wp/wp-includes/blocks/post-author.php	Fri Sep 05 18:40:08 2025 +0200
+++ b/wp/wp-includes/blocks/post-author.php	Fri Sep 05 18:52:52 2025 +0200
@@ -26,6 +26,10 @@
 		return '';
 	}
 
+	if ( isset( $block->context['postType'] ) && ! post_type_supports( $block->context['postType'], 'author' ) ) {
+		return '';
+	}
+
 	$avatar = ! empty( $attributes['avatarSize'] ) ? get_avatar(
 		$author_id,
 		$attributes['avatarSize']