bp_get_folder_link()
Return the folder description.
Description
Return
(string) The document folder description.
Source
File: bp-document/bp-document-template.php
function bp_get_folder_link() { global $document_template, $document_folder_template; $url = ''; if ( isset( $document_template ) && isset( $document_template->document ) && isset( $document_template->document->group_id ) && $document_template->document->group_id > 0 && bp_is_active( 'groups' ) ) { $group = groups_get_group( $document_template->document->group_id ); $group_link = bp_get_group_permalink( $group ); $url = trailingslashit( $group_link . 'documents/folders/' . bp_get_folder_id() ); } elseif ( isset( $document_folder_template ) && isset( $document_folder_template->folder ) && isset( $document_folder_template->folder->group_id ) && $document_folder_template->folder->group_id > 0 ) { $group = groups_get_group( $document_folder_template->folder->group_id ); $group_link = bp_get_group_permalink( $group ); $url = trailingslashit( $group_link . 'documents/folders/' . bp_get_folder_id() ); } elseif ( isset( $document_folder_template ) && isset( $document_folder_template->folder ) && isset( $document_folder_template->folder->user_id ) ) { $url = trailingslashit( bp_core_get_user_domain( $document_folder_template->folder->user_id ) . 'document/folders/' . bp_get_folder_id() ); } else { $url = trailingslashit( bp_core_get_user_domain( $document_template->document->user_id ) . 'document/folders/' . bp_get_folder_id() ); } /** * Filters the folder description being displayed. * * @since BuddyBoss 1.4.0 * * @param int $id The document folder description. */ return apply_filters( 'bp_get_folder_link', $url ); }
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.