| @@ -170,15 +170,15 @@ | ||
| 170 | 170 | * Adds the directives and layout needed for the lightbox behavior. |
| 171 | 171 | * |
| 172 | 172 | * @since 6.4.0 |
| 173 | 173 | * |
| 174 | - * @param string $block_content Rendered block content. | |
| 175 | - * @param array $block Block object. | |
| 176 | - * @param array $block_instance Block instance. | |
| 174 | + * @param string $block_content Rendered block content. | |
| 175 | + * @param array $block Block object. | |
| 176 | + * @param WP_Block $block_instance Block instance. | |
| 177 | 177 | * |
| 178 | 178 | * @return string Filtered block content. |
| 179 | 179 | */ |
| 180 | -function gutenberg_block_core_image_render_lightbox( $block_content, $block, $block_instance ) { | |
| 180 | +function gutenberg_block_core_image_render_lightbox( $block_content, array $block, WP_Block $block_instance ) { | |
| 181 | 181 | /* |
| 182 | 182 | * If there's no IMG tag in the block then return the given block content |
| 183 | 183 | * as-is. There's nothing that this code can knowingly modify to add the |
| 184 | 184 | * lightbox behavior. |
| @@ -249,9 +249,9 @@ | ||
| 249 | 249 | 'alt' => $alt, |
| 250 | 250 | 'galleryId' => $block_instance->context['galleryId'] ?? null, |
| 251 | 251 | 'customAriaLabel' => $custom_aria_label ?? null, |
| 252 | 252 | 'navigationButtonType' => $block_instance->context['navigationButtonType'] ?? 'icon', |
| 253 | - 'triggerButtonAriaLabel' => null, | |
| 253 | + 'triggerButtonAriaLabel' => __( 'Enlarge' ), | |
| 254 | 254 | ), |
| 255 | 255 | ), |
| 256 | 256 | ) |
| 257 | 257 | ); |
| @@ -334,9 +334,9 @@ | ||
| 334 | 334 | // default values because it can't get them from the Global Styles. |
| 335 | 335 | $background_color = '#fff'; |
| 336 | 336 | $close_button_color = '#000'; |
| 337 | 337 | if ( wp_theme_has_theme_json() ) { |
| 338 | - $global_styles_color = wp_get_global_styles( array( 'color' ) ); | |
| 338 | + $global_styles_color = gutenberg_get_global_styles( array( 'color' ) ); | |
| 339 | 339 | if ( ! empty( $global_styles_color['background'] ) ) { |
| 340 | 340 | $background_color = esc_attr( $global_styles_color['background'] ); |
| 341 | 341 | } |
| 342 | 342 | if ( ! empty( $global_styles_color['text'] ) ) { |
| @@ -388,9 +388,8 @@ | ||
| 388 | 388 | data-wp-bind--alt="state.selectedImage.alt" |
| 389 | 389 | data-wp-bind--class="state.selectedImage.imgClassNames" |
| 390 | 390 | data-wp-bind--style="state.imgStyles" |
| 391 | 391 | data-wp-bind--src="state.enlargedSrc" |
| 392 | - data-wp-bind--srcset="state.enlargedSrcset" | |
| 393 | 392 | data-wp-bind--srcset="state.enlargedSrcset" |
| 394 | 393 | sizes="100vw" |
| 395 | 394 | > |
| 396 | 395 | </figure> |