1,
'class' => implode(' ', array_filter(array(
'button',
'product_type_' . $product->get_type(),
$product->is_purchasable() && $product->is_in_stock() ? 'add_to_cart_button' : '',
$product->supports('ajax_add_to_cart') ? 'ajax_add_to_cart' : '',
))),
);
$args = apply_filters('woocommerce_loop_add_to_cart_args', wp_parse_args($args, $defaults), $product);
wc_get_template('loop/add-to-cart.php', $args);
}
}
/**
* Remove title on shop main
*
* @return bool
*/
function aazeen_woocommerce_hide_page_title()
{
return false;
}
add_filter('woocommerce_breadcrumb_defaults', 'aazeen_woocommerce_breadcrumbs');
function aazeen_woocommerce_breadcrumbs()
{
return array(
'delimiter' => ' ',
'wrap_before' => '
',
'before' => '',
'after' => '',
'home' => _x('Home', 'breadcrumb', 'aazeen'),
);
}
if (! function_exists('aazeen_before_content')) {
/**
* Before Content
* Wraps all WooCommerce content in wrappers which match the theme markup
*
* @since 1.0.0
* @return void
*/
function aazeen_before_content()
{?>
';
}
}
if (! function_exists('aazeen_content_wrapper_end')) {
/**
* After Content
* Closes the wrapping divs
*
* @since 1.0.0
* @return void
*/
function aazeen_content_wrapper_end()
{
echo "";
}
}
if (is_active_sidebar('woocommerce-sidebar-aazeen')) {
if (! function_exists('aazeen_loop_columns')) {
/**
* Default loop columns on product archives
*
* @return integer products per row
* @since 1.0.0
*/
function aazeen_loop_columns()
{
return apply_filters('aazeen_loop_columns', 3); // 3 products per row
}
}
}
/**
* Change the layout before each single product listing
*/
function aazeen_woocommerce_before_shop_loop_item()
{
echo '';
}
/**
* Change the layout after each single product listing
*/
function aazeen_woocommerce_after_shop_loop_item()
{
echo '
';
}
/**
* Change the layout of the thumbnail on single product listing
*/
function aazeen_woocommerce_template_loop_product_thumbnail()
{
$thumbnail = get_the_post_thumbnail(null, 'aazeen-shop');
if (empty($thumbnail) && function_exists('wc_placeholder_img')) {
$thumbnail = wc_placeholder_img();
}
if (! empty($thumbnail)) {
?>
post_excerpt) : ?>
post_excerpt)); ?>