'; + echo LR\Filters::escapeHtmlText(the_title()) /* line 8 */; + echo '
++ '; + echo LR\Filters::escapeHtmlText(the_content()) /* line 10 */; + echo ' + +'; + + } + echo '
diff --git a/gutenberg/blocks/hero/example.jpg b/gutenberg/blocks/hero/example.jpg
index 9b9e76f..3c20114 100644
Binary files a/gutenberg/blocks/hero/example.jpg and b/gutenberg/blocks/hero/example.jpg differ
diff --git a/gutenberg/blocks/image/view.latte b/gutenberg/blocks/image/view.latte
index 8d1a68e..dbb5b86 100644
--- a/gutenberg/blocks/image/view.latte
+++ b/gutenberg/blocks/image/view.latte
@@ -1,16 +1,20 @@
-{if $link['url']}
-
-{/if}
+{if !empty($image['src'])}
-
+ {if $link['url']}
+
+ {/if}
+
+
+
+ {if $link['url']}
+
+ {/if}
-{if $link['url']}
-
{/if}
\ No newline at end of file
diff --git a/php-inc/enqueue-block-specific-css-and-js.php b/php-inc/enqueue-block-specific-css-and-js.php
index 56cb053..43a8cef 100644
--- a/php-inc/enqueue-block-specific-css-and-js.php
+++ b/php-inc/enqueue-block-specific-css-and-js.php
@@ -25,10 +25,12 @@ function tr_enqueue_block_specific_css_and_js() {
function tr_parse_blocks($blocks, $block_prefix, &$tr_custom_blocks_names) {
foreach ($blocks as $block) {
- if (str_starts_with($block['blockName'], "$block_prefix/")) {
+ $block_name = $block['blockName'];
+
+ if (!is_null($block_name) && str_starts_with($block_name, "$block_prefix/")) {
- if (!in_array($block['blockName'], $tr_custom_blocks_names)) {
- $tr_custom_blocks_names[] = $block['blockName'];
+ if (!in_array($block_name, $tr_custom_blocks_names)) {
+ $tr_custom_blocks_names[] = $block_name;
// if nested blocks, parse them as well
if (!empty($block['innerBlocks'])) {
diff --git a/php-inc/theme-functions.php b/php-inc/theme-functions.php
index a124db8..9cf6258 100644
--- a/php-inc/theme-functions.php
+++ b/php-inc/theme-functions.php
@@ -61,7 +61,7 @@ function tr_get_media(
$path_only = false
) {
- if ($media === NULL) {
+ if ($media === NULL || (is_array($media) && empty($media['src']))) {
return false;
}
diff --git a/views/temp/blocks-image-view.latte--3c6059f16b.php b/views/temp/blocks-image-view.latte--3c6059f16b.php
new file mode 100644
index 0000000..133b140
--- /dev/null
+++ b/views/temp/blocks-image-view.latte--3c6059f16b.php
@@ -0,0 +1,45 @@
+
+';
+ }
+ echo '
+
+
+';
+ if ($link['url']) /* line 16 */ {
+ echo '
+';
+ }
+ echo "\n";
+ }
+ }
+}
diff --git a/views/temp/blocks-image-view.latte--3c6059f16b.php.lock b/views/temp/blocks-image-view.latte--3c6059f16b.php.lock
new file mode 100644
index 0000000..e69de29
diff --git a/views/temp/blocks-video-view.latte--b1ed077162.php b/views/temp/blocks-video-view.latte--b1ed077162.php
new file mode 100644
index 0000000..5fb8a8f
--- /dev/null
+++ b/views/temp/blocks-video-view.latte--b1ed077162.php
@@ -0,0 +1,71 @@
+
+';
+ $this->createTemplate(tr_part('video'), ['video_src' => $video_src, 'video_type' => tr_get_video_type_and_id($video_src)] + $this->params, 'include')->renderToContentType('html') /* line 19 */;
+ echo "\n";
+ ob_start(fn() => '');
+ try {
+ echo '