bp_folder_get_specific( array|string $args = '' )

Fetch specific folders.

Description

See also

Parameters

$args

(Optional) All arguments and defaults are shared with BP_Document_Folder::get(), except for the following

Default value: ''

Return

(array) $folders See BP_Document_Folder::get() for description.

Source

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

966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
function bp_folder_get_specific( $args = '' ) {
 
    $r = bp_parse_args(
        $args,
        array(
            'folder_ids'        => false,      // A single folder id or array of IDs.
            'max'               => false,      // Maximum number of results to return.
            '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.
            'update_meta_cache' => true,
            'count_total'       => false,
        ),
        'document_get_specific'
    );
 
    $get_args = array(
        'in'          => $r['folder_ids'],
        'max'         => $r['max'],
        'page'        => $r['page'],
        'per_page'    => $r['per_page'],
        'sort'        => $r['sort'],
        'count_total' => $r['count_total'],
    );
 
    /**
     * Filters the requested specific folder item.
     *
     * @param BP_Document $folder   Requested document object.
     * @param array       $args     Original passed in arguments.
     * @param array       $get_args Constructed arguments used with request.
     *
     * @since BuddyBoss
     */
    return apply_filters( 'bp_folder_get_specific', BP_Document_Folder::get( $get_args ), $args, $get_args );
}

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.