BP_REST_Media_Albums_Endpoint::assemble_response_data( array|string $args )

Get Albums.

Description

Parameters

$args

(array|string) (Required) All arguments and defaults are shared with BP_Media::get(), except for the following.

Return

(array)

Source

File: bp-media/classes/class-bp-rest-media-albums-endpoint.php

	public function assemble_response_data( $args ) {

		// Fetch specific media items based on ID's.
		if ( isset( $args['album_ids'] ) && ! empty( $args['album_ids'] ) ) {
			return bp_album_get_specific( $args );

			// Fetch all activity items.
		} else {
			return bp_album_get( $args );
		}
	}

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.