Make WordPress Core

Changeset 25201


Ignore:
Timestamp:
09/01/2013 12:36:45 PM (11 years ago)
Author:
SergeyBiryukov
Message:

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

Location:
trunk/src/wp-admin/includes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/deprecated.php

    r23577 r25201  
    10241024    return apply_filters( 'wp_create_thumbnail', image_resize( $file, $max_side, $max_side ) );
    10251025}
     1026
     1027/**
     1028 * Get the real filesystem path to a file to edit within the admin.
     1029 *
     1030 * @since 1.5.0
     1031 * @deprecated 2.9.0
     1032 * @uses WP_CONTENT_DIR Full filesystem path to the wp-content directory.
     1033 *
     1034 * @param string $file Filesystem path relative to the wp-content directory.
     1035 * @return string Full filesystem path to edit.
     1036 */
     1037function get_real_file_to_edit( $file ) {
     1038    _deprecated_function( __FUNCTION__, '2.9' );
     1039
     1040    return WP_CONTENT_DIR . $file;
     1041}
  • trunk/src/wp-admin/includes/file.php

    r25071 r25201  
    9595
    9696/**
    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  *
    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     if ('index.php' == $file || '.htaccess' == $file ) {
    112         $real_file = get_home_path() . $file;
    113     } else {
    114         $real_file = WP_CONTENT_DIR . $file;
    115     }
    116 
    117     return $real_file;
    118 }
    119 
    120 /**
    12197 * Returns a listing of all files in the specified folder and all subdirectories up to 100 levels deep.
    12298 * The depth of the recursiveness can be controlled by the $levels param.
Note: See TracChangeset for help on using the changeset viewer.