Skip to content

Keep SVG URLs remote during export#855

Merged
scruffian merged 1 commit into
trunkfrom
codex/fix-svg-media-localization
Jun 23, 2026
Merged

Keep SVG URLs remote during export#855
scruffian merged 1 commit into
trunkfrom
codex/fix-svg-media-localization

Conversation

@MaggieCabrera

Copy link
Copy Markdown
Contributor

Summary

Updates media export so SVG URLs found in templates and patterns are left at their original URL instead of being copied into the generated theme assets. Raster images and supported video files continue to be localized as before.

This aligns the plugin with WordPress core’s handling of SVGs: themes can still include their own SVG assets, but SVG files from content/media URLs are not treated like ordinary localizable image uploads by default.

Test plan

  • npm run test:unit:php:base -- --filter 'Test_Create_Block_Theme_Media|Test_Create_Block_Theme_Zip'
  • vendor/bin/phpcs --standard=phpcs.xml.dist includes/create-theme/theme-media.php tests/test-theme-media.php tests/test-theme-zip.php

@MaggieCabrera MaggieCabrera requested a review from scruffian June 23, 2026 09:52
@MaggieCabrera MaggieCabrera self-assigned this Jun 23, 2026

@scruffian scruffian left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

One question - Is it worth detecting whether URL is a network accessible global domain rather than a local one?

@MaggieCabrera

Copy link
Copy Markdown
Contributor Author

LGTM.

One question - Is it worth detecting whether URL is a network accessible global domain rather than a local one?

I don't think it's worth the complexity, there's a lot of dev environments (docker, playground, etc) we would have to consider.

@scruffian scruffian merged commit 8a5da9b into trunk Jun 23, 2026
13 checks passed
@scruffian scruffian deleted the codex/fix-svg-media-localization branch June 23, 2026 15:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants