wp-includes/functions.php:7850Deletes a file.
$filestringboolOne hook fires while wp_delete_file() runs, in this order:
Filters the path of the file to delete.
function wp_delete_file( $file ) { /** * Filters the path of the file to delete. * * @since 2.1.0 * * @param string $file Path to the file to delete. */ $delete = apply_filters( 'wp_delete_file', $file ); if ( ! empty( $delete ) ) { return @unlink( $delete ); } return false;}Introduced in 4.2.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
src/wp-includes/functions.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.