fallback_intermediate_image_sizes

Filters the image sizes generated for non-image mime types.

Description

apply_filters( 'fallback_intermediate_image_sizes', (unknown) $fallback_sizes, (unknown) $metadata ); 

Parameters (2)

0. $fallback_sizes (unknown)
The fallback sizes.
1. $metadata (unknown)
The metadata.

Usage

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

Defined (1)

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

/wp-admin/includes/image.php  
  1. $fallback_sizes = apply_filters( 'fallback_intermediate_image_sizes', $fallback_sizes, $metadata );