bp_attachments_get_image_data

Filter here to add/remove/edit data to the image full data.

Description

apply_filters( 'bp_attachments_get_image_data', (array) $image_data ); 

Parameters (1)

0. $image_data (array)
An associate array containing the width, height and metadatas.

Usage

To run the hook, copy the example below.
  1. $image_data = apply_filters( 'bp_attachments_get_image_data', $image_data ); 
  2.  
  3. if ( !empty( $image_data ) ) { 
  4.  
  5. // everything has led up to this point... 
  6.  
  7.  
The following example is for adding a hook callback.
  1. // define the bp_attachments_get_image_data callback 
  2. function filter_bp_attachments_get_image_data( $image_data ) { 
  3. // make filter magic happen here... 
  4. return $image_data
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'bp_attachments_get_image_data', 'filter_bp_attachments_get_image_data', 10, 1 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'bp_attachments_get_image_data', 'filter_bp_attachments_get_image_data', 10, 1 ); 

Defined (1)

The filter is defined in the following location(s).

/bp-core/classes/class-bp-attachment.php  
  1. return apply_filters( 'bp_attachments_get_image_data', $image_data );