Add customizer control to toggle Sticky Add-To-Cart

This commit is contained in:
Tiago Noronha 2018-04-17 18:59:10 +01:00
parent b4003bb919
commit 9affabc33c
2 changed files with 21 additions and 1 deletions

View file

@ -442,6 +442,26 @@ if ( ! class_exists( 'Storefront_Customizer' ) ) :
),
) ) );
/**
* Product Page
*/
$wp_customize->add_section( 'storefront_single_product_page' , array(
'title' => __( 'Product Page', 'storefront' ),
'priority' => 60,
) );
$wp_customize->add_setting( 'storefront_sticky_add_to_cart', array(
'default' => apply_filters( 'storefront_default_sticky_add_to_cart', true ),
'sanitize_callback' => 'wp_validate_boolean',
) );
$wp_customize->add_control( 'storefront_sticky_add_to_cart', array(
'type' => 'checkbox',
'section' => 'storefront_single_product_page',
'label' => __( 'Sticky Add-To-Cart', 'storefront' ),
'description' => __( 'A small content bar at the top of the browser window which includes relevant product information and an add-to-cart button. It slides into view once the standard add-to-cart button has scrolled out of view.', 'storefront' ),
) );
/**
* More
*/