_get_template_edit_filename

The timeline below displays how wordpress function _get_template_edit_filename has changed across different WordPress versions. If a version is not listed, refer to the next available version below.

WordPress Version: 6.4

/**
 * Tidies a filename for url display by the theme file editor.
 *
 * @since 2.9.0
 * @access private
 *
 * @param string $fullpath Full path to the theme file
 * @param string $containingfolder Path of the theme parent folder
 * @return string
 */
function _get_template_edit_filename($fullpath, $containingfolder)
{
    return str_replace(dirname($containingfolder, 2), '', $fullpath);
}

WordPress Version: 5.9

/**
 * Tidies a filename for url display by the theme file editor.
 *
 * @since 2.9.0
 * @access private
 *
 * @param string $fullpath Full path to the theme file
 * @param string $containingfolder Path of the theme parent folder
 * @return string
 */
function _get_template_edit_filename($fullpath, $containingfolder)
{
    return str_replace(dirname(dirname($containingfolder)), '', $fullpath);
}

WordPress Version: 3.7

/**
 * Tidies a filename for url display by the theme editor.
 *
 * @since 2.9.0
 * @access private
 *
 * @param string $fullpath Full path to the theme file
 * @param string $containingfolder Path of the theme parent folder
 * @return string
 */
function _get_template_edit_filename($fullpath, $containingfolder)
{
    return str_replace(dirname(dirname($containingfolder)), '', $fullpath);
}