Skip to content

Commit c2be57c

Browse files
committed
Only use a command namespace if that functionality has already been implemented.
1 parent d74870e commit c2be57c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

entity-command.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
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' );
1817
WP_CLI::add_command( 'network meta', 'Network_Meta_Command', array(
1918
'before_invoke' => function () {
2019
if ( !is_multisite() ) {
@@ -55,3 +54,7 @@
5554
);
5655

5756
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+
}

0 commit comments

Comments
 (0)