wp_create_file_in_uploads
This is a WordPress - wp_create_file_in_uploads hook. The plugin just uses it.
This action is documented in wp-admin/custom-header.php
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.
Where the hook is called
wp_create_file_in_uploads
acf/includes/api/api-helpers.php 2543
do_action( 'wp_create_file_in_uploads', $file, $id ); // For replication