_strip_template_file_suffix

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

WordPress Version: 5.8

/**
 * Strips .php or .html suffix from template file names.
 *
 * @access private
 * @since 5.8.0
 *
 * @param string $template_file Template file name.
 * @return string Template file name without extension.
 */
function _strip_template_file_suffix($template_file)
{
    return preg_replace('/\.(php|html)$/', '', $template_file);
}