BP_REST_Media_Endpoint::assemble_response_data( array|string $args )

Get medias.

Description

Parameters

$args

(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-endpoint.php

1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
public function assemble_response_data( $args ) {
 
    // Fetch specific media items based on ID's.
    if ( isset( $args['media_ids'] ) && ! empty( $args['media_ids'] ) ) {
        return bp_media_get_specific( $args );
 
        // Fetch all activity items.
    } else {
        return bp_media_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.