_strip_template_file_suffix( string $template_file ): string
- Since
- 5.8.0
- Source
wp-includes/block-template.php:423
Strips .php or .html suffix from template file names.
Parameters
$template_filestring- Template file name.
Return
string- Template file name without extension.
Source
function _strip_template_file_suffix( $template_file ) { return preg_replace( '/\.(php|html)$/', '', $template_file );}History
Introduced in 5.8.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
About this page
- Parsed data
- Generated from the wordpress-develop 7.1.0 tag, from
src/wp-includes/block-template.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it. - Corrections
- Something wrong on this page? Report it and it gets fixed in the next regeneration.