folders_get_folder( int $folder_id )
Fetch a single folder object.
Description
When calling up a folder object, you should always use this function instead of instantiating BP_Document_Folder directly, so that you will inherit cache support and pass through the folders_get_folder filter.
Parameters
- $folder_id
-
(Required) ID of the folder.
Return
(BP_Document_Folder) $folder The folder object.
Source
File: bp-document/bp-document-functions.php
function folders_get_folder( $folder_id ) {
$folder = new BP_Document_Folder( $folder_id );
/**
* Filters a single folder object.
*
* @param BP_Document_Folder $folder Single folder object.
*
* @since BuddyBoss 1.4.0
*/
return apply_filters( 'folders_get_folder', $folder );
}
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.