WP_CLI
Runner::maybe_update_url_from_domain_constant()
Called after wp-config.php is eval'd, to potentially reset --url
Метод класса: Runner{}
Хуков нет.
Возвращает
null
. Ничего (null).
Использование
// private - только в коде основоного (родительского) класса $result = $this->maybe_update_url_from_domain_constant();
Код Runner::maybe_update_url_from_domain_constant() Runner::maybe update url from domain constant WP-CLI 2.8.0-alpha
private function maybe_update_url_from_domain_constant() { if ( ! empty( $this->config['url'] ) || ! empty( $this->config['blog'] ) ) { return; } if ( defined( 'DOMAIN_CURRENT_SITE' ) ) { $url = DOMAIN_CURRENT_SITE; if ( defined( 'PATH_CURRENT_SITE' ) ) { $url .= PATH_CURRENT_SITE; } WP_CLI::set_url( $url ); } }