WP_CLI
Runner::get_packages_dir_path()
Get the path to the packages directory
Method of the class: Runner{}
No Hooks.
Return
String
.
Usage
$Runner = new Runner(); $Runner->get_packages_dir_path();
Runner::get_packages_dir_path() Runner::get packages dir path code WP-CLI 2.8.0-alpha
public function get_packages_dir_path() { if ( getenv( 'WP_CLI_PACKAGES_DIR' ) ) { $packages_dir = Utils\trailingslashit( getenv( 'WP_CLI_PACKAGES_DIR' ) ); } else { $packages_dir = Utils\get_home_dir() . '/.wp-cli/packages/'; } return $packages_dir; }