diff --git a/admin-command.php b/admin-command.php index 25eac29..b96329b 100644 --- a/admin-command.php +++ b/admin-command.php @@ -7,7 +7,7 @@ /** * Open /wp-admin/ in a browser. */ -$wp_admin = function() { +function wp_cli_admin_command() { switch ( strtoupper( substr( PHP_OS, 0, 3 ) ) ) { case 'DAR': $exec = 'open'; @@ -19,5 +19,5 @@ $exec = 'xdg-open'; } passthru( $exec . ' ' . escapeshellarg( admin_url() ) ); -}; -WP_CLI::add_command( 'admin', $wp_admin ); +} +WP_CLI::add_command( 'admin', 'wp_cli_admin_command' );