Skip to content

Commit ca76af1

Browse files
committed
Warn multiple themes installation with activate
1 parent fbd4222 commit ca76af1

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/Theme_Command.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -488,6 +488,9 @@ protected function filter_item_list( $items, $args ) {
488488
* $ wp theme install http://s3.amazonaws.com/bucketname/my-theme.zip?AWSAccessKeyId=123&Expires=456&Signature=abcdef
489489
*/
490490
public function install( $args, $assoc_args ) {
491+
if ( count( $args ) > 1 && Utils\get_flag_value( $assoc_args, 'activate', false ) ) {
492+
WP_CLI::warning( 'Only a single theme can be active.' );
493+
}
491494

492495
$theme_root = get_theme_root();
493496
if ( $theme_root && ! is_dir( $theme_root ) ) {

0 commit comments

Comments
 (0)