740functionvalidate_file_to_edit($file,$allowed_files=array()){741$code=validate_file($file,$allowed_files);742743if(!$code){744return$file;745}746747switch($code){748case1:749wp_die(__('Sorry, that file cannot be edited.'));750751// case 2 :752// wp_die( __('Sorry, cannot call files with their real path.' ));753754case3:755wp_die(__('Sorry, that file cannot be edited.'));756}757returnnull;758}
History
Introduced in 1.5.0. One change between 6.7.7 and 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
7.1.0
Return type changed from string|void to string|null.verified against source
1.5.0
Introduced.from the docblock
About this page
Parsed data
Generated from the wordpress-develop 7.1.0 tag, from src/wp-admin/includes/file.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
Corrections
Something wrong on this page? Report it and it gets fixed in the next regeneration.