bp_attachments_get_cover_image_dimensions

Filter here to edit the cover image dimensions if needed.

Description

apply_filters( 'bp_attachments_get_cover_image_dimensions', (array) $wh, (array) $settings, (string) $component ); 

Parameters (3)

0. $wh (array)
An associative array containing the width and height values.
1. $settings (array)
An associative array containing all the feature settings.
2. $component (string)
The requested component.

Usage

To run the hook, copy the example below.
  1. $wh = apply_filters( 'bp_attachments_get_cover_image_dimensions', $wh, $settings, $component ); 
  2.  
  3. if ( !empty( $wh ) ) { 
  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_cover_image_dimensions callback 
  2. function filter_bp_attachments_get_cover_image_dimensions( $wh, $settings, $component ) { 
  3. // make filter magic happen here... 
  4. return $wh
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'bp_attachments_get_cover_image_dimensions', 'filter_bp_attachments_get_cover_image_dimensions', 10, 3 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'bp_attachments_get_cover_image_dimensions', 'filter_bp_attachments_get_cover_image_dimensions', 10, 3 ); 

Defined (1)

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

/bp-core/bp-core-attachments.php  
  1. return apply_filters( 'bp_attachments_get_cover_image_dimensions', $wh, $settings, $component );