wp_create_file_in_uploads

This filter is documented in wp-admin/custom-header.php.

Description

apply_filters( 'wp_create_file_in_uploads', (unknown) $image, (unknown) $attachment_id ); 

Parameters (2)

0. $image (unknown)
The image.
1. $attachment_id (unknown)
The attachment id.

Usage

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

Defined (5)

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

/wp-admin/custom-header.php  
  1. $image = apply_filters( 'wp_create_file_in_uploads', $image, $attachment_id ); // For replication 
  1. $cropped = apply_filters( 'wp_create_file_in_uploads', $cropped, $attachment_id ); // For replication 
  1. $cropped = apply_filters( 'wp_create_file_in_uploads', $cropped, $attachment_id ); // For replication 
/wp-admin/includes/ajax-actions.php  
  1. $cropped = apply_filters( 'wp_create_file_in_uploads', $cropped, $attachment_id ); // For replication. 
  1. $cropped = apply_filters( 'wp_create_file_in_uploads', $cropped, $attachment_id ); // For replication.