Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save ideadude/f5a4d8213ac9e660c31db6f9b7f1d780 to your computer and use it in GitHub Desktop.
Save ideadude/f5a4d8213ac9e660c31db6f9b7f1d780 to your computer and use it in GitHub Desktop.
Exclude some extra dirs from the WordPress plugin check plugin.
<?php
/**
* Exclude some extra dirs from the WordPress plugin check plugin.
*/
function my_wp_plugin_check_ignore_directories( $dirs ) {
// For reference, the default dirs as of v1.0.1
// $default_ignore_directories = array(
// '.git',
// 'vendor',
// 'node_modules',
// );
$extra_dirs = array(
'.DS_Store',
'.changelogs',
'.config',
'.github',
'.source',
'.wordpress-org',
'_private',
'dist',
'docs',
'tests',
'tmp'
);
return array_unique( array_merge( $dirs, $extra_dirs ) );
}
add_filter( 'wp_plugin_check_ignore_directories' , 'my_wp_plugin_check_ignore_directories' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment