WordPress.org

Ready to get started?Download WordPress

Codex

Function Reference/validate file to edit

Contents

Description

Make sure that the file that was requested to edit, is allowed to be edited.Function will die if if you are not allowed to edit the file.

Usage

 <?php validate_file_to_edit$file$allowed_files ); ?> 

Parameters

$file
(string) (required) File the users is attempting to edit. required
Default: None
$allowed_files
(array) (optional) Array of allowed files to edit, $file must match an entry exactly.
Default:

Returns

null.

Change Log

Source File

get_file_description( $file ) is located in wp-admin/includes/file.php#L172