run:R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:51
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:51
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:51
R W Run
DIR
2026-03-11 16:18:51
R W Run
DIR
2026-03-11 16:18:51
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:51
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:51
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:51
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:51
R W Run
DIR
2026-03-11 16:18:51
R W Run
DIR
2026-03-11 16:18:51
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:51
R W Run
DIR
2026-03-11 16:18:51
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:51
R W Run
DIR
2026-03-11 16:18:51
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:51
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:51
R W Run
DIR
2026-03-11 16:18:51
R W Run
DIR
2026-03-11 16:18:51
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:51
R W Run
DIR
2026-03-11 16:18:51
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:51
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:51
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:51
R W Run
DIR
2026-03-11 16:18:51
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:51
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:51
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:51
R W Run
DIR
2026-03-11 16:18:51
R W Run
DIR
2026-03-11 16:18:51
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:51
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:51
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:51
R W Run
DIR
2026-03-11 16:18:51
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:51
R W Run
DIR
2026-03-11 16:18:51
R W Run
2.35 KB
2026-03-11 16:18:52
R W Run
1.12 KB
2026-03-11 16:18:52
R W Run
4.31 KB
2026-03-11 16:18:52
R W Run
5.61 KB
2026-03-11 16:18:51
R W Run
4.09 KB
2026-03-11 16:18:52
R W Run
213.43 KB
2026-03-11 16:18:51
R W Run
1.71 KB
2026-03-11 16:18:51
R W Run
5.93 KB
2026-03-11 16:18:51
R W Run
4.54 KB
2026-03-11 16:18:52
R W Run
2.08 KB
2026-03-11 16:18:52
R W Run
2.4 KB
2026-03-11 16:18:52
R W Run
1.82 KB
2026-03-11 16:18:52
R W Run
1.67 KB
2026-03-11 16:18:52
R W Run
2.03 KB
2026-03-11 16:18:51
R W Run
4.39 KB
2026-03-11 16:18:52
R W Run
1.88 KB
2026-03-11 16:18:51
R W Run
1.59 KB
2026-03-11 16:18:51
R W Run
1.75 KB
2026-03-11 16:18:51
R W Run
1.23 KB
2026-03-11 16:18:52
R W Run
2.71 KB
2026-03-11 16:18:51
R W Run
6.63 KB
2026-03-11 16:18:52
R W Run
3.1 KB
2026-03-11 16:18:52
R W Run
1.83 KB
2026-03-11 16:18:52
R W Run
3.68 KB
2026-03-11 16:18:51
R W Run
6.29 KB
2026-03-11 16:18:52
R W Run
1.27 KB
2026-03-11 16:18:52
R W Run
5.31 KB
2026-03-11 16:18:52
R W Run
13.5 KB
2026-03-11 16:18:52
R W Run
4.99 KB
2026-03-11 16:18:52
R W Run
4.91 KB
2026-03-11 16:18:52
R W Run
8.53 KB
2026-03-11 16:18:51
R W Run
3.92 KB
2026-03-11 16:18:51
R W Run
1.24 KB
2026-03-11 16:18:51
R W Run
1.63 KB
2026-03-11 16:18:51
R W Run
4.28 KB
2026-03-11 16:18:51
R W Run
13.63 KB
2026-03-11 16:18:51
R W Run
9.74 KB
2026-03-11 16:18:52
R W Run
48.39 KB
2026-03-11 16:18:52
R W Run
361 By
2026-03-11 16:18:52
R W Run
13.29 KB
2026-03-11 16:18:51
R W Run
1.75 KB
2026-03-11 16:18:52
R W Run
1.49 KB
2026-03-11 16:18:51
R W Run
1.91 KB
2026-03-11 16:18:52
R W Run
2.67 KB
2026-03-11 16:18:51
R W Run
1.25 KB
2026-03-11 16:18:52
R W Run
2.74 KB
2026-03-11 16:18:52
R W Run
2.18 KB
2026-03-11 16:18:52
R W Run
2.29 KB
2026-03-11 16:18:52
R W Run
3.55 KB
2026-03-11 16:18:51
R W Run
3.53 KB
2026-03-11 16:18:51
R W Run
9.14 KB
2026-03-11 16:18:52
R W Run
4.72 KB
2026-03-11 16:18:51
R W Run
5.61 KB
2026-03-11 16:18:52
R W Run
3.55 KB
2026-03-11 16:18:51
R W Run
6.34 KB
2026-03-11 16:18:52
R W Run
2.09 KB
2026-03-11 16:18:51
R W Run
1.8 KB
2026-03-11 16:18:52
R W Run
3.69 KB
2026-03-11 16:18:52
R W Run
4.66 KB
2026-03-11 16:18:52
R W Run
3.49 KB
2026-03-11 16:18:52
R W Run
1.15 KB
2026-03-11 16:18:51
R W Run
2.87 KB
2026-03-11 16:18:51
R W Run
2.48 KB
2026-03-11 16:18:52
R W Run
5.56 KB
2026-03-11 16:18:51
R W Run
1.79 KB
2026-03-11 16:18:52
R W Run
4.59 KB
2026-03-11 16:18:51
R W Run
558 By
2026-03-11 16:18:52
R W Run
4.5 KB
2026-03-11 16:18:52
R W Run
23.26 KB
2026-03-11 16:18:52
R W Run
735 By
2026-03-11 16:18:52
R W Run
6.19 KB
2026-03-11 16:18:51
R W Run
1.17 KB
2026-03-11 16:18:51
R W Run
1.82 KB
2026-03-11 16:18:52
R W Run
66.15 KB
2026-03-11 16:18:52
R W Run
1.55 KB
2026-03-11 16:18:51
R W Run
9.92 KB
2026-03-11 16:18:52
R W Run
1.8 KB
2026-03-11 16:18:52
R W Run
1.73 KB
2026-03-11 16:18:52
R W Run
2.02 KB
2026-03-11 16:18:52
R W Run
4.41 KB
2026-03-11 16:18:52
R W Run
2.67 KB
2026-03-11 16:18:51
R W Run
2.38 KB
2026-03-11 16:18:52
R W Run
error_log
📄image.php
1<?php
2/**
3 * Server-side rendering of the `core/image` block.
4 *
5 * @package WordPress
6 */
7
8/**
9 * Renders the `core/image` block on the server,
10 * adding a data-id attribute to the element if core/gallery has added on pre-render.
11 *
12 * @since 5.9.0
13 *
14 * @param array $attributes The block attributes.
15 * @param string $content The block content.
16 * @param WP_Block $block The block object.
17 *
18 * @return string The block content with the data-id attribute added.
19 */
20function render_block_core_image( $attributes, $content, $block ) {
21 if ( false === stripos( $content, '<img' ) ) {
22 return '';
23 }
24
25 $processor = new class( $content ) extends WP_HTML_Tag_Processor {
26 /**
27 * Return input span for an empty FIGCAPTION element.
28 *
29 * Returns span of input for an empty FIGCAPTION, if currently matched on a
30 * FIGCAPTION opening tag and if the element is properly closed and empty.
31 *
32 * @since 6.9.0
33 *
34 * @return WP_HTML_Span|false Span of input if the element is empty; otherwise false.
35 */
36 public function block_core_image_extract_empty_figcaption_element() {
37 $this->set_bookmark( 'here' );
38 $opener = $this->bookmarks['here'];
39
40 // Allow comments within the definition of “empty.”
41 while ( $this->next_token() && '#comment' === $this->get_token_name() ) {
42 continue;
43 }
44
45 if ( 'FIGCAPTION' !== $this->get_tag() || ! $this->is_tag_closer() ) {
46 return false;
47 }
48
49 $this->set_bookmark( 'here' );
50 $closer = $this->bookmarks['here'];
51
52 return new WP_HTML_Span( $opener->start, $closer->start + $closer->length - $opener->start );
53 }
54 };
55
56 if ( ! $processor->next_tag( 'img' ) || ! $processor->get_attribute( 'src' ) ) {
57 return '';
58 }
59
60 $has_id_binding = isset( $attributes['metadata']['bindings']['id'] ) && isset( $attributes['id'] );
61
62 // Ensure the `wp-image-id` classname on the image block supports block bindings.
63 if ( $has_id_binding ) {
64 // If there's a mismatch with the 'wp-image-' class and the actual id, the id was
65 // probably overridden by block bindings. Update it to the correct value.
66 // See https://github.com/WordPress/gutenberg/issues/62886 for why this is needed.
67 $id = $attributes['id'];
68 $image_classnames = $processor->get_attribute( 'class' );
69 $class_with_binding_value = "wp-image-$id";
70 if ( is_string( $image_classnames ) && ! str_contains( $image_classnames, $class_with_binding_value ) ) {
71 $image_classnames = preg_replace( '/wp-image-(\d+)/', $class_with_binding_value, $image_classnames );
72 $processor->set_attribute( 'class', $image_classnames );
73 }
74 }
75
76 // For backwards compatibility, the data-id html attribute is only set for
77 // image blocks nested in a gallery. Detect if the image is in a gallery by
78 // checking the data-id attribute.
79 // See the `block_core_gallery_data_id_backcompatibility` function.
80 if ( isset( $attributes['data-id'] ) ) {
81 // If there's a binding for the `id`, the `id` attribute is used for the
82 // value, since `data-id` does not support block bindings.
83 // Else the `data-id` is used for backwards compatibility, since
84 // third parties may be filtering its value.
85 $data_id = $has_id_binding ? $attributes['id'] : $attributes['data-id'];
86 $processor->set_attribute( 'data-id', $data_id );
87 }
88
89 /*
90 * If the `caption` attribute is empty and we encounter a `<figcaption>` element,
91 * we take note of its span so we can remove it later.
92 */
93 if ( $processor->next_tag( 'FIGCAPTION' ) && empty( $attributes['caption'] ) ) {
94 $figcaption_span = $processor->block_core_image_extract_empty_figcaption_element();
95 }
96
97 $link_destination = isset( $attributes['linkDestination'] ) ? $attributes['linkDestination'] : 'none';
98 $lightbox_settings = block_core_image_get_lightbox_settings( $block->parsed_block );
99
100 /*
101 * If the lightbox is enabled and the image is not linked, adds the filter and
102 * the JavaScript view file.
103 */
104 if (
105 isset( $lightbox_settings ) &&
106 'none' === $link_destination &&
107 isset( $lightbox_settings['enabled'] ) &&
108 true === $lightbox_settings['enabled']
109 ) {
110 wp_enqueue_script_module( '@wordpress/block-library/image/view' );
111
112 /*
113 * This render needs to happen in a filter with priority 15 to ensure that
114 * it runs after the duotone filter and that duotone styles are applied to
115 * the image in the lightbox. Lightbox has to work with any plugins that
116 * might use filters as well. Removing this can be considered in the future
117 * if the way the blocks are rendered changes, or if a new kind of filter is
118 * introduced.
119 */
120 add_filter( 'render_block_core/image', 'block_core_image_render_lightbox', 15, 2 );
121 } else {
122 /*
123 * Remove the filter if previously added by other Image blocks.
124 */
125 remove_filter( 'render_block_core/image', 'block_core_image_render_lightbox', 15 );
126 }
127
128 $output = $processor->get_updated_html();
129 if ( ! empty( $figcaption_span ) ) {
130 return substr( $output, 0, $figcaption_span->start ) . substr( $output, $figcaption_span->start + $figcaption_span->length );
131 }
132 return $output;
133}
134
135/**
136 * Adds the lightboxEnabled flag to the block data.
137 *
138 * This is used to determine whether the lightbox should be rendered or not.
139 *
140 * @since 6.4.0
141 *
142 * @param array $block Block data.
143 *
144 * @return array|null Filtered block data.
145 */
146function block_core_image_get_lightbox_settings( $block ) {
147 // Gets the lightbox setting from the block attributes.
148 if ( isset( $block['attrs']['lightbox'] ) ) {
149 $lightbox_settings = $block['attrs']['lightbox'];
150 }
151
152 if ( ! isset( $lightbox_settings ) ) {
153 $lightbox_settings = wp_get_global_settings( array( 'lightbox' ), array( 'block_name' => 'core/image' ) );
154
155 // If not present in global settings, check the top-level global settings.
156 //
157 // NOTE: If no block-level settings are found, the previous call to
158 // `wp_get_global_settings` will return the whole `theme.json` structure in
159 // which case we can check if the "lightbox" key is present at the top-level
160 // of the global settings and use its value.
161 if ( isset( $lightbox_settings['lightbox'] ) ) {
162 $lightbox_settings = wp_get_global_settings( array( 'lightbox' ) );
163 }
164 }
165
166 return $lightbox_settings ?? null;
167}
168
169/**
170 * Adds the directives and layout needed for the lightbox behavior.
171 *
172 * @since 6.4.0
173 *
174 * @param string $block_content Rendered block content.
175 * @param array $block Block object.
176 *
177 * @return string Filtered block content.
178 */
179function block_core_image_render_lightbox( $block_content, $block ) {
180 /*
181 * If there's no IMG tag in the block then return the given block content
182 * as-is. There's nothing that this code can knowingly modify to add the
183 * lightbox behavior.
184 */
185 $processor = new WP_HTML_Tag_Processor( $block_content );
186 if ( $processor->next_tag( 'figure' ) ) {
187 $processor->set_bookmark( 'figure' );
188 }
189 if ( ! $processor->next_tag( 'img' ) ) {
190 return $block_content;
191 }
192
193 $alt = $processor->get_attribute( 'alt' );
194 $img_uploaded_src = $processor->get_attribute( 'src' );
195 $img_class_names = $processor->get_attribute( 'class' );
196 $img_styles = $processor->get_attribute( 'style' );
197 $img_width = 'none';
198 $img_height = 'none';
199 $aria_label = __( 'Enlarge' );
200 $dialog_aria_label = __( 'Enlarged image' );
201
202 if ( isset( $block['attrs']['id'] ) ) {
203 $img_uploaded_src = wp_get_attachment_url( $block['attrs']['id'] );
204 $img_metadata = wp_get_attachment_metadata( $block['attrs']['id'] );
205 $img_width = $img_metadata['width'] ?? 'none';
206 $img_height = $img_metadata['height'] ?? 'none';
207 }
208
209 // Figure.
210 $processor->seek( 'figure' );
211 $figure_class_names = $processor->get_attribute( 'class' );
212 $figure_styles = $processor->get_attribute( 'style' );
213
214 // Create unique id and set the image metadata in the state.
215 $unique_image_id = uniqid();
216
217 wp_interactivity_state(
218 'core/image',
219 array(
220 'metadata' => array(
221 $unique_image_id => array(
222 'uploadedSrc' => $img_uploaded_src,
223 'figureClassNames' => $figure_class_names,
224 'figureStyles' => $figure_styles,
225 'imgClassNames' => $img_class_names,
226 'imgStyles' => $img_styles,
227 'targetWidth' => $img_width,
228 'targetHeight' => $img_height,
229 'scaleAttr' => $block['attrs']['scale'] ?? false,
230 'ariaLabel' => $dialog_aria_label,
231 'alt' => $alt,
232 ),
233 ),
234 )
235 );
236
237 $processor->add_class( 'wp-lightbox-container' );
238 $processor->set_attribute( 'data-wp-interactive', 'core/image' );
239 $processor->set_attribute(
240 'data-wp-context',
241 wp_json_encode(
242 array(
243 'imageId' => $unique_image_id,
244 ),
245 JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_QUOT | JSON_HEX_AMP
246 )
247 );
248 $processor->set_attribute( 'data-wp-key', $unique_image_id );
249
250 // Image.
251 $processor->next_tag( 'img' );
252 $processor->set_attribute( 'data-wp-init', 'callbacks.setButtonStyles' );
253 $processor->set_attribute( 'data-wp-on--load', 'callbacks.setButtonStyles' );
254 $processor->set_attribute( 'data-wp-on-window--resize', 'callbacks.setButtonStyles' );
255 // Sets an event callback on the `img` because the `figure` element can also
256 // contain a caption, and we don't want to trigger the lightbox when the
257 // caption is clicked.
258 $processor->set_attribute( 'data-wp-on--click', 'actions.showLightbox' );
259 $processor->set_attribute( 'data-wp-class--hide', 'state.isContentHidden' );
260 $processor->set_attribute( 'data-wp-class--show', 'state.isContentVisible' );
261
262 $body_content = $processor->get_updated_html();
263
264 // Adds a button alongside image in the body content.
265 $img = null;
266 preg_match( '/<img[^>]+>/', $body_content, $img );
267
268 $button =
269 $img[0]
270 . '<button
271 class="lightbox-trigger"
272 type="button"
273 aria-haspopup="dialog"
274 aria-label="' . esc_attr( $aria_label ) . '"
275 data-wp-init="callbacks.initTriggerButton"
276 data-wp-on--click="actions.showLightbox"
277 data-wp-style--right="state.imageButtonRight"
278 data-wp-style--top="state.imageButtonTop"
279 >
280 <svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" fill="none" viewBox="0 0 12 12">
281 <path fill="#fff" d="M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z" />
282 </svg>
283 </button>';
284
285 $body_content = preg_replace( '/<img[^>]+>/', $button, $body_content );
286
287 add_action( 'wp_footer', 'block_core_image_print_lightbox_overlay' );
288
289 return $body_content;
290}
291
292/**
293 * @since 6.5.0
294 */
295function block_core_image_print_lightbox_overlay() {
296 $close_button_label = esc_attr__( 'Close' );
297
298 // If the current theme does NOT have a `theme.json`, or the colors are not
299 // defined, it needs to set the background color & close button color to some
300 // default values because it can't get them from the Global Styles.
301 $background_color = '#fff';
302 $close_button_color = '#000';
303 if ( wp_theme_has_theme_json() ) {
304 $global_styles_color = wp_get_global_styles( array( 'color' ) );
305 if ( ! empty( $global_styles_color['background'] ) ) {
306 $background_color = esc_attr( $global_styles_color['background'] );
307 }
308 if ( ! empty( $global_styles_color['text'] ) ) {
309 $close_button_color = esc_attr( $global_styles_color['text'] );
310 }
311 }
312
313 echo <<<HTML
314 <div
315 class="wp-lightbox-overlay zoom"
316 data-wp-interactive="core/image"
317 data-wp-router-region='{ "id": "core/image-overlay", "attachTo": "body" }'
318 data-wp-key="wp-lightbox-overlay"
319 data-wp-context='{}'
320 data-wp-bind--role="state.roleAttribute"
321 data-wp-bind--aria-label="state.currentImage.ariaLabel"
322 data-wp-bind--aria-modal="state.ariaModal"
323 data-wp-class--active="state.overlayEnabled"
324 data-wp-class--show-closing-animation="state.overlayOpened"
325 data-wp-watch="callbacks.setOverlayFocus"
326 data-wp-on--keydown="actions.handleKeydown"
327 data-wp-on--touchstart="actions.handleTouchStart"
328 data-wp-on--touchmove="actions.handleTouchMove"
329 data-wp-on--touchend="actions.handleTouchEnd"
330 data-wp-on--click="actions.hideLightbox"
331 data-wp-on-window--resize="callbacks.setOverlayStyles"
332 data-wp-on-window--scroll="actions.handleScroll"
333 data-wp-bind--style="state.overlayStyles"
334 tabindex="-1"
335 >
336 <button type="button" aria-label="$close_button_label" style="fill: $close_button_color" class="close-button">
337 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="20" height="20" aria-hidden="true" focusable="false"><path d="m13.06 12 6.47-6.47-1.06-1.06L12 10.94 5.53 4.47 4.47 5.53 10.94 12l-6.47 6.47 1.06 1.06L12 13.06l6.47 6.47 1.06-1.06L13.06 12Z"></path></svg>
338 </button>
339 <div class="lightbox-image-container">
340 <figure data-wp-bind--class="state.currentImage.figureClassNames" data-wp-bind--style="state.figureStyles">
341 <img data-wp-bind--alt="state.currentImage.alt" data-wp-bind--class="state.currentImage.imgClassNames" data-wp-bind--style="state.imgStyles" data-wp-bind--src="state.currentImage.currentSrc">
342 </figure>
343 </div>
344 <div class="lightbox-image-container">
345 <figure data-wp-bind--class="state.currentImage.figureClassNames" data-wp-bind--style="state.figureStyles">
346 <img data-wp-bind--alt="state.currentImage.alt" data-wp-bind--class="state.currentImage.imgClassNames" data-wp-bind--style="state.imgStyles" data-wp-bind--src="state.enlargedSrc">
347 </figure>
348 </div>
349 <div class="scrim" style="background-color: $background_color" aria-hidden="true"></div>
350 </div>
351HTML;
352}
353
354/**
355 * Registers the `core/image` block on server.
356 *
357 * @since 5.9.0
358 */
359function register_block_core_image() {
360 register_block_type_from_metadata(
361 __DIR__ . '/image',
362 array(
363 'render_callback' => 'render_block_core_image',
364 )
365 );
366}
367add_action( 'init', 'register_block_core_image' );
368