twentyfifteen_get_color_scheme

Get the current Twenty Fifteen color scheme.

Description

(array) twentyfifteen_get_color_scheme(); 

Returns (array)

An associative array of either the current or default color scheme hex values.


Usage

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

Defined (1)

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

/inc/customizer.php  
  1. function twentyfifteen_get_color_scheme() { 
  2. $color_scheme_option = get_theme_mod( 'color_scheme', 'default' ); 
  3. $color_schemes = twentyfifteen_get_color_schemes(); 
  4.  
  5. if ( array_key_exists( $color_scheme_option, $color_schemes ) ) { 
  6. return $color_schemes[ $color_scheme_option ]['colors']; 
  7.  
  8. return $color_schemes['default']['colors'];