WC_Brands_Block_Templates::get_product_brands_template()
Get the block template for Taxonomy Product Brand. First it attempts to load the last version from DB Otherwise it loads the file based template.
Метод класса: WC_Brands_Block_Templates{}
Хуков нет.
Возвращает
WP_Block_Template
. The taxonomy-product_brand template.
Использование
// private - только в коде основоного (родительского) класса $result = $this->get_product_brands_template( $template_type );
- $template_type(строка) (обязательный)
- The post_type for the template. Normally wp_template or wp_template_part.
Код WC_Brands_Block_Templates::get_product_brands_template() WC Brands Block Templates::get product brands template WC 9.6.1
private function get_product_brands_template( $template_type ) { $template_db = $this->get_product_brand_template_db(); if ( $template_db ) { return BlockTemplateUtilsDuplicated::gutenberg_build_template_result_from_post( $template_db ); } $template_path = BlockTemplateUtilsDuplicated::should_use_blockified_product_grid_templates() ? WC()->plugin_path() . '/templates/templates/blockified/taxonomy-product_brand.html' : WC()->plugin_path() . '/templates/templates/taxonomy-product_brand.html'; $template_file = BlockTemplateUtilsDuplicated::create_new_block_template_object( $template_path, $template_type, 'taxonomy-product_brand', false ); return BlockTemplateUtilsDuplicated::gutenberg_build_template_result_from_file( $template_file, $template_type ); }