', esc_attr( trim( $classes ) ), $this->block_name, esc_attr( $styles ) );
$output .= sprintf( '
', $this->block_name );
$output .= $this->render_overlay( $attributes );
if ( ! $attributes['isRepeated'] && ! $attributes['hasParallax'] ) {
$output .= $this->render_image( $attributes, $item, $image_url );
} else {
$output .= $this->render_bg_image( $attributes, $image_url );
}
if ( isset( $aria_label ) && ! empty( $aria_label ) ) {
$p = new \WP_HTML_Tag_Processor( $content );
if ( $p->next_tag( 'a', [ 'class' => 'wp-block-button__link' ] ) ) {
$p->set_attribute( 'aria-label', $aria_label );
$content = $p->get_updated_html();
}
}
$output .= $this->render_attributes( $item, $attributes );
$output .= sprintf( '
%s
', $this->block_name, $content );
$output .= '