_strip_template_file_suffix()
Strips .php or .html suffix from template file names.
Внутренняя функция — эта функция рассчитана на использование самим ядром. Не рекомендуется использовать эту функцию в своем коде.
Хуков нет.
Возвращает
string. Template file name without extension.
Использование
_strip_template_file_suffix( $template_file );
- $template_file(строка) (обязательный)
- Template file name.
Список изменений
| С версии 5.8.0 | Введена. |
Код _strip_template_file_suffix() strip template file suffix WP 7.1
function _strip_template_file_suffix( $template_file ) {
return preg_replace( '/\.(php|html)$/', '', $template_file );
}