BP_Media::get_activity_media_id( bool $activity_id = false )
Get media id for the activity.
Description
Parameters
- $activity_id
-
(Optional)
Default value: false
Return
(array|bool)
Source
File: bp-media/classes/class-bp-media.php
public static function get_activity_media_id( $activity_id = false ) { global $bp, $wpdb; if ( ! $activity_id ) { return false; } $activity_media_id = (int) $wpdb->get_var( "SELECT DISTINCT m.id FROM {$bp->media->table_name} m WHERE m.activity_id = {$activity_id}" ); return $activity_media_id; }
Changelog
Version | Description |
---|---|
BuddyBoss 1.1.6 | 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.