wpseek.com
WordPress开发者和主题制作者的搜索引擎



_strip_template_file_suffix › WordPress Function

Since5.8.0
已弃用n/a
_strip_template_file_suffix ( $template_file )
访问:
  • private
参数:
  • (string) $template_file Template file name.
    Required: Yes
返回:
  • (string) Template file name without extension.
定义在:
文档:

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



源码

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