twentyfifteen_color_scheme_css_template

Output an Underscore template for generating CSS for the color scheme.

Description

twentyfifteen_color_scheme_css_template(); 

The template generates the css dynamically for instant display in the Customizer preview.


Usage

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

Defined (1)

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

/inc/customizer.php  
  1. function twentyfifteen_color_scheme_css_template() { 
  2. $colors = array( 
  3. 'background_color' => '{{ data.background_color }}',  
  4. 'header_background_color' => '{{ data.header_background_color }}',  
  5. 'box_background_color' => '{{ data.box_background_color }}',  
  6. 'textcolor' => '{{ data.textcolor }}',  
  7. 'secondary_textcolor' => '{{ data.secondary_textcolor }}',  
  8. 'border_color' => '{{ data.border_color }}',  
  9. 'border_focus_color' => '{{ data.border_focus_color }}',  
  10. 'sidebar_textcolor' => '{{ data.sidebar_textcolor }}',  
  11. 'sidebar_border_color' => '{{ data.sidebar_border_color }}',  
  12. 'sidebar_border_focus_color' => '{{ data.sidebar_border_focus_color }}',  
  13. 'secondary_sidebar_textcolor' => '{{ data.secondary_sidebar_textcolor }}',  
  14. 'meta_box_background_color' => '{{ data.meta_box_background_color }}',  
  15. ); 
  16. ?> 
  17. <script type="text/html" id="tmpl-twentyfifteen-color-scheme"> 
  18. <?php echo twentyfifteen_get_color_scheme_css( $colors ); ?> 
  19. </script> 
  20. <?php