Answer the question
In order to leave comments, you need to log in
Wordpress txt files how to prevent downloading?
Wordpress txt files how to prevent users from uploading on a site
Answer the question
In order to leave comments, you need to log in
Just remove the .txt extension from the allowed file types:
function modify_upload_types( $mimes )
{
unset( $mimes['txt'] );
return $mimes;
}
add_filter( 'upload_mimes', 'modify_upload_types' );
thanks, I watched the video on setting up several times, but where can I indicate how to prohibit txt files from uploading
, maybe there is another easier option?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question