OSDN Git Service

WP_Theme was introduced in WP 3.4, but switch_theme() still requires two
authorscribu <mail@scribu.net>
Sun, 10 Mar 2013 22:11:02 +0000 (00:11 +0200)
committerscribu <mail@scribu.net>
Sun, 10 Mar 2013 22:11:02 +0000 (00:11 +0200)
parameters until WP 3.5

php/commands/theme.php

index 4f5a8de..70d8dad 100644 (file)
@@ -53,7 +53,7 @@ class Theme_Command extends \WP_CLI\CommandWithUpgrade {
        public function activate( $args = array() ) {
                $theme = $this->parse_name( $args );
 
-               switch_theme( $theme->get_stylesheet() );
+               switch_theme( $theme->get_template(), $theme->get_stylesheet() );
 
                $name = $theme->get('Name');