_get_template_edit_filename( string $fullpath, string $containingfolder ): string

In this article

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.

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

Parameters

$fullpathstringrequired
Full path to the theme file
$containingfolderstringrequired
Path of the theme parent folder

Return

string

Source

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

Changelog

VersionDescription
2.9.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.