Changeset 59775 for trunk/src/wp-includes/blocks/image.php
- Timestamp:
- 02/07/2025 03:44:07 PM (13 months ago)
- File:
-
- 1 edited
-
trunk/src/wp-includes/blocks/image.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/blocks/image.php
r59230 r59775 150 150 } 151 151 152 $alt = $p->get_attribute( 'alt' ); 153 $img_uploaded_src = $p->get_attribute( 'src' ); 154 $img_class_names = $p->get_attribute( 'class' ); 155 $img_styles = $p->get_attribute( 'style' ); 156 $img_width = 'none'; 157 $img_height = 'none'; 158 $aria_label = __( 'Enlarge image' ); 159 160 if ( $alt ) { 161 /* translators: %s: Image alt text. */ 162 $aria_label = sprintf( __( 'Enlarge image: %s' ), $alt ); 163 } 152 $alt = $p->get_attribute( 'alt' ); 153 $img_uploaded_src = $p->get_attribute( 'src' ); 154 $img_class_names = $p->get_attribute( 'class' ); 155 $img_styles = $p->get_attribute( 'style' ); 156 $img_width = 'none'; 157 $img_height = 'none'; 158 $aria_label = __( 'Enlarge' ); 159 $dialog_aria_label = __( 'Enlarged image' ); 164 160 165 161 if ( isset( $block['attrs']['id'] ) ) { … … 191 187 'targetHeight' => $img_height, 192 188 'scaleAttr' => $block['attrs']['scale'] ?? false, 193 'ariaLabel' => $ aria_label,189 'ariaLabel' => $dialog_aria_label, 194 190 'alt' => $alt, 195 191 ), … … 291 287 data-wp-on-async-window--resize="callbacks.setOverlayStyles" 292 288 data-wp-on-async-window--scroll="actions.handleScroll" 289 data-wp-bind--style="state.overlayStyles" 293 290 tabindex="-1" 294 291 > … … 307 304 </div> 308 305 <div class="scrim" style="background-color: $background_color" aria-hidden="true"></div> 309 <style data-wp-text="state.overlayStyles"></style>310 306 </div> 311 307 HTML;
Note: See TracChangeset
for help on using the changeset viewer.