Automattic\WooCommerce\Internal\OrderReviews
Endpoint::wp_cli_skips_active_theme
Determine whether WP-CLI skipped the active theme.
Метод класса: Endpoint{}
Хуков нет.
Возвращает
bool.
Использование
// private - только в коде основоного (родительского) класса $result = $this->wp_cli_skips_active_theme(): bool;
Код Endpoint::wp_cli_skips_active_theme() Endpoint::wp cli skips active theme WC 11.2.2
private function wp_cli_skips_active_theme(): bool {
$get_wp_cli_config = array( 'WP_CLI', 'get_config' );
if ( ! ( defined( 'WP_CLI' ) && WP_CLI ) || ! is_callable( $get_wp_cli_config ) ) {
return false;
}
$skipped_themes = $get_wp_cli_config( 'skip-themes' );
if ( true === $skipped_themes ) {
return true;
}
if ( ! is_array( $skipped_themes ) ) {
$skipped_themes = explode( ',', (string) $skipped_themes );
}
return in_array( get_stylesheet(), $skipped_themes, true );
}