wpseek.com
Un motore di ricerca WordPress per sviluppatori e autori di temi
validate_file_to_edit › WordPress Function
Da1.5.0
Deprecaton/a
› validate_file_to_edit ( $file, $allowed_files = array() )
| Parametri: (2) |
|
| Ritorna: |
|
| Definito a: |
|
| Codex: |
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.Funzioni correlate: validate_file, get_real_file_to_edit, load_image_to_edit, validate_blog_signup, validate_email
Sorgenti
function validate_file_to_edit( $file, $allowed_files = array() ) {
$code = validate_file( $file, $allowed_files );
if ( ! $code ) {
return $file;
}
switch ( $code ) {
case 1:
wp_die( __( 'Sorry, that file cannot be edited.' ) );
// case 2 :
// wp_die( __('Sorry, cannot call files with their real path.' ));
case 3:
wp_die( __( 'Sorry, that file cannot be edited.' ) );
}
return null;
}