Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion blocks/build/theme-image/index.asset.php
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<?php return array('dependencies' => array('wp-block-editor', 'wp-blocks', 'wp-components', 'wp-element', 'wp-i18n'), 'version' => 'f97d82e990dc108628c4');
<?php return array('dependencies' => array('wp-block-editor', 'wp-blocks', 'wp-components', 'wp-element', 'wp-i18n'), 'version' => 'a1b0f3dc503e13a66111');
2 changes: 1 addition & 1 deletion blocks/build/theme-image/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions blocks/src/theme-image/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ function Edit({ attributes, setAttributes }) {
}

// Build content based on image type and link settings
// Structure matches server-side: <div><a?><svg|img></a?></div>
// Structure matches server-side: <figure><a?><svg|img></a?></figure>
let content;
if (!imageUrl) {
content = (
Expand All @@ -181,7 +181,7 @@ function Edit({ attributes, setAttributes }) {
);
} else if (inlineSVG && processedSvg) {
// For inline SVG, apply dangerouslySetInnerHTML to link or wrapper
// to match server-side structure without extra div wrapper
// to match server-side structure without extra figure wrapper
if (linkUrl) {
content = (
<a
Expand All @@ -192,7 +192,7 @@ function Edit({ attributes, setAttributes }) {
/>
);
} else {
// Will be applied to wrapper div via blockProps below
// Will be applied to wrapper figure via blockProps below
content = null;
}
} else {
Expand Down Expand Up @@ -390,7 +390,7 @@ function Edit({ attributes, setAttributes }) {
</PanelBody>
</InspectorControls>

<div {...wrapperProps}>{content}</div>
<figure {...wrapperProps}>{content}</figure>
</>
);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Block.php
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ public static function render( $attributes, $content ): string {
$wrapper_attrs = array( 'class' => implode( ' ', $wrapper_classes ) );

return sprintf(
'<div %s>%s</div>',
'<figure %s>%s</figure>',
get_block_wrapper_attributes( $wrapper_attrs ),
$content
);
Expand Down