Automattic\WooCommerce\Blocks\Utils
BlockTemplateUtils::generate_template_slug_from_path
Converts template paths into a slug
Метод класса: BlockTemplateUtils{}
Хуков нет.
Возвращает
Строку. slug
Использование
$result = BlockTemplateUtils::generate_template_slug_from_path( $path );
- $path(строка) (обязательный)
- The template's path.
Код BlockTemplateUtils::generate_template_slug_from_path() BlockTemplateUtils::generate template slug from path WC 11.0.1
public static function generate_template_slug_from_path( $path ) {
$template_extension = '.html';
return basename( $path, $template_extension );
}