WP_CLI\Utils
load_dependencies()
Хуков нет.
Возвращает
null
. Ничего (null).
Использование
load_dependencies();
Код load_dependencies() load dependencies WP-CLI 2.8.0-alpha
function load_dependencies() { if ( inside_phar() ) { if ( file_exists( WP_CLI_ROOT . '/vendor/autoload.php' ) ) { require WP_CLI_ROOT . '/vendor/autoload.php'; } elseif ( file_exists( dirname( dirname( WP_CLI_ROOT ) ) . '/autoload.php' ) ) { require dirname( dirname( WP_CLI_ROOT ) ) . '/autoload.php'; } return; } $has_autoload = false; foreach ( get_vendor_paths() as $vendor_path ) { if ( file_exists( $vendor_path . '/autoload.php' ) ) { require $vendor_path . '/autoload.php'; $has_autoload = true; break; } } if ( ! $has_autoload ) { fwrite( STDERR, "Internal error: Can't find Composer autoloader.\nTry running: composer install\n" ); exit( 3 ); } }