-
Notifications
You must be signed in to change notification settings - Fork 56
Use --skip-config to avoid addition of multisite constants to wp-config.php file. #18
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
Conversation
--skip-config will avoid addition of multisite constants to wp-config.php file.
|
Fixes #11 |
schlessera
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks good, but it needs a functional test.
src/Core_Command.php
Outdated
| $wp_config_path = Utils\locate_wp_config(); | ||
| if ( is_writable( $wp_config_path ) && self::modify_wp_config( $ms_config ) ) { | ||
| if ( true === \WP_CLI\Utils\get_flag_value( $assoc_args, 'skip-config' ) ) { | ||
| WP_CLI::log( "Addition of multisite constants to 'wp-config.php' skipped. You need to add them manually:" . PHP_EOL ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo: The message should end with a period (.), not a colon (:).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or, we could include the constants similar to below You need to add them manually:" . PHP_EOL . $ms_config
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@danielbachhuber I think it'll be a good idea to let the user have a copy of the multisite constants, this way they can use it later if they change their mind? What do you say?
CC: @schlessera
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it'll be a good idea to let the user have a copy of the multisite constants, this was they can use it later if they change their mind?
I agree, let's continue to print the constants.
|
@Sidsector9 Thanks for the pull request! |
|
@schlessera I'll be working on the functional tests soon. |
|
@schlessera Functional test added. |
danielbachhuber
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
|
$ wp core multisite-install --title="Welcome to the WordPress" \
|
--skip-config will avoid addition of multisite constants to wp-config.php file.