Skip to content

Commit

Permalink
Rename _strip_php_suffix to _strip_template_file_suffix
Browse files Browse the repository at this point in the history
  • Loading branch information
ockham committed May 25, 2021
1 parent cba7648 commit bf8d81e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/wp-includes/block-template.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ function resolve_block_template( $template_type, $template_hierarchy ) {
}

$slugs = array_map(
'_strip_php_suffix',
'_strip_template_file_suffix',
$template_hierarchy
);

Expand Down Expand Up @@ -189,15 +189,15 @@ function _block_template_viewport_meta_tag() {
}

/**
* Strips .php suffix from template file names.
* Strips .php or .html suffix from template file names.
*
* @access private
* @since 5.8.0
*
* @param string $template_file Template file name.
* @return string Template file name without extension.
*/
function _strip_php_suffix( $template_file ) {
function _strip_template_file_suffix( $template_file ) {
return preg_replace( '/\.(php|html)$/', '', $template_file );
}

Expand Down

0 comments on commit bf8d81e

Please sign in to comment.