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

Commits on May 20, 2024

  1. This initial commit:

    - removes requirement for a `source` property in theme.json as the assumption is that, for now, all paths are paths to image files, whether absolute or relative
    - checks for existence of "host" in URL and then tries to resolve background image url using get_theme_file_uri
    - Adds a new public method  WP_Theme_JSON_Gutenberg::resolve_theme_file_uris to allow theme devs to optionally resolve relative paths in theme.json to a theme.
    ramonjd committed May 20, 2024
    Configuration menu
    Copy the full SHA
    514e7b9 View commit details
    Browse the repository at this point in the history
  2. For testing purposes, resolve in get_merged_data - should it be optio…

    …nal? That is, done in the global themes controller and wherever a stylesheet is generated?
    ramonjd committed May 20, 2024
    Configuration menu
    Copy the full SHA
    fa9e75f View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    2ba6cfd View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    17048c3 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    88aac46 View commit details
    Browse the repository at this point in the history
  6. Working on revisions

    Backend resolution of theme file URIs for global styles revisions
    
    Ensuring links are preserved when updating global styles.
    ramonjd committed May 20, 2024
    Configuration menu
    Copy the full SHA
    4137b37 View commit details
    Browse the repository at this point in the history
  7. So my linter is working again

    ramonjd committed May 20, 2024
    Configuration menu
    Copy the full SHA
    57cd28c View commit details
    Browse the repository at this point in the history
  8. Changed the relative link to wp:theme-file-uris

    Always adding path to the link object so that it can dynamically resolved.
    ramonjd committed May 20, 2024
    Configuration menu
    Copy the full SHA
    06c2bb0 View commit details
    Browse the repository at this point in the history
  9. Added some explanatory TODOs

    ramonjd committed May 20, 2024
    Configuration menu
    Copy the full SHA
    3e283e0 View commit details
    Browse the repository at this point in the history
  10. Adding valid link attributes to the _link object.

    Updated tests
    ramonjd committed May 20, 2024
    Configuration menu
    Copy the full SHA
    1752858 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    98de1c6 View commit details
    Browse the repository at this point in the history
  12. Switching to using file: prefix, which is an established theme.json c…

    …onvention for relative paths to theme assets. E.g., web fonts
    
    Adding test image to empty theme
    Added theme JSON schema update
    
    Unit tests for JS helper
    
    Using response methods to add links to response collection
    ramonjd committed May 20, 2024
    Configuration menu
    Copy the full SHA
    70c26ba View commit details
    Browse the repository at this point in the history
  13. Fix linting

    andrewserong authored and ramonjd committed May 20, 2024
    Configuration menu
    Copy the full SHA
    b94a512 View commit details
    Browse the repository at this point in the history
  14. Remove TODO

    ramonjd committed May 20, 2024
    Configuration menu
    Copy the full SHA
    efae7f2 View commit details
    Browse the repository at this point in the history
  15. Update tests

    ramonjd committed May 20, 2024
    Configuration menu
    Copy the full SHA
    eb4ab0f View commit details
    Browse the repository at this point in the history
  16. dump var_dump

    ramonjd committed May 20, 2024
    Configuration menu
    Copy the full SHA
    b0fb937 View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    7c083bc View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    17d51bd View commit details
    Browse the repository at this point in the history
  19. Configuration menu
    Copy the full SHA
    60c8bb1 View commit details
    Browse the repository at this point in the history
  20. Abstracting getting any resolved URI to separate hook

    Updating comments
    ramonjd committed May 20, 2024
    Configuration menu
    Copy the full SHA
    dd07557 View commit details
    Browse the repository at this point in the history
  21. Configuration menu
    Copy the full SHA
    26866fc View commit details
    Browse the repository at this point in the history
  22. Configuration menu
    Copy the full SHA
    f01dcdf View commit details
    Browse the repository at this point in the history
  23. Configuration menu
    Copy the full SHA
    25f8754 View commit details
    Browse the repository at this point in the history
  24. Bad revert

    ramonjd committed May 20, 2024
    Configuration menu
    Copy the full SHA
    7fecf34 View commit details
    Browse the repository at this point in the history
  25. Rename wp:theme-file-uris to wp:theme-file

    Rename utils file
    ramonjd committed May 20, 2024
    Configuration menu
    Copy the full SHA
    5d3ba0b View commit details
    Browse the repository at this point in the history