WordPress.org

Ready to get started?Download WordPress

Codex

Attention Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Difference between revisions of "Function Reference/validate file to edit"

(Added page for validate_file_to_edit)
 
(No difference)

Latest revision as of 13:59, 26 February 2014

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