bp_document_prepare_attachment_for_js( array $response,  $attachment,  $meta )

Prepare attachment for JavaScript.

Description

Parameters

$response

(Required) JS version of a attachment post object.

Return

(array)

Source

File: bp-document/bp-document-filters.php

function bp_document_prepare_attachment_for_js( $response, $attachment, $meta ) {
	if ( isset( $response['url'] ) && strstr( $response['url'], 'bb_documents/' ) ) {
		$response['icon'] 	= includes_url() . 'images/media/default.png';
		$response['type'] 	= 'text';
		$response['sizes'] 	= array();
	}

	return $response;
}

Changelog

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