Move get_real_file_to_edit() to wp-admin/includes/deprecated.php. props iamfriendly. fixes #23680.

git-svn-id: https://develop.svn.wordpress.org/trunk@25201 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov
2013-09-01 12:36:45 +00:00
parent b0380a5f62
commit 4e75fe1bf1
2 changed files with 16 additions and 24 deletions

View File

@@ -93,30 +93,6 @@ function get_home_path() {
return str_replace( '\\', '/', $home_path );
}
/**
* 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
*
* @since 1.5.0
*
* @uses get_home_path
* @uses WP_CONTENT_DIR full filesystem path to the wp-content directory
* @param string $file filesystem path relative to the WordPress install directory or to the wp-content directory
* @return string full file system path to edit
*/
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;
}
/**
* Returns a listing of all files in the specified folder and all subdirectories up to 100 levels deep.
* The depth of the recursiveness can be controlled by the $levels param.