Lightbox Edit and Delete functionality permissions

How can I make it so that the edit and delete functionality of the lightbox is only allowed by group admins and administrators. I don’t want ordinary users to have the ability to edit or delete their own lightbox. The site is for children and moderated by group admins.

Thanks

Attachment Link(s):

https://rtcamp.com/wp-content/uploads/rtMedia/topics/62349/2014/03/Lightbox.jpg

@siteshack,

There are filters available for the same in rtMedia. Use rtmedia_media_edit_priv filter to allow edit media or not. Use rtmedia_media_delete_priv filter to allow delete media or not.

You can check for the site admin and whether it is group media or not and can return true / false according to that.

Hi

Thanks

would I put this in my child theme functions.php?

also please just show me an example of the conditional syntax. Sorry php not my strong point am just about to start learning it !!!

Danny

Of-course you have to put that in your child theme's functions.php file.

You can google it for how to add this filter, there are many tutorial sites available. That's the best way you can learn. In the function you can check that whether current user is admin or not.

ex. add_filter('rtmedia_media_delete_priv','check_group_admin_allow_delete_rtmedia', 99, 1); function check_group_admin_allow_delete_rtmedia( $allow ) { $allow is the boolean value (true/false) which will determine wheterh to allow delete or not. Check for current user is group admin or not and according to that assign value to $allow. $allow = true/false. return $allow; }

Thanks Ritesh

Appreciate everything Danny