wp_delete_file_from_directory( string $file, string $directory )
Deletes a file if its path is within the given directory.
Parameters
- $file
-
(Required) Absolute path to the file to delete.
- $directory
-
(Required) Absolute path to a directory.
Return
(bool) True on success, false on failure.
Source
File: wp-includes/functions.php
Changelog
Version | Description |
---|---|
4.9.7 | Introduced. |