Skip to content

Commit abded98

Browse files
Merge pull request #105 from wp-cli/use-command-namespace-description
Add a "network" command namespace.
2 parents c40f0e9 + c2be57c commit abded98

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

entity-command.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,3 +54,7 @@
5454
);
5555

5656
WP_CLI::add_command( 'user term', 'User_Term_Command' );
57+
58+
if ( class_exists( 'WP_CLI\Dispatcher\CommandNamespace' ) ) {
59+
WP_CLI::add_command( 'network', 'Network_Namespace' );
60+
}

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)