get_real_file_to_edit

Get the real filesystem path to a file to edit within the admin.

Description

(string) get_real_file_to_edit( (string) $file ); 

Returns (string)

Full filesystem path to edit.

Parameters (1)

0. $file (string)
Filesystem path relative to the wp-content directory.

Usage

  1. if ( !function_exists( 'get_real_file_to_edit' ) ) { 
  2. require_once ABSPATH . '/wp-admin/includes/deprecated.php'; 
  3.  
  4. // Filesystem path relative to the wp-content directory. 
  5. $file = ''; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = get_real_file_to_edit($file); 
  9.  

Defined (1)

The function is defined in the following location(s).

/wp-admin/includes/deprecated.php  
  1. function get_real_file_to_edit( $file ) { 
  2. _deprecated_function( __FUNCTION__, '2.9.0' ); 
  3.  
  4. return WP_CONTENT_DIR . $file;