mirror of
https://github.com/woocommerce/storefront.git
synced 2025-08-21 04:11:59 +08:00
Add customizer control to toggle Sticky Add-To-Cart
This commit is contained in:
parent
b4003bb919
commit
9affabc33c
2 changed files with 21 additions and 1 deletions
|
@ -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
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue