mirror of
https://hk.gh-proxy.com/https://github.com/wp-cli/profile-command.git
synced 2025-08-18 06:11:20 +08:00
Add autoloader
This commit is contained in:
parent
1d77fb1a7e
commit
f76e2809de
2 changed files with 16 additions and 1 deletions
|
@ -39,8 +39,11 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"": "src/"
|
||||||
|
},
|
||||||
"files": [
|
"files": [
|
||||||
"command.php"
|
"profile-command.php"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"minimum-stability": "dev",
|
"minimum-stability": "dev",
|
||||||
|
|
12
profile-command.php
Normal file
12
profile-command.php
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
if ( ! class_exists( 'WP_CLI' ) ) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
$wpcli_profile_autoloader = dirname( __FILE__ ) . '/vendor/autoload.php';
|
||||||
|
if ( file_exists( $wpcli_profile_autoloader ) ) {
|
||||||
|
require_once $wpcli_profile_autoloader;
|
||||||
|
}
|
||||||
|
|
||||||
|
WP_CLI::add_command( 'profile', 'WP_CLI\Profile\Command' );
|
Loading…
Add table
Add a link
Reference in a new issue