BP_Document::get_activity_document_id( bool $activity_id = false )

Get document id for the activity.

Description

Parameters

$activity_id

(Optional)

Default value: false

Return

(array|bool)

Source

File: bp-document/classes/class-bp-document.php

1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
public static function get_activity_document_id( $activity_id = false ) {
    global $bp, $wpdb;
 
    if ( ! $activity_id ) {
        return false;
    }
 
    $activity_document_id = (int) $wpdb->get_var( "SELECT DISTINCT d.id FROM {$bp->document->table_name} d WHERE d.activity_id = {$activity_id}" ); // db call ok; no-cache ok;
 
    return $activity_document_id;
}

Changelog

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.