BP_REST_Media_Details_Endpoint::get_media_privacy()

Get privacy for the media.

Description

Return

(array)

Source

File: bp-media/classes/class-bp-rest-media-details-endpoint.php

186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
public function get_media_privacy() {
    $privacy = buddypress()->media->visibility_levels;
    $retval  = array();
 
    if ( ! empty( $privacy ) ) {
        foreach ( $privacy as $key => $value ) {
            if ( 'grouponly' === $key ) {
                continue;
            }
 
            $retval[ $key ] = $value;
        }
    }
 
    return $retval;
}

Changelog

Changelog
Version Description
0.1.0 Introduced.

Questions?

We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.