bp_get_document_preview_attachment_id()

Return the document preview attachment id.

Description

Return

(int) The document preview attachment id.

Source

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

1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
function bp_get_document_preview_attachment_id() {
    global $document_template;
 
    $attachment_id = 0;
    if ( isset( $document_template->document->attachment_id ) ) {
        $attachment_id = $document_template->document->attachment_id;
    }
 
    /**
     * Filters the document preview attachment id being displayed.
     *
     * @since BuddyBoss 1.4.0
     *
     * @param int $id The document preview attachment id.
     */
    return apply_filters( 'bp_get_document_preview_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.