BP_Media_Album::prefetch_object_data( array $albums )

Pre-fetch data for objects associated with albums.

Description

albums 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

$albums

(Required) Array of media albums.

Return

(array) $albums Array of media albums.

Source

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

	protected static function prefetch_object_data( $albums ) {

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

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.