bp_get_folder_id()

Return the folder ID.

Description

Return

(int) The document folder ID.

Source

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

1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
function bp_get_folder_id() {
    global $document_template, $document_folder_template;
 
    $id = 0;
    if ( isset( $document_template ) && isset( $document_template->document ) && isset( $document_template->document->folder_id ) ) {
        $id = $document_template->document->folder_id;
    } elseif ( isset( $document_folder_template ) && isset( $document_folder_template->folder ) && isset( $document_folder_template->folder->id ) ) {
        $id = $document_folder_template->folder->id;
    }
 
    /**
     * Filters the document ID being displayed.
     *
     * @since BuddyBoss 1.4.0
     *
     * @param int $id The document folder ID.
     */
    return apply_filters( 'bp_get_folder_id', (int) $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.