wp_delete_file WordPress Filter Hook
The wp_delete_file hook is used to delete a file associated with a WordPress post. This hook is called when a user deletes a post, and is used to clean up any files associated with that post. This hook can be used to delete files that are no longer needed, or to take action when a file is deleted.
apply_filters( 'wp_delete_file', string $file ) #
Filters the path of the file to delete.
Parameters
- $file
(string)Path to the file to delete.
Source
Changelog
Version | Description |
---|---|
2.1.0 | Introduced. |