WP_CLI
Configurator::load_config_spec()
Loads the config spec file.
Method of the class: Configurator{}
No Hooks.
Return
null
. Nothing (null).
Usage
// private - for code of main (parent) class only $result = $this->load_config_spec( $path );
- $path(string) (required)
- Path to the config spec file.
Configurator::load_config_spec() Configurator::load config spec code WP-CLI 2.8.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; }