Definition:
function get_real_file_to_edit( $file ) {}
Get the real file system path to a file to edit within the admin
If the $file is index.php or .htaccess this function will assume it is relative to the install root, otherwise it is assumed the file is relative to the wp-content directory
Parameters
- string $file: filesystem path relative to the WordPress install directory or to the wp-content directory
Return values
returns:full file system path to edit
Source code
function get_real_file_to_edit( $file ) {
if ('index.php' == $file || '.htaccess' == $file ) {
$real_file = get_home_path() . $file;
} else {
$real_file = WP_CONTENT_DIR . $file;
}
return $real_file;
}
1657

February 12, 2011 


No comments yet... Be the first to leave a reply!