forked from htmlburger/wpemerge-theme
-
Notifications
You must be signed in to change notification settings - Fork 0
/
wpemerge
30 lines (25 loc) · 608 Bytes
/
wpemerge
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<?php
/**
* WP Emerge CLI shortcut.
*
* To get a full list of available commands run:
* php wpemerge list
*
* @link http://docs.wpemerge.com/#/starter/cli/overview
*/
if ( php_sapi_name() !== 'cli' ) {
exit;
}
$vendors = [
// $app/vendor
__DIR__ . DIRECTORY_SEPARATOR . 'vendor',
// $bedrock/vendor
dirname( dirname( dirname( dirname( __DIR__ ) ) ) ) . DIRECTORY_SEPARATOR . 'vendor',
];
foreach ( $vendors as $vendor ) {
$runner = implode( DIRECTORY_SEPARATOR, [$vendor, 'htmlburger', 'wpemerge-cli', 'src', 'run.php'] );
if ( is_file( $runner ) ) {
require_once $runner;
break;
}
}