twentyfifteen_sanitize_color_scheme

Sanitization callback for color schemes.

Description

(string) twentyfifteen_sanitize_color_scheme( (string) $value ); 

Returns (string)

Color scheme name.

Parameters (1)

0. $value (string)
Color scheme name value.

Usage

  1. if ( !function_exists( 'twentyfifteen_sanitize_color_scheme' ) ) { 
  2. require_once '/inc/customizer.php'; 
  3.  
  4. // Color scheme name value. 
  5. $value = ''; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = twentyfifteen_sanitize_color_scheme($value); 
  9.  

Defined (1)

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

/inc/customizer.php  
  1. function twentyfifteen_sanitize_color_scheme( $value ) { 
  2.  
  3. if ( ! array_key_exists( $value, $color_schemes ) ) { 
  4. $value = 'default'; 
  5.  
  6. return $value;