-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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: Strip out site specific details #42730
Comments
Adding the dev documentation label because once this is solved this page in the theme developer handbook can be updated:Creating new themes using the Site Editor |
Maybe we can make this part of the |
I opened a PR for this in wordpress-develop: WordPress/wordpress-develop#3899 Let me know if that's not a good approach. I wasn't sure how best to do this in Gutenberg, since it's a utility function and not a part of a class, I can't overwrite it like we handle the backports and class overloading for global styles, etc. |
Just an update that based on this feedback, we should leave the queryIds in the query markup. |
@WordPress/block-themers Is this still something we want to do? Does it cause any errors?, or is it only confusing? |
As far as I know, the site-specific information contained in the blocks is at least the following. There may be more.
More site-specific information may be added to existing or new blocks in the future. Also, we have no control over the site-specific information contained in custom blocks. So, it can be hard to process all this information. If we want to implement such functionality, the Create Block Theme plugin may be a better choice. |
I'd agree with @t-hamano that this is better solved via CBT. The site specific info still makes sense for the use case of a backup of the same site. I'd say it's ok to close or if we still consider this to be interesting to do in core, make it an option |
I agree that we can close this, even if just to deprioritise it for now. Create Block Theme already handles a lot of these site-specific details as of this PR: WordPress/create-block-theme#522 (included in version 2.0.0 of the plugin). |
Thank you everyone for your feedback. Let's close this issue for now. Feel free to reopen it if you think it would be ideal to have this issue resolved in core. |
Description
The theme export process already removes theme slugs from template parts, as when templates come from files these aren't needed. Similarly we should remove other site/implementation specific details from templates on export, including:
There may be more like this that we need to remove.
Step-by-step reproduction instructions
Screenshots, screen recording, code snippet
No response
Environment info
No response
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Yes
The text was updated successfully, but these errors were encountered: