OSDN Git Service

added man-src page for scaffold _s, tidied up formatting.
authorBrandon Lavigne <B@Brandons-Mac-Pro-4.local>
Tue, 5 Feb 2013 22:17:35 +0000 (14:17 -0800)
committerBrandon Lavigne <B@Brandons-Mac-Pro-4.local>
Tue, 5 Feb 2013 22:17:35 +0000 (14:17 -0800)
man-src/scaffold-_s.txt [new file with mode: 0644]
php/commands/scaffold.php

diff --git a/man-src/scaffold-_s.txt b/man-src/scaffold-_s.txt
new file mode 100644 (file)
index 0000000..82c57a8
--- /dev/null
@@ -0,0 +1,21 @@
+## OPTIONS
+
+* <slug>:
+
+       The slug for the new theme, used for prefixing functions.
+
+* `--activate`:
+
+       Activate the newly downloaded theme.
+
+* `--theme_name=<title>`:
+
+       What to put in the 'Theme Name:' header in style.css
+
+* `--author=<full name>`:
+
+       What to put in the 'Author:' header in style.css
+
+* `--author_uri=<http url>`:
+
+       What to put in the 'Author URI:' header in style.css
\ No newline at end of file
index dd8b288..4597a7c 100644 (file)
@@ -157,22 +157,14 @@ class Scaffold_Command extends WP_CLI_Command {
                $body['underscoresme_generate_submit'] = "Generate";
                $body['underscoresme_generate'] = "1";
 
-               // Request Array
-               $request = array(
-                       'method' => 'POST',
-                       'stream' => true,
-                       'body' => $body,
-                       'sslverify' => false
-               );
-
                $tmpfname = wp_tempnam($url);
                $response = wp_remote_post( $url, array( 'timeout' => $timeout, 'body' => $body, 'stream' => true, 'filename' => $tmpfname ) );
                
                unzip_file( $tmpfname, $theme_path );
-               unlink($tmpfname);
+               unlink( $tmpfname );
 
                if ( isset( $assoc_args['activate'] ) )
-               WP_CLI::run_command( array( 'theme', 'activate', $theme_slug ) );
+                       WP_CLI::run_command( array( 'theme', 'activate', $theme_slug ) );
 
        }