bp_get_document_group_id()

Return the document group ID.

Description

Return

(int) The document group ID.

Source

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

function bp_get_document_group_id() {
	global $document_template, $document_folder_template;

	$db_group_id = 0;
	if ( isset( $document_template ) && isset( $document_template->document ) && isset( $document_template->document->group_id ) ) {
		$db_group_id = $document_template->document->group_id;
	} elseif ( isset( $document_folder_template ) && isset( $document_folder_template->folder ) && isset( $document_folder_template->folder->group_id ) ) {
		$db_group_id = $document_folder_template->folder->group_id;
	}

	/**
	 * Filters the document group ID being displayed.
	 *
	 * @since BuddyBoss 1.4.0
	 *
	 * @param int $id The document group ID.
	 */
	return apply_filters( 'bp_get_document_group_id', (int) $db_group_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.