diff --git a/src/wp-admin/includes/deprecated.php b/src/wp-admin/includes/deprecated.php index 399577ed4b..ffa176dd7a 100644 --- a/src/wp-admin/includes/deprecated.php +++ b/src/wp-admin/includes/deprecated.php @@ -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; +} diff --git a/src/wp-admin/includes/file.php b/src/wp-admin/includes/file.php index b637f4f41c..36977a05a7 100644 --- a/src/wp-admin/includes/file.php +++ b/src/wp-admin/includes/file.php @@ -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.