if ( isset( $attributes['displayPostDate'
] ) &&
$attributes['displayPostDate'
] ) { $list_items_markup .=
sprintf( '<time datetime="%1$s" class="wp-block-latest-posts__post-date">%2$s</time>',
esc_attr( get_the_date( 'c',
$post ) ),
get_the_date( '',
$post ) );
} if ( isset( $attributes['displayPostContent'
] ) &&
$attributes['displayPostContent'
] &&
isset( $attributes['displayPostContentRadio'
] ) && 'excerpt' ===
$attributes['displayPostContentRadio'
] ) { $trimmed_excerpt =
get_the_excerpt( $post );
if ( post_password_required( $post ) ) { $trimmed_excerpt =
__( 'This content is password protected.'
);
} $list_items_markup .=
sprintf( '<div class="wp-block-latest-posts__post-excerpt">%1$s</div>',
$trimmed_excerpt );
}