Skip to content

Commit d74870e

Browse files
committed
Add a "network" command namespace.
This allows the addition of a description to show up in the help screen. See wp-cli/wp-cli#4385
1 parent c40f0e9 commit d74870e

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

entity-command.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
WP_CLI::add_command( 'menu', 'Menu_Command' );
1515
WP_CLI::add_command( 'menu item', 'Menu_Item_Command' );
1616
WP_CLI::add_command( 'menu location', 'Menu_Location_Command' );
17+
WP_CLI::add_command( 'network', 'Network_Namespace' );
1718
WP_CLI::add_command( 'network meta', 'Network_Meta_Command', array(
1819
'before_invoke' => function () {
1920
if ( !is_multisite() ) {

src/Network_Namespace.php

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?php
2+
3+
use WP_CLI\Dispatcher\CommandNamespace;
4+
5+
/**
6+
* Perform network-wide operations.
7+
*
8+
* ## EXAMPLES
9+
*
10+
* # Get a list of super-admins
11+
* $ wp network meta get 1 site_admins
12+
* array (
13+
* 0 => 'supervisor',
14+
* )
15+
*/
16+
class Network_Namespace extends CommandNamespace {
17+
18+
}

0 commit comments

Comments
 (0)