This repository has been archived by the owner on Sep 6, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #283 from Automattic/add/switch_users
Add option for user switching plugin and add other default users
- Loading branch information
Showing
2 changed files
with
28 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -102,6 +102,22 @@ function ( $s ) use ( $cmd ) { | |
); | ||
} | ||
|
||
/** | ||
* Adds other users. | ||
*/ | ||
function add_other_users() { | ||
$cmd = 'wp user create editor [email protected] --role=editor' | ||
. ' && wp user create author [email protected] --role=author' | ||
. ' && wp user create contributor [email protected] --role=contributor' | ||
. ' %% wp user create subscriber [email protected] --role=subscriber'; | ||
add_filter( | ||
'jurassic_ninja_feature_command', | ||
function ( $s ) use ( $cmd ) { | ||
return "$s && $cmd"; | ||
} | ||
); | ||
} | ||
|
||
/** | ||
* Just loops through a filtered array of files inside the features directory and requires them | ||
*/ | ||
|
@@ -247,6 +263,9 @@ function launch_wordpress( $php_version = 'default', $requested_features = array | |
debug( '%s: Stopping pings to Ping-O-Mattic', $app->domain ); | ||
stop_pingomatic(); | ||
|
||
debug( '%s: Adding additional users', $app->domain ); | ||
add_other_users(); | ||
|
||
debug( '%s: Adding Companion Plugin for Auto Login', $app->domain ); | ||
add_auto_login( $app->password, $app->username ); | ||
|
||
|