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.


Top ↑

Source

File: wp-includes/functions.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
2.1.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More
Show More