Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $wp_customize->add_section(
- 'woo_enchancements',
- [
- 'title' => __( 'WooCommerce Enchancements', '_amnth' ),
- 'priority' => 32,
- 'active_callback' => 'is_woocommerce_active',
- 'description' => 'Must refresh the page after tweaking settings to see effects.'
- ]
- );
- $wp_customize->add_setting(
- 'load_woo_custom_functionality',
- [
- 'default' => '0',
- 'transport' => 'refresh'
- ]
- );
- $wp_customize->add_control(
- new WP_Customize_Control(
- $wp_customize,
- 'load_woo_custom_functionality_control',
- [
- 'label' => __( 'Load up Woo Enchancements?', '_amnth' ),
- 'section' => 'woo_enchancements',
- 'settings' => 'load_woo_custom_functionality',
- 'type' => 'checkbox',
- ]
- )
- );
- $wp_customize->add_setting(
- 'display_woo_header',
- [
- 'default' => '0',
- 'transport' => 'refresh'
- ]
- );
- $wp_customize->add_control(
- new WP_Customize_Control(
- $wp_customize,
- 'display_woo_header_control',
- [
- 'label' => __( 'Display Woo Header?', '_amnth' ),
- 'section' => 'woo_enchancements',
- 'settings' => 'display_woo_header',
- 'type' => 'checkbox',
- 'active_callback' => 'is_woocommerce_enchanced'
- ]
- )
- );
Add Comment
Please, Sign In to add comment