Files
Roman Pyrih d6241cfa7a first commit
2024-12-19 15:27:13 +01:00

17 lines
285 B
PHP

<?php
/**
* Get path to wp-config.php when called from WP-CLI.
*
* @return string
*/
function wpo_wp_cli_locate_wp_config() {
$config_path = '';
if (is_callable('\WP_CLI\Utils\locate_wp_config')) {
$config_path = \WP_CLI\Utils\locate_wp_config();
}
return $config_path;
}