BP_Media_Privacy::get_visibility( $media_id )
Get visibility of media
Description
Parameters
- $media_id
-
(Required)
Return
(WP_Error)
Source
File: bp-media/classes/class-bp-media-privacy.php
function get_visibility( $media_id ) { $result = bp_media_get_specific( array( 'media_ids' => $media_id ) ); if ( empty( $result['medias'] ) || empty( $result['medias'][0] ) ) { return new WP_Error( 'no_media', __( 'There is no media.', 'buddyboss' ), array( 'status' => 500 ) ); } return $result['medias'][0]->privacy; }
Changelog
Version | Description |
---|---|
BuddyBoss 1.0.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.