bp_get_document_name()

Return the document name.

Description

Return

(int) The document name.

Source

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

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.