BP_Media::prefetch_object_data( array $medias )

Pre-fetch data for objects associated with media items.

Description

Media 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

$medias

(Required) Array of media.

Return

(array) $medias Array of media.

Source

File: bp-media/classes/class-bp-media.php

	protected static function prefetch_object_data( $medias ) {

		/**
		 * Filters inside prefetch_object_data method to aid in pre-fetching object data associated with media item.
		 *
		 * @since BuddyBoss 1.0.0
		 *
		 * @param array $medias Array of media.
		 */
		return apply_filters( 'bp_media_prefetch_object_data', $medias );
	}

Changelog

Changelog
Version Description
BuddyBoss 1.0.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.