Skip to content

Commit 06c2b56

Browse files
committed
Support multiple files in WP_CLI_EARLY_REQUIRE
Files can be separated by comma.
1 parent 279794b commit 06c2b56

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

php/wp-cli.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,10 @@
2626
require_once WP_CLI_ROOT . '/php/bootstrap.php';
2727

2828
if ( getenv( 'WP_CLI_EARLY_REQUIRE' ) ) {
29-
require_once getenv( 'WP_CLI_EARLY_REQUIRE' );
29+
foreach ( explode( ',', getenv( 'WP_CLI_EARLY_REQUIRE' ) ) as $wp_cli_early_require ) {
30+
require_once trim( $wp_cli_early_require );
31+
}
32+
unset( $wp_cli_early_require );
3033
}
3134

3235
WP_CLI\bootstrap();

0 commit comments

Comments
 (0)