-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Theme Export: Use the theme name for the zip file #39471
Conversation
Size Change: +87 B (0%) Total Size: 1.21 MB
ℹ️ View Unchanged
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The naming appears to be working correctly, but I got some strange results when I tried to export Archeo:
Using https://localwp.com/ |
I am using Local, PHP version 7.4.1, WordPress 5.9.2. |
@MaggieCabrera @jffng thanks for the review. This happens when your theme is loaded in a symlink. I have pushed a commit to fix that... |
wow, looks like a specific edge case then. If it won't break for other people then thank you so much for investigating this! |
I think it's probably quite a common use case, but regardless it shouldn't happen anymore! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is looking great! I'm approving this since the PR does what it says, but I'm going to highlight what I've encountered while exporting Archeo with some color changes in GS so you can consider them in a follow-up:
The templates that had CSS variables when exporting turn into:
<!-- wp:post-featured-image {"align":"wide","style":{"spacing":{"margin":{"bottom":"var(\u002d\u002dwp\u002d\u002dcustom\u002d\u002dspacing\u002d\u002dsmall, 1.25rem)"}}}} /-->
The theme.json file is missing this from the original theme:
- The schema:
"$schema": "https://schemas.wp.org/trunk/theme.json",
"appearanceTools": true,
inside settings
f79db45
to
62c03ff
Compare
Thanks @MaggieCabrera I created issues for these here: |
76dfc3f
to
ba0436b
Compare
ba0436b
to
2cd9c7b
Compare
* Theme Export: Use the theme name for the zip file * reformat * don't use the real path * fix linting * update test
What?
Use the name of the theme in the zip file for the export.
Why?
This makes it easier to add the theme to your WordPress install
How?
We pass the theme name from the REST endpoint to the JS in the headers.
Testing Instructions