Skip to content

Commit a2e8e7d

Browse files
committed
merge release-0.11 branch into master
2 parents 1a98b5b + 33c7d48 commit a2e8e7d

File tree

123 files changed

+1014
-804
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

123 files changed

+1014
-804
lines changed

Phakefile.php

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -34,54 +34,52 @@ function generate_synopsis( $command, $path = '' ) {
3434
}
3535
}
3636

37-
generate_synopsis( invoke_wp_cli( 'wp --cmd-dump', $app ) );
37+
generate_synopsis( invoke_wp_cli( 'wp cli cmd-dump', $app ) );
3838
});
3939

40-
function gen_cmd_pages( $wp_cli_path, $cmd, $parent = array() ) {
40+
function gen_cmd_pages( $cmd, $parent = array() ) {
4141
$parent[] = $cmd['name'];
4242

4343
$binding = $cmd;
4444
$binding['synopsis'] = implode( ' ', $parent );
4545
$binding['path'] = implode( '/', $parent );
4646
$binding['has-subcommands'] = isset( $cmd['subcommands'] ) ? array(true) : false;
4747

48-
$docs_path = $wp_cli_path . '/man-src/' . implode( '-', $parent ) . '.txt';
49-
if ( is_readable( $docs_path ) ) {
50-
$docs = file_get_contents( $docs_path );
48+
if ( $cmd['longdesc'] ) {
49+
$docs = $cmd['longdesc'];
5150
$docs = preg_replace( '/^## /m', '### ', $docs );
52-
$docs = preg_replace( '/\n\* `(.+)`([^\n]*):\n\n/', "\n\t\\1\\2\n\t\t", $docs );
5351
$binding['docs'] = $docs;
5452
}
5553

5654
$path = __DIR__ . "/commands/" . $binding['path'];
57-
mkdir( $path );
55+
if ( !is_dir( $path ) ) {
56+
mkdir( $path );
57+
}
5858
file_put_contents( "$path/index.md", render( 'subcmd-list.mustache', $binding ) );
5959

6060
if ( !isset( $cmd['subcommands'] ) )
6161
return;
6262

6363
foreach ( $cmd['subcommands'] as $subcmd ) {
64-
gen_cmd_pages( $wp_cli_path, $subcmd, $parent );
64+
gen_cmd_pages( $subcmd, $parent );
6565
}
6666
}
6767

6868
desc( 'Update the /commands/ page.' );
6969
task( 'cmd-list', function( $app ) {
70-
$wp = invoke_wp_cli( 'wp --cmd-dump', $app );
70+
$wp = invoke_wp_cli( 'wp cli cmd-dump', $app );
7171

7272
// generate main page
7373
file_put_contents( '_includes/cmd-list.html', render( 'cmd-list.mustache', $wp ) );
7474

75-
system( sprintf( 'rm -rf %s/commands/*/', escapeshellarg( __DIR__ ) ) );
76-
7775
foreach ( $wp['subcommands'] as $cmd ) {
78-
gen_cmd_pages( $app['path'], $cmd );
76+
gen_cmd_pages( $cmd );
7977
}
8078
});
8179

8280
desc( 'Update the /config/ page.' );
8381
task( 'param-list', function( $app ) {
84-
$config_spec = invoke_wp_cli( 'wp --param-dump', $app );
82+
$config_spec = invoke_wp_cli( 'wp cli param-dump', $app );
8583

8684
$out = '';
8785

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
3. Build:
88

99
```bash
10-
vendor/bin/phake path=/path/to/wp-cli-dir
10+
vendor/bin/phake
1111
```
1212

1313
### Preview locally

_config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
safe: true
22
lsi: false
33
pygments: true
4-
markdown: redcarpet
4+
markdown: kramdown
55
url: http://wp-cli.org
66
permalink: /blog/:title.html
77
paginate: 10

_includes/cmd-list.html

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
<tr>
2-
<td><a href="/commands/blog/">blog</a></td>
3-
<td>Manage blogs in a multisite install.</td>
4-
</tr>
51
<tr>
62
<td><a href="/commands/cache/">cache</a></td>
73
<td>Manage the object cache.</td>
@@ -10,6 +6,10 @@
106
<td><a href="/commands/cap/">cap</a></td>
117
<td>Manage user capabilities.</td>
128
</tr>
9+
<tr>
10+
<td><a href="/commands/cli/">cli</a></td>
11+
<td>Get information about WP-CLI itself.</td>
12+
</tr>
1313
<tr>
1414
<td><a href="/commands/comment/">comment</a></td>
1515
<td>Manage comments.</td>
@@ -36,15 +36,23 @@
3636
</tr>
3737
<tr>
3838
<td><a href="/commands/help/">help</a></td>
39-
<td>Get help on a certain topic.</td>
39+
<td>Get help on a certain command.</td>
40+
</tr>
41+
<tr>
42+
<td><a href="/commands/import/">import</a></td>
43+
<td>Import content from a WXR file.</td>
4044
</tr>
4145
<tr>
4246
<td><a href="/commands/media/">media</a></td>
43-
<td>Control the media library and its attachments.</td>
47+
<td>Manage attachments.</td>
48+
</tr>
49+
<tr>
50+
<td><a href="/commands/network-meta/">network-meta</a></td>
51+
<td>Manage network custom fields.</td>
4452
</tr>
4553
<tr>
4654
<td><a href="/commands/option/">option</a></td>
47-
<td>Manage WordPress options.</td>
55+
<td>Manage options.</td>
4856
</tr>
4957
<tr>
5058
<td><a href="/commands/plugin/">plugin</a></td>
@@ -78,6 +86,10 @@
7886
<td><a href="/commands/shell/">shell</a></td>
7987
<td>Interactive PHP console.</td>
8088
</tr>
89+
<tr>
90+
<td><a href="/commands/site/">site</a></td>
91+
<td>Perform site-wide operations.</td>
92+
</tr>
8193
<tr>
8294
<td><a href="/commands/term/">term</a></td>
8395
<td>Manage terms.</td>
@@ -88,7 +100,7 @@
88100
</tr>
89101
<tr>
90102
<td><a href="/commands/transient/">transient</a></td>
91-
<td>Manage WordPress transients.</td>
103+
<td>Manage transients.</td>
92104
</tr>
93105
<tr>
94106
<td><a href="/commands/user/">user</a></td>

_includes/param-list.html

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@
2525
<tr>
2626
<td><code>require: &lt;path&gt;</code></td>
2727
<td><code>--require=&lt;path&gt;</code></td>
28-
<td><code>null</code></td>
29-
<td>Load given PHP file before running the command</td>
28+
<td><code>[]</code></td>
29+
<td>Load PHP file before running the command (may be used more than once)</td>
3030
</tr>
3131
<tr>
3232
<td><code>disabled_commands: &lt;list&gt;</code></td>
@@ -52,3 +52,9 @@
5252
<td><code>false</code></td>
5353
<td>Suppress informational messages</td>
5454
</tr>
55+
<tr>
56+
<td><code>apache_modules: &lt;list&gt;</code></td>
57+
<td><code></code></td>
58+
<td><code>[]</code></td>
59+
<td>List of Apache Modules that are to be reported as loaded</td>
60+
</tr>

_posts/2013-03-16-editing-posts.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ A few years ago, I came across a very interesting project by Joseph Scott, calle
77

88
With [WP-CLI](/) 0.9.0-beta, you can do the same thing:
99

10-
```bash
10+
~~~bash
1111
wp post edit 123
12-
```
12+
~~~
1313

1414
Once you run that command, your `$EDITOR` will open up, pre-filled with the content of the post with ID 123. After you've made your changes and quit the editor, WP-CLI will update the post in the database.
1515

_posts/2013-03-29-scaffolding-custom-post-types-and-taxonomies.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,57 +11,57 @@ Now you can do this with WP-CLI, using the `wp scaffold` command.
1111

1212
The following command generates the code for registering the post type and also for customizing the update messages:
1313

14-
```bash
14+
~~~bash
1515
wp scaffold post-type zombie
16-
```
16+
~~~
1717

1818
### Scaffold a taxonomy
1919

2020
The following command generates the code for registering the taxonomy to the zombie post type:
2121

22-
```bash
22+
~~~bash
2323
wp scaffold taxonomy zombie-speed --post-type=zombie
24-
```
24+
~~~
2525

2626
### But I only want the registration of the post-type...
2727

2828
Then you can add the `--raw` flag:
2929

30-
```bash
30+
~~~bash
3131
wp scaffold post-type zombie --raw
32-
```
32+
~~~
3333

3434
This will only output the code that will `register_post_type()` without the `init` action and the update messages.
3535

3636
### But where does the code go?
3737

3838
This is a personal preference. Some ship it within a theme, while others will save it within a plugin. That's why we have these two flags:
3939

40-
```bash
40+
~~~bash
4141
wp scaffold post-type zombie --theme
42-
```
42+
~~~
4343

4444
`--theme` stores the generated code within your current active theme under a `/post-types` directory and names a file name `zombie.php`
4545

46-
```bash
46+
~~~bash
4747
wp scaffold post-type zombie --plugin=pluginname
48-
```
48+
~~~
4949

5050
`--plugin=plugin-dir-name` stores the generated code within the given plugin name.
5151

5252
By default, the code will be output to your terminal (STDOUT) so you could write it to your file of choice:
5353

54-
```bash
54+
~~~bash
5555
wp scaffold post-type zombie > ~/project/foo/bar.php
56-
```
56+
~~~
5757

5858
### And what about I18n?
5959

6060
Internationalization by gettext can be achieved through the `--textdomain` parameter:
6161

62-
```bash
62+
~~~bash
6363
wp scaffold post-type zombie --textdomain=my-textdomain
64-
```
64+
~~~
6565

6666
By default when using the `--theme`, the textdomain will be that of your active theme, and if
6767
using the `--plugin` flag, the textdomain will be your plugin name.

_templates/subcmd-list.mustache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ title: 'wp {{synopsis}}'
55

66
`wp {{synopsis}}` - {{description}}
77

8-
{{{docs}}}
8+
{{docs}}
99

1010
{{#has-subcommands}}
1111
### SUBCOMMANDS

assets/css/stylesheet.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@ h1, h2, h3, h4, h5, h6 {
142142
dt {
143143
font-style: italic;
144144
font-weight: bold;
145+
margin-top: 20px;
145146
}
146147

147148
ul li {

commands/blog/create/index.md

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,4 @@
22
layout: default
33
title: 'wp blog create'
44
---
5-
6-
`wp blog create` - Create a blog in a multisite install.
7-
8-
### OPTIONS
9-
10-
--slug=<slug>
11-
Path for the new blog. Subdomain on subdomain installs, directory on subdirectory installs.
12-
13-
--title=<title&gt;
14-
Title of the new blog. Default: prettified slug.
15-
16-
--email=<email>
17-
Email for Admin user. User will be created if none exists. Assignement to Super Admin if not included.
18-
19-
--site_id=<site-id>
20-
Site (network) to associate new blog with. Defaults to current site (typically 1).
21-
22-
--private
23-
If set, the new blog will be non-public (not indexed)
24-
25-
--porcelain
26-
If set, only the blog id will be output on success.
27-
28-
5+
The `wp blog create` command has been renamed to [wp site create](/commands/site/create) in WP-CLI 0.11.

0 commit comments

Comments
 (0)