_strip_template_file_suffix()
Strips .php or .html suffix from template file names.
Internal function — this function is designed to be used by the kernel itself. It is not recommended to use this function in your code.
No Hooks.
Return
String
. Template file name without extension.
Usage
_strip_template_file_suffix( $template_file );
- $template_file(string) (required)
- Template file name.
Changelog
Since 5.8.0 | Introduced. |
_strip_template_file_suffix() strip template file suffix code WP 6.7.1
function _strip_template_file_suffix( $template_file ) { return preg_replace( '/\.(php|html)$/', '', $template_file ); }