%s
',
esc_url( $product->add_to_cart_url() ),
esc_attr( ( isset( $args['quantity'] ) ? $args['quantity'] : 1 ) ),
esc_attr( ( isset( $args['class'] ) ? $args['class'] : '' ) ),
( isset( $args['attributes'] ) ? wc_implode_html_attributes( $args['attributes'] ) : '' ),
esc_html( $product->add_to_cart_text() )
);
}
}
add_filter(
'woocommerce_loop_add_to_cart_link',
'amela_loop_add_to_cart_link',
10,
3
);
if ( !function_exists( 'amela_shop_page_title' ) ) {
/**
* Shop page title
*/
function amela_shop_page_title() {
if ( is_woocommerce() && !is_product() ) {
get_template_part( 'template-parts/page-title/page-title-shop' );
}
}
}
if ( !function_exists( 'amela_shop_get_sidebar' ) ) {
/**
* Display shop sidebar
*
* @uses amela_sidebar()
* @since 1.0.0
*/
function amela_shop_get_sidebar() {
if ( is_active_sidebar( 'amela-shop-sidebar' ) ) {
amela_sidebar( 'amela-shop-sidebar' );
}
}
}
if ( !function_exists( 'amela_shop_breadcrumbs' ) ) {
/**
* WooCommerce breadcrumbs
*/
function amela_shop_breadcrumbs() {
if ( !get_theme_mod( 'amela_settings_shop_breadcrumbs_show', true ) ) {
return;
}
woocommerce_breadcrumb();
}
}
if ( !function_exists( 'amela_shop_breadcrumb_delimiter' ) ) {
/**
* Change the breadcrumb separator
*/
function amela_shop_breadcrumb_delimiter( $defaults ) {
$defaults['delimiter'] = '';
return $defaults;
}
}
if ( !function_exists( 'amela_shop_tag_cloud_widget' ) ) {
/**
* Tag cloud font size
*/
function amela_shop_tag_cloud_widget( $args ) {
$args = array(
'smallest' => 10,
'largest' => 10,
'taxonomy' => 'product_tag',
);
return $args;
}
}
if ( !function_exists( 'amela_quantity_plus_sign' ) ) {
/**
* Quantity plus
*/
function amela_quantity_plus_sign() {
echo '';
}
}
if ( !function_exists( 'amela_quantity_minus_sign' ) ) {
/**
* Quantity minus
*/
function amela_quantity_minus_sign() {
echo '';
}
}
if ( !function_exists( 'amela_woocommerce_before_customer_login_form' ) ) {
/**
* My account before login form
*/
function amela_woocommerce_before_customer_login_form() {
echo '
';
}
}
if ( !function_exists( 'amela_woocommerce_after_customer_login_form' ) ) {
/**
* My account after login form
*/
function amela_woocommerce_after_customer_login_form() {
echo '