bp_get_document_name()

Return the document name.

Description

Return

(int) The document name.

Source

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

1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
function bp_get_document_name() {
    global $document_template;
 
    if ( isset( $document_template->document ) && isset( $document_template->document->attachment_id ) && $document_template->document->attachment_id > 0 ) {
        $filename = basename( get_attached_file( $document_template->document->attachment_id ) );
    } else {
        $filename = $document_template->document->title;
    }
 
    /**
     * Filters the document name being displayed.
     *
     * @since BuddyBoss 1.4.0
     *
     * @param int $id The document name.
     */
    return apply_filters( 'bp_get_document_name', $filename );
}

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.