-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Open
Labels
[Feature] ThemesQuestions or issues with incorporating or styling blocks in a theme.Questions or issues with incorporating or styling blocks in a theme.[Type] EnhancementA suggestion for improvement.A suggestion for improvement.
Description
Part of:
What problem does this address?
Since #61271, themes can define relative paths to background images in theme.json files.
The same functionality does not yet exist for other theme assets, namely:
- template/template parts
- patterns
For these assets, theme authors should be able to add relative paths to background images, for example, in Group block attributes.
This impacts the portability of themes.
What is your proposed solution?
Parse block attributes and replace the relative URIs with absolute URIs using get_theme_file_uri.
Where this is done — on the frontend or clientside — is to be decided.
#61401 is a working example that runs clientside, but it will be worth investigating whether backend pre-processing is viable pursuant to #61271.
Related
- Add/background image theme source #61401 (Experimental, prior attempt)
smachiandrewserong and annezazu
Metadata
Metadata
Assignees
Labels
[Feature] ThemesQuestions or issues with incorporating or styling blocks in a theme.Questions or issues with incorporating or styling blocks in a theme.[Type] EnhancementA suggestion for improvement.A suggestion for improvement.