Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Background image: add support for relative theme path URLs in top-level theme.json styles #61271

Merged
merged 25 commits into from
May 20, 2024
Merged
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
514e7b9
This initial commit:
ramonjd May 1, 2024
fa9e75f
For testing purposes, resolve in get_merged_data - should it be optio…
ramonjd May 1, 2024
2ba6cfd
Rollback test of imperative method in resolver
ramonjd May 1, 2024
17048c3
Moves resolution of file paths back to theme_json resolver
ramonjd May 7, 2024
88aac46
Backend resolution of theme file URIs for global styles.
ramonjd May 8, 2024
4137b37
Working on revisions
ramonjd May 9, 2024
57cd28c
So my linter is working again
ramonjd May 10, 2024
06c2bb0
Changed the relative link to `wp:theme-file-uris`
ramonjd May 13, 2024
3e283e0
Added some explanatory TODOs
ramonjd May 13, 2024
1752858
Adding valid link attributes to the _link object.
ramonjd May 14, 2024
98de1c6
Added some unit tests for utils
ramonjd May 14, 2024
70c26ba
Switching to using file: prefix, which is an established theme.json c…
ramonjd May 16, 2024
b94a512
Fix linting
andrewserong May 18, 2024
efae7f2
Remove TODO
ramonjd May 18, 2024
eb4ab0f
Update tests
ramonjd May 18, 2024
b0fb937
dump var_dump
ramonjd May 18, 2024
7c083bc
Check for $theme_json before resolving
ramonjd May 18, 2024
17d51bd
be explicit about the background value file:./
ramonjd May 18, 2024
60c8bb1
Remove unnecessary empty check
ramonjd May 18, 2024
dd07557
Abstracting getting any resolved URI to separate hook
ramonjd May 18, 2024
26866fc
Update lib/class-wp-theme-json-resolver-gutenberg.php
noisysocks May 18, 2024
f01dcdf
Update lib/class-wp-theme-json-resolver-gutenberg.php
noisysocks May 18, 2024
25f8754
Revert useGlobalStyle changes - no longer required given the new hook
ramonjd May 19, 2024
7fecf34
Bad revert
ramonjd May 19, 2024
5d3ba0b
Rename wp:theme-file-uris to wp:theme-file
ramonjd May 20, 2024
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
Prev Previous commit
Next Next commit
Added some unit tests for utils
  • Loading branch information
ramonjd committed May 20, 2024
commit 98de1c6d6e553a4acb197d65bb5758e6937ed0b5
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ export function getResolvedThemeFilePath( file, themeFileURIs = [] ) {
( themeFileUri ) => themeFileUri.name === file
);

if ( ! uri?.href ) {
return file;
}

return uri?.href;
}

Expand Down