Conversation
This change reverts part of 60dd9c8 causing issues with upload paths, and ensures that the 'options_to_clone' argument is correctly used.
|
|
||
| // Not using rewriting, and using a newer version of WordPress than 3.7. | ||
| if ( empty( $use_files_rewriting ) && version_compare( $wp_version, '3.7', '>' ) ) { | ||
| if ( empty( $use_files_rewriting ) && version_compare( $wp_version, '3.7', '<' ) ) { |
There was a problem hiding this comment.
@JJJ The new logic is "Not using rewriting, and using an older version of WordPress than 3.7." This results in a new network using blogs.dir since upload_path and upload_url_path are empty.
There was a problem hiding this comment.
Reverted the revert 😅
@JJJ 🆒 That still leaves the /sites/*/sites/* conundrum and what to do about it. PR as it stands still produces:
As I said, for new multi-network installs it seems sensible not to append $ms_dir but for existing sites that have that schema? I'm not sure.
There was a problem hiding this comment.
Pull request overview
This PR attempts to fix issues with upload paths and ensure the options_to_clone argument is correctly used when creating networks via WP-CLI. The changes modify the create method in the WP_MS_Network_Command class to handle network cloning parameters.
Key changes:
- Fixes indentation for the
$clone_networkassignment - Adds logic to default
clone_networkto the current site when not specified - Refactors the network existence validation by extracting the
get_network()call to a variable
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.


This change reverts part of 60dd9c8 causing issues with upload paths, and ensures that the 'options_to_clone' argument is correctly used.
Fixes #153