Make WordPress Core


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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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.