validate_file_to_edit [ WordPress Function ]
validate_file_to_edit ( $file, $allowed_files = '' )
| Parameters: |
|
| Uses: | |
| Returns: |
|
| Defined at: |
|
Benzer Fonksiyonlar: validate_file, get_real_file_to_edit, load_image_to_edit, validate_email, wp_validate_redirect
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
Source
<?php
function validate_file_to_edit( $file, $allowed_files = '' ) {
$code = validate_file( $file, $allowed_files );
if (!$code )
return $file;
switch ( $code ) {
case 1 :
wp_die( __('Sorry, can’t edit files with “..” in the name. If you are trying to edit a file in your WordPress home directory, you can just type the name of the file in.' ));
//case 2 :
// wp_die( __('Sorry, can’t call files with their real path.' ));
case 3 :
wp_die( __('Sorry, that file cannot be edited.' ));
}
}
?>
Examples [ wp-snippets.com ]
Google Arama Sonuçlarý
- PHPXRef 0.7 : WordPress : Function Reference: validate_file_to_edit()
Function and Method Cross Reference. validate_file_to_edit(). Defined at: /wp- admin/includes/file.php -> line 181. Referenced 2 times: ...
phpxref.ftwr.co.uk - validate_file_to_edit (WordPress Function) - WPSeek.com
WordPress lookup for validate_file_to_edit, a WordPress Function. wpseek.com is a WordPress-centric search tool for developers and theme authors.
wpseek.com - validate_file_to_edit() WordPress function reference, arguments and ...
Make sure that the file that was requested to edit, is allowed to be edited.
queryposts.com - WordPress › Support » Sorry, that file cannot be edited, with 2.9
validate_file_to_edit($file, $allowed_files);. freewordpressthemes4u. Member Posted 2 years ago #. validate_file_to_edit($file, $allowed_files); $file ...
wordpress.org