Update WP template_root for multisite subsites when applicable #848
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.
Followup to #840 and its history. Fixes https://discourse.roots.io/t/multisite-subsite-using-twentyfifteen-theme/9871/5
This PR enables Trellis deploys to update
template_root
andstylesheet_root
WP options also for multisite subsites, not just the primary site.Multisite operators that wish to disable all this (e.g., in order to avoid the processing time) may add
update_wp_theme_paths: false
somewhere in group_vars, or disable it on the fly:Re:
xargs
etc, see also https://danielbachhuber.com/tip/run-wp-cli-command-wordpress-multisite/Re:
bool
filter, it is necessary for proper interpretation of cli-e update_wp_theme_paths=false
(otherwise the var remains a string "false" interpreted as boolean true).No longer assumes that
template_root
andstylesheet_root
are within a.../web/wp/wp-content/themes
subdirectory of thereleases_directory
(although I don't know where else they'd be).