update_attached_file filter-hookWP 2.1.0

Filters the path to the attached file to update.

Usage

add_filter( 'update_attached_file', 'wp_kama_update_attached_file_filter', 10, 2 );

/**
 * Function for `update_attached_file` filter-hook.
 * 
 * @param string $file          Path to the attached file to update.
 * @param int    $attachment_id Attachment ID.
 *
 * @return string
 */
function wp_kama_update_attached_file_filter( $file, $attachment_id ){

	// filter...
	return $file;
}
$file(string)
Path to the attached file to update.
$attachment_id(int)
Attachment ID.

Changelog

Since 2.1.0 Introduced.

Where the hook is called

update_attached_file()
update_attached_file
wp-includes/post.php 774
$file = apply_filters( 'update_attached_file', $file, $attachment_id );

Where the hook is used in WordPress

Usage not found.