WP_CLI

RequestsLibrary::maybe_define_wp_cli_rootprivate staticWP-CLI 1.0

Define WP_CLI_ROOT if it is not already defined.

Method of the class: RequestsLibrary{}

No Hooks.

Returns

null. Nothing (null).

Usage

$result = RequestsLibrary::maybe_define_wp_cli_root();

RequestsLibrary::maybe_define_wp_cli_root() code WP-CLI 2.13.0-alpha

private static function maybe_define_wp_cli_root() {
	if ( ! defined( 'WP_CLI_ROOT' ) ) {
		define( 'WP_CLI_ROOT', dirname( dirname( __DIR__ ) ) );
	}
}