Buddypress media moderation bug

Hi rtCommunity

I’m using buddypress media. I modified the subnavs in the buddypress media tab, I have public, private and pending subnavs, I filter the gallery for privacy (20, 40 and 80). That works fine, but when a user edit a photo in the pending gallery, the moderation status is being bypassing and automatically the approval necessity is ommited.

I think so, it’s a bug in this feature. How I could solve it?

Version: 4.0.7 Author: rtCamp Text Domain: buddypress-media

Hello @Keybeth_Ortiz,

Our team is looking into your query. It will be handled and fixed in the upcoming release of rtMedia plugin.

Thank you for pointing out this to us.

Hi, @pranalipatel

I used a patch to solve for the moment this bug.

In my function.php

add_filter("rtmedia_before_update_media", "ra_before_update_media");
function ra_before_update_media($media_id)
{
    global $rtmedia_query;
    if( !empty( array_filter($rtmedia_query->media) )) {
        if($rtmedia_query->media[0]->privacy == 80 && isset($_POST['privacy']) ){
            unset($_POST['privacy']);
        }
    }
}.

And in the media-single-edit.php template:

<?php if( $rtmedia_media->privacy != 80 ){ echo rtmedia_edit_media_privacy_ui(); }

With this,I remove the privacy select from the edit page.

Hi @Keybeth_Ortiz,

We are glad to know that you found the hack for the issue.

We will check your code for possible modifications and release it with upcoming version. Please mention your WordPress user profile link so that we can add you to our changelog for the release.

Thanks for your contribution.

Regards, Pranali