wpseek.com
A WordPress-centric search engine for devs and theme authors



_strip_template_file_suffix › WordPress Function

Since5.8.0
Deprecatedn/a
_strip_template_file_suffix ( $template_file )
Access:
  • private
Parameters:
  • (string) $template_file Template file name.
    Required: Yes
Returns:
  • (string) Template file name without extension.
Defined at:
Codex:

Strips .php or .html suffix from template file names.



Source

function _strip_template_file_suffix( $template_file ) {
	return preg_replace( '/\.(php|html)$/', '', $template_file );
}