Alert: This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.

_get_template_edit_filename() WordPress Function

The _get_template_edit_filename() function is used to get the filename of a template that is currently being edited. This is useful for determining the name of the template that is currently being edited in the WordPress admin editor.

_get_template_edit_filename( string $fullpath, string $containingfolder ) #

Tidies a filename for url display by the theme file editor.


Parameters

$fullpath

(string)(Required)Full path to the theme file

$containingfolder

(string)(Required)Path of the theme parent folder


Top ↑

Return

(string)


Top ↑

Source

File: wp-admin/includes/theme.php

function _get_template_edit_filename( $fullpath, $containingfolder ) {
	return str_replace( dirname( dirname( $containingfolder ) ), '', $fullpath );
}

Top ↑

Changelog

Changelog
VersionDescription
2.9.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.