Switch language

wpseek.com
A WordPress-centric search engine for devs and theme authors




get_real_file_to_edit [ WordPress Function ]

get_real_file_to_edit ( $file )
Parameters:
  • (string) $file filesystem path relative to the WordPress install directory or to the wp-content directory
Uses:
Returns:
  • (string) full file system path to edit
Defined at:



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

Source


<?php
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;
}
?>

Examples [ wp-snippets.com ]

Top Google zoekresultaten

Meer ...

Gebruikersdiscussies [ wordpress.org ]

0 User Note(s)

Nog geen één. Wees de eerste!

Nieuw toevoegen ...



HTML5 Powered with CSS3 / Styling, Performance & Integration, and Semantics