$attributes Block attributes. * @var WP_Block $block Block instance. */ defined( 'ABSPATH' ) || exit; $planetfoss_post = isset( $block->context['postId'] ) ? get_post( (int) $block->context['postId'] ) : get_post(); $planetfoss_html = planetfoss_card_for_post( $planetfoss_post, (string) ( $attributes['topic'] ?? '' ), 'wp-block-planetfoss-topic' ); if ( '' !== $planetfoss_html ) { // The card brings its own section element; the wrapper attributes carry alignment and spacing from the editor. printf( '
%s