Guest User

Untitled

a guest
May 24th, 2018
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.33 KB | None | 0 0
  1. $wp_customize->add_section(
  2. 'woo_enchancements',
  3. [
  4. 'title' => __( 'WooCommerce Enchancements', '_amnth' ),
  5. 'priority' => 32,
  6. 'active_callback' => 'is_woocommerce_active',
  7. 'description' => 'Must refresh the page after tweaking settings to see effects.'
  8. ]
  9. );
  10.  
  11. $wp_customize->add_setting(
  12. 'load_woo_custom_functionality',
  13. [
  14. 'default' => '0',
  15. 'transport' => 'refresh'
  16. ]
  17. );
  18.  
  19. $wp_customize->add_control(
  20. new WP_Customize_Control(
  21. $wp_customize,
  22. 'load_woo_custom_functionality_control',
  23. [
  24. 'label' => __( 'Load up Woo Enchancements?', '_amnth' ),
  25. 'section' => 'woo_enchancements',
  26. 'settings' => 'load_woo_custom_functionality',
  27. 'type' => 'checkbox',
  28. ]
  29. )
  30. );
  31.  
  32. $wp_customize->add_setting(
  33. 'display_woo_header',
  34. [
  35. 'default' => '0',
  36. 'transport' => 'refresh'
  37. ]
  38. );
  39.  
  40. $wp_customize->add_control(
  41. new WP_Customize_Control(
  42. $wp_customize,
  43. 'display_woo_header_control',
  44. [
  45. 'label' => __( 'Display Woo Header?', '_amnth' ),
  46. 'section' => 'woo_enchancements',
  47. 'settings' => 'display_woo_header',
  48. 'type' => 'checkbox',
  49. 'active_callback' => 'is_woocommerce_enchanced'
  50. ]
  51. )
  52. );
Add Comment
Please, Sign In to add comment