bp_get_document_author()

Return the document name.

Description

Return

(int) The document name.

Source

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

1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
function bp_get_document_author() {
    global $document_template, $document_folder_template;
 
    if ( isset( $document_template ) && isset( $document_template->document ) && isset( $document_template->document->user_id ) ) {
        $author = bp_core_get_user_displayname( $document_template->document->user_id );
    } elseif ( isset( $document_folder_template ) && isset( $document_folder_template->folder ) && isset( $document_folder_template->folder->user_id ) ) {
        $author = bp_core_get_user_displayname( $document_folder_template->folder->user_id );
    }
 
    /**
     * Filters the document name being displayed.
     *
     * @since BuddyBoss 1.4.0
     *
     * @param int $id The document name.
     */
    return apply_filters( 'bp_get_document_author', $author );
}

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.