twentyfifteen_customize_control_js

Binds JS listener to make Customizer color_scheme control.

Description

twentyfifteen_customize_control_js(); 

Passes color scheme data as colorScheme global.


Usage

  1. if ( !function_exists( 'twentyfifteen_customize_control_js' ) ) { 
  2. require_once '/inc/customizer.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = twentyfifteen_customize_control_js(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/inc/customizer.php  
  1. function twentyfifteen_customize_control_js() { 
  2. wp_enqueue_script( 'color-scheme-control', get_template_directory_uri() . '/js/color-scheme-control.js', array( 'customize-controls', 'iris', 'underscore', 'wp-util' ), '20141216', true ); 
  3. wp_localize_script( 'color-scheme-control', 'colorScheme', twentyfifteen_get_color_schemes() );