Skip to content

Media: Use unique placeholders during export - #861

Open
MaggieCabrera wants to merge 1 commit into
trunkfrom
codex/media-unique-export-placeholders
Open

Media: Use unique placeholders during export#861
MaggieCabrera wants to merge 1 commit into
trunkfrom
codex/media-unique-export-placeholders

Conversation

@MaggieCabrera

Copy link
Copy Markdown
Contributor

Summary

Use unique temporary placeholders when localizing media URLs during theme export.

This keeps placeholder-like text and block metadata unchanged while preserving normal media localization.

Test plan

  • vendor/bin/phpunit -c phpunit.xml.dist --verbose --filter Test_Create_Block_Theme_Media
  • vendor/bin/phpcs --standard=phpcs.xml.dist includes/create-theme/theme-media.php tests/test-theme-media.php
  • Confirmed placeholder-like content remains unchanged and localized media still uses the theme asset URL.

@MaggieCabrera MaggieCabrera self-assigned this Aug 20, 2026
@MaggieCabrera
MaggieCabrera requested a balanced review from Copilot August 20, 2026 15:05

Copilot AI 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.

Pull request overview

Introduces collision-resistant media placeholders during theme export, preserving placeholder-like template content.

Changes:

  • Generate UUID-based placeholders and verify they do not exist in source content.
  • Add regression coverage for block metadata, text, and media localization.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
includes/create-theme/theme-media.php Generates unique, collision-checked export placeholders.
tests/test-theme-media.php Tests preservation of placeholder-like content.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

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