芝麻web文件管理V1.00
'; //
}
}
if ( ! function_exists( 'boldthemes_thumb_cols' ) ) {
function boldthemes_thumb_cols() {
return 3; // .last class applied to every 4th thumbnail
}
}
if ( ! function_exists( 'boldthemes_thumb_size' ) ) {
function boldthemes_thumb_size() {
return 'thumbnail'; // .last class applied to every 4th thumbnail
}
}
/**
* Adds click to header dropdown cart
*/
if ( ! function_exists( 'boldthemes_woocommerce_header_add_to_cart_fragment' ) ) {
function boldthemes_woocommerce_header_add_to_cart_fragment( $fragments ) {
ob_start(); ?>
cart->get_cart_contents_count(); ?>
get_average_rating() ) ) {
$subtitle = $rating_html;
}
if ( $subtitle == '' ) {
$subtitle = ''; ;
}
$categories = wp_get_post_terms( $product->get_id(), 'product_cat' );
$supertitle = boldthemes_get_post_categories( array( 'categories' => $categories ) );
$dash = boldthemes_get_option( 'shop_use_dash' ) ? apply_filters( 'boldthemes_product_list_headline_dash', 'bottom' ) : "";
echo wp_kses_post( boldthemes_get_heading_html(
array(
'superheadline' => $supertitle,
'headline' => get_the_title(),
'subheadline' => $subtitle,
'size' => apply_filters( 'boldthemes_product_list_headline_size', 'extrasmall' ),
'dash' => $dash,
'url' => get_permalink()
)
) );
}
}
/**
* Show the single product title
*/
if ( ! function_exists( 'woocommerce_template_product_title' ) ) {
function woocommerce_template_product_title( $supertitle, $title, $subtitle, $dash ) {
if ( boldthemes_get_option( 'hide_headline' ) == '1' ) {
echo wp_kses_post( boldthemes_get_heading_html(
array(
'superheadline' => $supertitle,
'headline' => $title,
'subheadline' => $subtitle,
'size' => apply_filters( 'boldthemes_product_headline_size', 'normal' ),
'dash' => $dash,
'html_tag' => apply_filters( 'boldthemes_product_headline_tag', 'h2' ),
)
) );
} else {
global $post, $product;
if ( wc_product_sku_enabled() && ( $product->get_sku() || $product->is_type( 'variable' ) ) ) {
$sku = $product->get_sku() ? $product->get_sku() : esc_html__( 'N/A', 'nifty' );
if ( boldthemes_get_option( 'hide_headline' ) == '1' ) {
echo ' ' . esc_html__( 'SKU:', 'nifty' ) . ' ' . $sku . '';
}
echo '';
}
}
}
}
if ( ! function_exists( 'woocommerce_get_product_thumbnail' ) ) {
/**
* Get the product thumbnail, or the placeholder if not set.
*
* @subpackage Loop
* @param string $size (default: 'woocommerce_thumbnail')
* @param int $deprecated1 Deprecated since WooCommerce 2.0 (default: 0)
* @param int $deprecated2 Deprecated since WooCommerce 2.0 (default: 0)
* @return string
*/
function woocommerce_get_product_thumbnail( $size = 'woocommerce_thumbnail', $deprecated1 = 0, $deprecated2 = 0 ) {
global $post;
if ( has_post_thumbnail() ) {
$thumbnail_id = get_post_thumbnail_id( $post->ID );
if ( $thumbnail_id ){
return boldthemes_get_image_html(
array(
'image' => $thumbnail_id,
'caption_title' => '',
'caption_text' => '',
'content' => '',
'size' => $size,
'shape' => '',
'url' => get_post_permalink(),
'target' => '_self',
'show_titles' => false,
'el_style' => '',
'el_class' => ''
)
);
}
} elseif ( wc_placeholder_img_src() ) {
return wc_placeholder_img( $size );
}
}
}