# getwid/2.0.9/includes/templates/template-parts/post-featured-background-image.php

Getwid – Gutenberg Blocks, version 2.0.9. 24 lines.

- Page: https://pluginprobe.com/plugins/getwid/2.0.9/code/includes/templates/template-parts/post-featured-background-image.php
- Raw: https://pluginprobe.com/plugins/getwid/2.0.9/raw/includes/templates/template-parts/post-featured-background-image.php
- Modified: 2022-04-26T15:06:36+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/getwid/2.0.9/code/includes/templates/template-parts/post-featured-background-image.php#L10-L20`.

```php
<?php

//extract styles & classes
extract($extra_attr);
?>

<div class="<?php echo esc_attr( $wrapper_class ); ?>" <?php if ( !empty($wrapper_style) ) { ?> style="<?php echo esc_attr($wrapper_style); ?>" <?php } ?>>
	<?php if ($attributes['linkTo'] == 'post'){ ?>
	<a href="<?php the_permalink(); ?>" class="<?php echo esc_attr( $block_name ); ?>__link">
		<?php } ?>
		<div class="<?php echo esc_attr( $block_name ); ?>__image" style="background-image: url(<?php echo esc_url(get_the_post_thumbnail_url($current_post, $imageSize))?>);"></div>
		<div class="<?php echo esc_attr($foreground_class);?>"
		<?php if ( !empty($foreground_style) ) { ?> style="<?php echo esc_attr($foreground_style);?> " <?php } ?>
	></div>
	<?php if ($attributes['linkTo'] == 'post'){ ?>
	</a>
	<?php } ?>
    <div class="<?php echo esc_attr($content_container_class);?>"
		<?php  if ( !empty($content_container_style) ) { ?> style="<?php echo esc_attr($content_container_style);?>"<?php }?>
	>
        <?php echo $content; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
    </div>
</div>

```
