Theme Export: Use the theme name for the zip file#39471
Conversation
|
Size Change: +87 B (0%) Total Size: 1.21 MB
ℹ️ View Unchanged
|
|
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! |
MaggieCabrera
left a comment
There was a problem hiding this comment.
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