WP_CLI\Utils

is_plugin_skipped()WP-CLI 1.0

No Hooks.

Return

null. Nothing.

Usage

is_plugin_skipped( $file );
$file (required)
-

Code of is_plugin_skipped() WP-CLI 2.7.0-alpha

function is_plugin_skipped( $file ) {
	$name = get_plugin_name( str_replace( WP_PLUGIN_DIR . '/', '', $file ) );

	$skipped_plugins = WP_CLI::get_runner()->config['skip-plugins'];
	if ( true === $skipped_plugins ) {
		return true;
	}

	if ( ! is_array( $skipped_plugins ) ) {
		$skipped_plugins = explode( ',', $skipped_plugins );
	}

	return in_array( $name, array_filter( $skipped_plugins ), true );
}