WP-CRM System Custom Fields Protected Directory

The wp_crm_system_custom_fields_protected_directory_allowed_filetypes filter lets you modify the file types that will be protected by the .htaccess file generated in the /wp-content/uploads/wp-crm-system-custom-fields/ directory.

This filter expects that your function will return an array of file extensions.

By default the following extensions are included:

$protected_filetypes = array(

To modify this list of protected file types:

//Add "odd" file type
add_filter( 'wp_crm_system_custom_fields_protected_directory_allowed_filetypes', 'add_odd_filetype' );
function add_odd_filetype( $protected_filetypes ){
    $protected_filetypes[] = 'odd';
    return $protected_filetypes;
// Only protect "jpg", "gif", and "png" file types
add_filter( 'wp_crm_system_custom_fields_protected_directory_allowed_filetypes', 'only_image_filetypes' );
function only_image_filetypes( $protected_filetypes ){
    $protected_filetypes = array(
    return $protected_filetypes;