Skip to content

Instantly share code, notes, and snippets.

@patrickposner
Created March 15, 2022 10:30
Show Gist options
  • Save patrickposner/75830ec8295c5c76d8fa4fba98ca459f to your computer and use it in GitHub Desktop.
Save patrickposner/75830ec8295c5c76d8fa4fba98ca459f to your computer and use it in GitHub Desktop.
FILR disallow additional file types for the upload
<?php
add_filter('filr_disallowed_file_extensions', function( $extensions ) {
// Extensions contains an array by default which looks like this: array( 'htaccess', 'php', 'php3', 'php4', 'php5', 'phtml' ).
// Lets exclude HTML files here.
$extensions[] = 'html';
return $extensions;
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment