PluginProbe
Getwid – Gutenberg Blocks / 2.0.9
Getwid – Gutenberg Blocks v2.0.9
3.0.2 3.0.1 3.0.0 2.1.0 2.1.1 2.1.2 2.1.3 2.2.0 trunk 1.8.7 1.9.1 2.0.10 2.0.11 2.0.12 2.0.13 2.0.14 2.0.5 2.0.6 2.0.7 2.0.8 2.0.9
getwid / includes / templates / template-parts / post-featured-background-image.php

post-featured-background-image.php in Getwid – Gutenberg Blocks 2.0.9, at includes/templates/template-parts/post-featured-background-image.php

24 lines 1.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 //extract styles & classes
4 extract($extra_attr);
5 ?>
6
7 <div class="<?php echo esc_attr( $wrapper_class ); ?>" <?php if ( !empty($wrapper_style) ) { ?> style="<?php echo esc_attr($wrapper_style); ?>" <?php } ?>>
8 <?php if ($attributes['linkTo'] == 'post'){ ?>
9 <a href="<?php the_permalink(); ?>" class="<?php echo esc_attr( $block_name ); ?>__link">
10 <?php } ?>
11 <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>
12 <div class="<?php echo esc_attr($foreground_class);?>"
13 <?php if ( !empty($foreground_style) ) { ?> style="<?php echo esc_attr($foreground_style);?> " <?php } ?>
14 ></div>
15 <?php if ($attributes['linkTo'] == 'post'){ ?>
16 </a>
17 <?php } ?>
18 <div class="<?php echo esc_attr($content_container_class);?>"
19 <?php if ( !empty($content_container_style) ) { ?> style="<?php echo esc_attr($content_container_style);?>"<?php }?>
20 >
21 <?php echo $content; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
22 </div>
23 </div>
24