wp_create_file_in_uploads
Fires after the header image is set or an error is returned.
Usage
add_action( 'wp_create_file_in_uploads', 'wp_kama_create_file_in_uploads_action', 10, 2 ); /** * Function for `wp_create_file_in_uploads` action-hook. * * @param string $file Path to the file. * @param int $attachment_id Attachment ID. * * @return void */ function wp_kama_create_file_in_uploads_action( $file, $attachment_id ){ // action... }
- $file(string)
- Path to the file.
- $attachment_id(int)
- Attachment ID.
Changelog
Since 2.1.0 | Introduced. |
Where the hook is called
wp_create_file_in_uploads
wp_create_file_in_uploads
wp_create_file_in_uploads
wp_create_file_in_uploads
wp_create_file_in_uploads
wp-admin/includes/class-custom-image-header.php 879
do_action( 'wp_create_file_in_uploads', $file, $attachment_id ); // For replication.
wp-admin/includes/ajax-actions.php 3983
$cropped = apply_filters( 'wp_create_file_in_uploads', $cropped, $attachment_id ); // For replication.
wp-admin/includes/ajax-actions.php 4011
$cropped = apply_filters( 'wp_create_file_in_uploads', $cropped, $attachment_id ); // For replication.
wp-admin/includes/class-custom-background.php 536
do_action( 'wp_create_file_in_uploads', $file, $id ); // For replication.
wp-admin/includes/class-custom-image-header.php 902
$image = apply_filters( 'wp_create_file_in_uploads', $image, $attachment_id ); // For replication.
wp-admin/includes/class-custom-image-header.php 1061
$cropped = apply_filters( 'wp_create_file_in_uploads', $cropped, $attachment_id ); // For replication.
wp-admin/includes/class-custom-image-header.php 1404
$cropped = apply_filters( 'wp_create_file_in_uploads', $cropped, $attachment_id ); // For replication.