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 8.7.0
public static function generate_template_slug_from_path( $path ) { $template_extension = '.html'; return basename( $path, $template_extension ); }