Skip to content

Instantly share code, notes, and snippets.

@paulgoodchild
Created March 26, 2020 07:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save paulgoodchild/42367e6f38e87ce03b1bfa4ce14db2c4 to your computer and use it in GitHub Desktop.
Save paulgoodchild/42367e6f38e87ce03b1bfa4ce14db2c4 to your computer and use it in GitHub Desktop.
<?php
/**
* You can whitelist certain directories from the Shield malware scanner using
* the following WordPress filter.
*
* All paths you provide must be relative to your ABSPATH
* (i.e. from the directory where your wp-settings.php file resides)
*
* You must always return the $paths variable at the end.
*/
add_filter(
'icwp_shield_malware_whitelist_paths',
function ( $paths ) {
$paths[] = 'wp-content/my/custom/path/';
$paths[] = 'wp-content/my/other/path/';
return $paths;
}
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment