bp_folder_get( array|string $args = '' )
Retrieve an folder or folders.
Description
The bp_folder_get() function shares all arguments with BP_Document_Folder::get(). The following is a list of bp_folder_get() parameters that have different default values from BP_Document_Folder::get() (value in parentheses is the default for the bp_folder_get()).
- ‘per_page’ (false)
See also
- BP_Document_Folder::get(): For more information on accepted arguments and the format of the returned value.
Parameters
- $args
-
(Optional) See BP_Document_Folder::get() for description.
Default value: ''
Return
(array) $activity See BP_Document_Folder::get() for description.
Source
File: bp-document/bp-document-functions.php
899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 | function bp_folder_get( $args = '' ) { $r = bp_parse_args( $args , array ( 'max' => false, // Maximum number of results to return. 'fields' => 'all' , 'page' => 1, // Page 1 without a per_page will result in no pagination. 'per_page' => false, // results per page. 'sort' => 'DESC' , // sort ASC or DESC. 'search_terms' => false, // Pass search terms as a string. 'exclude' => false, // Comma-separated list of activity IDs to exclude. // want to limit the query. 'user_id' => false, 'group_id' => false, 'privacy' => false, // privacy of folder. 'count_total' => false, ), 'folder_get' ); $folder = BP_Document_Folder::get( array ( 'page' => $r [ 'page' ], 'per_page' => $r [ 'per_page' ], 'user_id' => $r [ 'user_id' ], 'group_id' => $r [ 'group_id' ], 'privacy' => $r [ 'privacy' ], 'max' => $r [ 'max' ], 'sort' => $r [ 'sort' ], 'search_terms' => $r [ 'search_terms' ], 'exclude' => $r [ 'exclude' ], 'count_total' => $r [ 'count_total' ], 'fields' => $r [ 'fields' ], ) ); /** * Filters the requested folder item(s). * * @param BP_Document $folder Requested document object. * @param array $r Arguments used for the folder query. * * @since BuddyBoss 1.4.0 */ return apply_filters_ref_array( 'bp_folder_get' , array ( & $folder , & $r ) ); } |
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.