Skip to content

Instantly share code, notes, and snippets.

@bogdan-mainwp
Last active August 30, 2023 07:00
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bogdan-mainwp/c99685a8bf702669bee16cfc9718398d to your computer and use it in GitHub Desktop.
Save bogdan-mainwp/c99685a8bf702669bee16cfc9718398d to your computer and use it in GitHub Desktop.
Custom code snippet that allows you to allow and/or disallow filetyps for the File Uploader extension.
<?php
// Add the following code snippet to the PHP section of the MainWP Custom Dashboard Extension
add_filter('mainwp_file_uploader_allowed_file_types', 'mycustom_mainwp_file_uploader_allowed_file_types');
function mycustom_mainwp_file_uploader_allowed_file_types( $types ) {
$types[] = 'htaccess';
return $types;
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment