Hi, I have a question or issue I need to resolve.
The website I’m working on is supposed to allow certain user roles the upload of specific files (.rpt).
While researching it I found this code (I’m not a PHP coder):
******************************************************************
add_filter( ‘upload_mimes’, ‘my_myme_types’, 1, 1 );
function my_myme_types( $mime_types ) {
$mime_types[‘rpt’] = ‘application/rpt’; // Adding .rpt extension
unset( $mime_types[‘xls’] ); // Remove .xls extension
unset( $mime_types[‘xlsx’] ); // Remove .xlsx extension
return $mime_types;
}
******************************************************************
Now this works great, but only for administrators. It doesn’t work for any other user role.
I need it to work for Editors, Authors, or Custom User roles.
Can anybody offer advice?