Allow installing Plugins/Themes into an arbitrary folder #1803
Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments. Suggestions cannot be applied while the pull request is queued to merge. Suggestion cannot be applied right now. Please check back later.
Motivation for the change, related issues
See #1802
This allows for installing a user-generated ZIP file into a specific theme/plugin path.
Implementation details
InstallAssetOptions
has a new param,targetSlug
(to match it's existingtargetPath
) which if set the ultimate install path istargetPath/targetSlug
. If the param is not set, it defaults to guessing from the ZIP filename and ZIP contents as current.InstallPluginOptions
andInstallThemeOptions
both gain the same parameter, and pass it through if set.InstallThemeOptions
was previously not actually in use, this fixes that, bringing it inline withInstallPluginOptions
.Tests are a bit of a weird mess, as the testing structure doesn't cleanup between iteration runs, and the helper methods are different between each section.
zipFiles
helper from the plugin tests should probably be a common helper instead.The tests should show the current "issue" with 6b3b5a5 failing, and the latest changeset resolving that error.
Testing Instructions (or ideally a Blueprint)
This should display a admin page with the following output: