BP_Document::prefetch_object_data( array $documents )
Pre-fetch data for objects associated with document items.
Description
Document items are associated with users, and often with other BuddyPress data objects. Here, we pre-fetch data about these associated objects, so that inline lookups – done primarily when building action strings – do not result in excess database queries.
Parameters
- $documents
-
(Required) Array of document.
Return
(array) $documents Array of document.
Source
File: bp-document/classes/class-bp-document.php
protected static function prefetch_object_data( $documents ) { /** * Filters inside prefetch_object_data method to aid in pre-fetching object data associated with document item. * * @param array $documents Array of document. * * @since BuddyBoss 1.4.0 */ return apply_filters( 'bp_document_prefetch_object_data', $documents ); }
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.