Make WordPress Core

Ticket #23680: 23680-2.diff

File 23680-2.diff, 2.3 KB (added by iamfriendly, 11 years ago)
  • wp-admin/includes/deprecated.php

    diff --git wp-admin/includes/deprecated.php wp-admin/includes/deprecated.php
    index 399577e..ae8bc37 100644
    function wp_create_thumbnail( $file, $max_side, $deprecated = '' ) { 
    10231023        _deprecated_function( __FUNCTION__, '3.5', 'image_resize()' );
    10241024        return apply_filters( 'wp_create_thumbnail', image_resize( $file, $max_side, $max_side ) );
    10251025}
     1026
     1027/**
     1028 * Get the real file system path to a file to edit within the admin
     1029 *
     1030 * If the $file is index.php or .htaccess this function will assume it is relative
     1031 * to the install root, otherwise it is assumed the file is relative to the wp-content
     1032 * directory
     1033 *
     1034 * @since 1.5.0
     1035 * @deprecated 2.9
     1036 * @uses get_home_path
     1037 * @uses WP_CONTENT_DIR full filesystem path to the wp-content directory
     1038 * @param string $file filesystem path relative to the WordPress install directory or to the wp-content directory
     1039 * @return string full file system path to edit
     1040 */
     1041function get_real_file_to_edit( $file ) {
     1042        _deprecated_function( __FUNCTION__, '2.9' );
     1043
     1044        return WP_CONTENT_DIR . $file;
     1045}
     1046 No newline at end of file
  • wp-admin/includes/file.php

    diff --git wp-admin/includes/file.php wp-admin/includes/file.php
    index da3fd1f..f37ad45 100644
    function get_home_path() { 
    9393        return str_replace( '\\', '/', $home_path );
    9494}
    9595
    96 /**
    97  * Get the real file system path to a file to edit within the admin
    98  *
    99  * If the $file is index.php or .htaccess this function will assume it is relative
    100  * to the install root, otherwise it is assumed the file is relative to the wp-content
    101  * directory
    102  *
    103  * @since 1.5.0
    104  * @deprecated 2.9
    105  * @uses get_home_path
    106  * @uses WP_CONTENT_DIR full filesystem path to the wp-content directory
    107  * @param string $file filesystem path relative to the WordPress install directory or to the wp-content directory
    108  * @return string full file system path to edit
    109  */
    110 function get_real_file_to_edit( $file ) {
    111         _deprecated_function( __FUNCTION__, '2.9' );
    112 
    113         if ('index.php' == $file || '.htaccess' == $file ) {
    114                 $real_file = get_home_path() . $file;
    115         } else {
    116                 $real_file = WP_CONTENT_DIR . $file;
    117         }
    118 
    119         return $real_file;
    120 }
    12196
    12297/**
    12398 * Returns a listing of all files in the specified folder and all subdirectories up to 100 levels deep.