I’d like to simplify the installation and default settings of my theme, by creating a plugin that installs it (versus the traditional “Appearance > Install Themes” routine. Once installed, I want to be able to delete the plugin from the site, so there will be no dependencies on it after activation.
Is this possible?
I would include the theme.zip file inside the plugin.zip file so that it could easily be transferred up and over to the themes directory.
If possible, any examples of this would be helpful. Thanks in advance for your help.
Why not set the default settings from within the theme? You can use the ‘swith_theme’ action.
To answer your question: yes, it’s possible, but it requires that the user’s setup allows moving files, which can lead to more headaches than covenience.
Yes it is:
https://wordpress.stackexchange.com/a/302650/29133
Add to the
your-plugin.php
file: