I’m not sure if I understand what you’re trying to do. Do you want to use the simple uploader or the Media Uploader? The Media Uploader shows for Authors, Editors, and Administrators because they all have upload_files capability (as well as some other capabilities that I check for). So, if you take away that capability from those roles, you would see the simple uploader that I use for Contributors and Subscribers.
If you’re getting an http error with the Media Uploader after trying to upload a file, I can’t say for sure what it would be. What other plugins do you have active?
What other plugins do you have active?
I already tried it with all other plugins disabled.
The Media Uploader shows for Authors, Editors, and Administrators because they all have upload_files capability
Yup. Removing it gets the simple uploader, but i cant upload files in posts or pages. But it works for uploading avatars.
If you’re getting an http error with the Media Uploader after trying to upload a file, I can’t say for sure what it would be
Me neither, in the backend it works for all uesrs btw. In the frontend it does not work.
So my question is, if there is a way to force the simple http uploader for the shortcode for everyone.
You can add this code to the functions.php file of your theme:
function my_media_uploader_filter() {
return false;
}
add_filter('wpua_is_author_or_above', 'my_media_uploader_filter');
function my_media_uploader_filter() {
return false;
}
add_filter('wpua_is_author_or_above', 'my_media_uploader_filter');
Working for me 🙂
EDIT: I added:
if ( $post->post_name == 'put your postname here' ) {
return false;
}
to restrict this to a specific page.
For me it looks like this in the end:
function my_media_uploader_filter() {
if ( $post->post_name == 'put your postname here' ) {
return false;
}
}
add_filter('wpua_is_author_or_above', 'my_media_uploader_filter');