bp_get_document_attachment_id()

Return the document attachment ID.

Description

Return

(int) The document attachment ID.

Source

File: bp-document/bp-document-template.php

664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
function bp_get_document_attachment_id() {
    global $document_template;
 
    // Will get false if it's a folder.
    $attachment_id = 0;
 
    /**
     * Filters the document ID being displayed.
     *
     * @since BuddyBoss 1.4.0
     *
     * @param int $id The document attachment ID.
     */
 
    if ( isset( $document_template->document->attachment_id ) ) {
        $attachment_id = $document_template->document->attachment_id;
    }
 
    return apply_filters( 'bp_get_document_attachment_id', $attachment_id );
}

Changelog

Changelog
Version Description
BuddyBoss 1.4.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.