# b-blocks/2.0.41/build/gif/render.php

bBlocks – Essential Gutenberg Blocks &amp; Patterns Collection, version 2.0.41. 41 lines.

- Page: https://pluginprobe.com/plugins/b-blocks/2.0.41/code/build/gif/render.php
- Raw: https://pluginprobe.com/plugins/b-blocks/2.0.41/raw/build/gif/render.php
- Modified: 2026-05-16T11:49: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/b-blocks/2.0.41/code/build/gif/render.php#L10-L20`.

```php
<?php
$prefix = 'bBlocksGif';
$id = wp_unique_id( "$prefix-" );
$planClass = BBlocks\Inc\Utils::isPro() ? 'pro' : 'free';

// Generate Styles
if( !function_exists( 'bBlocksGifStyle' ) ) {
	function bBlocksGifStyle($attributes, $id, $prefix){
		extract( $attributes );

		$mainSl = "#$id";
		$gifSl = "$mainSl .$prefix";

		$gifW = '0px' === $gifWidth || '0%' === $gifWidth || '0em' === $gifWidth ? 'auto' : $gifWidth;

		$gifCSS = "$gifSl{
			text-align: $gifAlign;
		}
		$gifSl figure{
			width: $gifW;
		}";

		return $gifCSS;
	}
}

extract( $attributes );
?>
<div
	<?php // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- get_block_wrapper_attributes() is properly escaped ?>
	<?php echo get_block_wrapper_attributes( [ 'class' => $planClass ] ); ?>
	id='<?php echo esc_attr( $id ); ?>'
>
	<style><?php echo esc_html( bBlocksGifStyle( $attributes, $id, $prefix ) ); ?></style>

	<div class='<?php echo esc_attr( $prefix ); ?>'>
		<figure>
			<?php echo !empty( $gif ) ? "<img src='". esc_url( $gif['images']['original']['url'] ?? '' ) ."' alt='". esc_attr( $gif['title'] ?? '' ) ."' />" : ''; ?>
		</figure>
	</div>
</div>
```
