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

Built from https://develop.svn.wordpress.org/trunk@25201


git-svn-id: http://core.svn.wordpress.org/trunk@25173 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2013-09-01 12:37:12 +00:00
parent f50b7ff4c7
commit 00c9232a19
2 changed files with 16 additions and 24 deletions

View File

@ -1023,3 +1023,19 @@ function wp_create_thumbnail( $file, $max_side, $deprecated = '' ) {
_deprecated_function( __FUNCTION__, '3.5', 'image_resize()' );
return apply_filters( 'wp_create_thumbnail', image_resize( $file, $max_side, $max_side ) );
}
/**
* Get the real filesystem path to a file to edit within the admin.
*
* @since 1.5.0
* @deprecated 2.9.0
* @uses WP_CONTENT_DIR Full filesystem path to the wp-content directory.
*
* @param string $file Filesystem path relative to the wp-content directory.
* @return string Full filesystem path to edit.
*/
function get_real_file_to_edit( $file ) {
_deprecated_function( __FUNCTION__, '2.9' );
return WP_CONTENT_DIR . $file;
}

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.