twentyfifteen_color_schemes

Filter the color schemes registered for use with Twenty Fifteen.

Description

apply_filters( 'twentyfifteen_color_schemes', (callback) $array ); 

The default schemes include default,, dark., yellow, pink, purple, and blue.

Parameters (1)

0. $array — Optional. (callback) => array( 'default' => array( 'label' => __( 'Default', 'twentyfifteen' ), 'colors' => array( '#f1f1f1', '#ffffff', '#ffffff', '#333333', '#333333', '#f7f7f7', ), ), 'dark' => array( 'label' => __( 'Dark', 'twentyfifteen' ), 'colors' => array( '#111111', '#202020', '#202020', '#bebebe', '#bebebe', '#1b1b1b', ), ), 'yellow' => array( 'label' => __( 'Yellow', 'twentyfifteen' ), 'colors' => array( '#f4ca16', '#ffdf00', '#ffffff', '#111111', '#111111', '#f1f1f1', ), ), 'pink' => array( 'label' => __( 'Pink', 'twentyfifteen' ), 'colors' => array( '#ffe5d1', '#e53b51', '#ffffff', '#352712', '#ffffff', '#f1f1f1', ), ), 'purple' => array( 'label' => __( 'Purple', 'twentyfifteen' ), 'colors' => array( '#674970', '#2e2256', '#ffffff', '#2e2256', '#ffffff', '#f1f1f1', ), ), 'blue' => array( 'label' => __( 'Blue', 'twentyfifteen' ), 'colors' => array( '#e9f2f9', '#55c3dc', '#ffffff', '#22313f', '#ffffff', '#f1f1f1', ), ), )

Usage

To run the hook, copy the example below.
  1. $array = apply_filters( 'twentyfifteen_color_schemes', $array ); 
  2.  
  3. if ( !empty( $array ) ) { 
  4.  
  5. // everything has led up to this point... 
  6.  
  7.  
The following example is for adding a hook callback.
  1. // define the twentyfifteen_color_schemes callback 
  2. function filter_twentyfifteen_color_schemes( $array ) { 
  3. // make filter magic happen here... 
  4. return $array
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'twentyfifteen_color_schemes', 'filter_twentyfifteen_color_schemes', 10, 1 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'twentyfifteen_color_schemes', 'filter_twentyfifteen_color_schemes', 10, 1 ); 

Defined (1)

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

/inc/customizer.php  
  1. return apply_filters( 'twentyfifteen_color_schemes', array(