_strip_template_file_suffix() – Strips .php or .html suffix from template file names.

You appear to be a bot. Output may be restricted

Description

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

Usage

$string = _strip_template_file_suffix( $template_file );

Parameters

$template_file
( string ) required – Template file name.

Returns

string Template file name without extension.

Source

File name: wordpress/wp-includes/block-template.php
Lines:

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

 View on GitHub View on Trac