wp_create_file_in_uploads
Это хук WordPress - wp_create_file_in_uploads. Плагин его просто использует.
This action is documented in wp-admin/custom-header.php
Использование
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(строка)
- Path to the file.
- $attachment_id(int)
- Attachment ID.
Где вызывается хук
wp_create_file_in_uploads
acf/includes/api/api-helpers.php 2434
do_action( 'wp_create_file_in_uploads', $file, $id ); // For replication