validate_file_to_edit ( $file, $allowed_files = array() )
- (string) $file File the user is attempting to edit.
- (string) $allowed_files Optional. Array of allowed files to edit. `$file` must match an entry exactly.
- (string|void) Returns the file name on success, dies on failure.
- Introduced in WordPress: 1.5.0
- Deprecated in WordPress: —
Makes sure that the file that was requested to be edited is allowed to be edited.
Function will die if you are not allowed to edit the file.