Skip to content

Commit 0841825

Browse files
authored
Merge pull request #6065 from wp-cli/add/multiple-early-require
Support multiple files in `WP_CLI_EARLY_REQUIRE`
2 parents 279794b + 06c2b56 commit 0841825

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)