Bill: WordPress Foreground custom user, call Wp_editor upload attachment hint "Sorry, this file type is not supported for security reasons" error.

Source: Internet
Author: User

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.