функция
since 5.8.0
_strip_template_file_suffix()
Проверено на WordPress 6.9, обновлено Источник: WordPress Developer Resources.
Сигнатура
_strip_template_file_suffix( string $template_file ): string
Описание
Удаляет суффикс .php или .html из имён файлов шаблонов.
Параметры
$template_file
string
обязательный
Имя файла шаблона.
Возвращаемое значение
string
Исходный код
wp-includes/block-template.php:423
function _strip_template_file_suffix( $template_file ) {
return preg_replace( '/\.(php|html)$/', '', $template_file );
}
История изменений
| Версия | Описание |
|---|---|
| 5.8.0 | Introduced. |

