default content block that uses core inner blocks
This commit is contained in:
@@ -1,15 +1,18 @@
|
||||
@php($image = wp_get_attachment_image_src(@$id, 'medium'))
|
||||
@php($image = wp_get_attachment_image_src(@$id, @$size))
|
||||
|
||||
<img
|
||||
@if(@$lazy)
|
||||
src="{{ wp_get_attachment_image_src($id, 'lazy')[0] }}"
|
||||
data-src="{{ $image[0] }}"
|
||||
class="lazy"
|
||||
@else
|
||||
src="{{ $image[0] }}"
|
||||
@endif
|
||||
@if($image)
|
||||
<img
|
||||
@if(@$lazy && !is_admin())
|
||||
src="{{ wp_get_attachment_image_src($id, 'lazy')[0] }}"
|
||||
data-src="{{ @$image[0] }}"
|
||||
class="lazy {{ @$class }}"
|
||||
@else
|
||||
src="{{ $image[0] }}"
|
||||
class="{{ @$class }}"
|
||||
@endif
|
||||
|
||||
alt="{{ get_post_meta( $id, '_wp_attachment_image_alt', true ) }}"
|
||||
width="{{ $image[1] }}"
|
||||
height="{{ $image[2] }}"
|
||||
/>
|
||||
alt="{{ get_post_meta( $id, '_wp_attachment_image_alt', true ) }}"
|
||||
width="{{ $image[1] }}"
|
||||
height="{{ $image[2] }}"
|
||||
/>
|
||||
@endif
|
||||
|
||||
Reference in New Issue
Block a user