bp_get_document_preview_attachment_id()

Return the document preview attachment id.

Description

Return

(int) The document preview attachment id.

Source

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

function bp_get_document_preview_attachment_id() {
	global $document_template;

	$attachment_id = 0;
	if ( isset( $document_template->document->attachment_id ) ) {
		$attachment_id = $document_template->document->attachment_id;
	}

	/**
	 * Filters the document preview attachment id being displayed.
	 *
	 * @since BuddyBoss 1.4.0
	 *
	 * @param int $id The document preview attachment id.
	 */
	return apply_filters( 'bp_get_document_preview_attachment_id', $attachment_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.