bp_get_document_parent_activity_id()
Return the document parent activity id.
Description
Return
(int) The document parent activity id.
Source
File: bp-document/bp-document-template.php
function bp_get_document_parent_activity_id() {
global $document_template;
$attachment_id = '';
if ( isset( $document_template ) && isset( $document_template->document ) && isset( $document_template->document->attachment_id ) ) {
$attachment_id = $document_template->document->attachment_id;
}
/**
* Filters the document parent activity id.
*
* @since BuddyBoss 1.4.0
*
* @param int $id The document parent activity id.
*/
return apply_filters( 'bp_get_document_parent_activity_id', get_post_meta( $attachment_id, 'bp_document_parent_activity_id', true ) );
}
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.