Tagged: bp-custom.php, mediapress, mpp-permission, upload, user roles
Hi Achim,
That is very easy to do. I just need to ask you another question tough. Do you want your subscribers to create galleries? I guess an obvious answer should be no.Sorry to have to post here but I am unable to respond on my original string #514. Can you email me directly? About the stealth mode.
Hi A,
Apologies for the delayed reply.
Please put this in your bp-custom.phpadd_filter( 'mpp_user_can_create_gallery', 'mpp_custom_prevent_gallery_creation', 11, 3 ); function mpp_custom_prevent_gallery_creation( $can_do, $component, $component_id ) { return buddydev_is_above_subscriber(); } add_filter( 'mpp_user_can_upload', 'mpp_custom_prevent_gallery_upload', 11, 4 ); function mpp_custom_prevent_gallery_upload( $can_do, $component, $component_id, $gallery ) { return buddydev_is_above_subscriber(); }
That will do it but the Ui will be still visible.
Hi A . Rhein,
I am sorry, That was a mistake in my part.I forgot to put the function we are calling.
Please add this snippet too to your bp-custom.phpfunction buddydev_is_above_subscriber() { if ( current_user_can( 'delete_posts' ) ) { return true; } return false; }
Now, that will work for sure.
The topic ‘ [Resolved] Prevent subscribers from uploading images?’ is closed to new replies.