芝麻web文件管理V1.00
编辑当前文件:/home/paymbalq/www/wp-content/plugins/woocommerce/src/Blocks/Templates/ProductAttributeTemplate.php
taxonomy ) && taxonomy_is_product_attribute( $queried_object->taxonomy ) ) { $compatibility_layer = new ArchiveProductTemplatesCompatibility(); $compatibility_layer->init(); $templates = get_block_templates( array( 'slug__in' => array( self::SLUG ) ) ); if ( isset( $templates[0] ) && BlockTemplateUtils::template_has_legacy_template_block( $templates[0] ) ) { add_filter( 'woocommerce_disable_compatibility_layer', '__return_true' ); } add_filter( 'woocommerce_has_block_template', '__return_true', 10, 0 ); } } /** * Renders the Product by Attribute template for product attributes taxonomy pages. * * @param array $templates Templates that match the product attributes taxonomy. */ public function update_taxonomy_template_hierarchy( $templates ) { $queried_object = get_queried_object(); if ( taxonomy_is_product_attribute( $queried_object->taxonomy ) && wc_current_theme_is_fse_theme() ) { array_splice( $templates, count( $templates ) - 1, 0, self::SLUG ); } return $templates; } }