OSDN Git Service

added success message if remote request code is 200
authorBrandon Lavigne <B@Brandons-Mac-Pro-4.local>
Wed, 6 Feb 2013 17:51:21 +0000 (09:51 -0800)
committerBrandon Lavigne <B@Brandons-Mac-Pro-4.local>
Wed, 6 Feb 2013 17:51:21 +0000 (09:51 -0800)
php/commands/scaffold.php

index baf9e8b..662fede 100644 (file)
@@ -163,6 +163,9 @@ class Scaffold_Command extends WP_CLI_Command {
                $tmpfname = wp_tempnam($url);
                $response = wp_remote_post( $url, array( 'timeout' => $timeout, 'body' => $body, 'stream' => true, 'filename' => $tmpfname ) );
                
+               if ( $response['response']['code'] == 200 )
+                       WP_CLI::success( "Created theme '".$data['theme_name']."'." );
+
                unzip_file( $tmpfname, $theme_path );
                unlink( $tmpfname );