[ Index ]

WordPress 5.4.1

[ Index ]     [ Classes ]     [ Functions ]     [ Variables ]     [ Constants ]     [ Statistics ]    

title

Body

[close]

/wp-content/themes/twentynineteen/js/ -> customize-controls.js (source)

   1  /**
   2   * File customize-controls.js.
   3   *
   4   * Theme Customizer enhancements for a better user experience.
   5   *
   6   * Contains handlers to make Theme Customizer preview reload changes asynchronously.
   7   */
   8  
   9  (function() {
  10  
  11      wp.customize.bind( 'ready', function() {
  12  
  13          // Only show the color hue control when there's a custom primary color.
  14          wp.customize( 'primary_color', function( setting ) {
  15              wp.customize.control( 'primary_color_hue', function( control ) {
  16                  var visibility = function() {
  17                      if ( 'custom' === setting.get() ) {
  18                          control.container.slideDown( 180 );
  19                      } else {
  20                          control.container.slideUp( 180 );
  21                      }
  22                  };
  23  
  24                  visibility();
  25                  setting.bind( visibility );
  26              });
  27          });
  28      });
  29  
  30  })();


Generated: Tue May 19 15:51:04 2020 Cross-referenced by PHPXref 0.7.1