bp_media_get_media_activity( $activity_id )

Return the media activity.

Description

Parameters

$activity_id

(Required)

Return

(object|boolean) The media activity object or false.

Source

File: bp-media/bp-media-functions.php

689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
function bp_media_get_media_activity( $activity_id ) {
 
    if ( ! bp_is_active( 'activity' ) ) {
        return false;
    }
 
    $result = bp_activity_get( array(
        'in' => $activity_id
    ) );
 
    if ( empty( $result['activities'][0] ) ) {
        return false;
    }
 
    /**
     * Filters the media activity object being displayed.
     *
     * @since BuddyBoss 1.0.0
     *
     * @param object $activity The media activity.
     */
    return apply_filters( 'bp_media_get_media_activity', $result['activities'][0] );
}

Changelog

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.