validate_file_to_edit


validate_file_to_edit ( $file, $allowed_files = array() )

Parameters:
  • (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.
Returns:
  • (string|void) Returns the file name on success, dies on failure.
Defined at:

Description

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.

Related Functions

validate_file, get_real_file_to_edit, load_image_to_edit, wp_validate_redirect, validate_blog_signup

Top Google Results

User discussions

wpseek mobile