wp_delete_file_from_directory ( $file, $directory )
- (string) file Absolute path to the file to delete.
- (string) directory Absolute path to a directory.
- (bool) True on success, false on failure.
- Introduced in WordPress: 4.9.7
- Deprecated in WordPress: —
Deletes a file if its path is within the given directory.