WP_CLI
Configurator::load_config_spec
Loads the config spec file.
Метод класса: Configurator{}
Хуков нет.
Возвращает
null. Ничего (null).
Использование
// private - только в коде основоного (родительского) класса $result = $this->load_config_spec( $path );
- $path(строка) (обязательный)
- Path to the config spec file.
Код Configurator::load_config_spec() Configurator::load config spec WP-CLI 2.13.0-alpha
private function load_config_spec( $path ) {
$config_spec = include $path;
// A way for platforms to modify $config_spec.
// Use with caution!
$config_spec_filter_callback = defined( 'WP_CLI_CONFIG_SPEC_FILTER_CALLBACK' ) ? constant( 'WP_CLI_CONFIG_SPEC_FILTER_CALLBACK' ) : false;
if ( $config_spec_filter_callback && is_callable( $config_spec_filter_callback ) ) {
$config_spec = $config_spec_filter_callback( $config_spec );
}
$this->spec = $config_spec;
}