Add customizer control to toggle Product Pagination

This commit is contained in:
Tiago Noronha 2018-04-17 19:16:06 +01:00
parent d04997e4f7
commit 49764a1499
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_product_pagination', array(
'default' => apply_filters( 'storefront_default_product_pagination', true ),
'sanitize_callback' => 'wp_validate_boolean',
) );
$wp_customize->add_control( 'storefront_product_pagination', array(
'type' => 'checkbox',
'section' => 'storefront_single_product_page',
'label' => __( 'Product Pagination', 'storefront' ),
'description' => __( 'Displays next and previous links on product pages. A product thumbnail is displayed with the title revealed on hover.', 'storefront' ),
) );
/**
* More
*/