Warning: This function has been deprecated.

get_real_file_to_edit() WordPress Function

The get_real_file_to_edit() function is used by Wordpress to find the actual file to edit when a user is editing a file via the Wordpress admin. This function will first check if the user is editing a file in the Wordpress theme directory and if so, it will return the path to that file. If the user is not editing a file in the theme directory, the function will check if the user is editing a file in the Wordpress plugins directory and if so, it will return the path to that file. Finally, if the user is not editing a file in either the theme or plugins directory, the function will return the path to the Wordpress default theme file.

get_real_file_to_edit( string $file ) #

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


Parameters

$file

(string)(Required)Filesystem path relative to the wp-content directory.


Top ↑

Return

(string) Full filesystem path to edit.


Top ↑

Source

File: wp-admin/includes/deprecated.php

function get_real_file_to_edit( $file ) {
	_deprecated_function( __FUNCTION__, '2.9.0' );

	return WP_CONTENT_DIR . $file;
}


Top ↑

Changelog

Changelog
VersionDescription
2.9.0This function has been deprecated.
1.5.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More