W3cubDocs

/WordPress

apply_filters( ‘wp_create_file_in_uploads’, string $file, int $attachment_id )

Filters the attachment file path after the custom header or background image is set.

Description

Used for file replication.

Parameters

$filestring
Path to the file.
$attachment_idint
Attachment ID.

Source

$file = apply_filters( 'wp_create_file_in_uploads', $file, $attachment_id ); // For replication.

Changelog

Version Description
2.1.0 Introduced.

© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/wp_create_file_in_uploads