1, directly disable the file type detection, in the wp-config.php file, add such a sentence code define (' Allow_unfiltered_uploads ', true);
2, inside the functions.php, add the following code (the most important is the yellow background that 2 sentences):
<?//Add a role that allows regional edits to be addedAdd_role ('Dq_edit','Area Editor', Array ('Level_3'=true, 'Read'=true, 'edit_posts'=true, 'edit_published_posts'=true, 'edit_others_posts'=true, 'publish_posts'=true, 'upload_files' = = true, // allow uploading of files ' Unfiltered_upload' = + true, // allow uploading of unsafe files )); $role _object= Get_role ('Dq_edit' ); //add permissions for a role object $cap$role _object->add_cap ('Edit_jihua' ); $role _object->add_cap ('Upload_files' );?>
Bill: WordPress Foreground custom user, call Wp_editor upload attachment hint "Sorry, this file type is not supported for security reasons" error.