twentyfifteen_get_color_schemes

Register color schemes for Twenty Fifteen.

Description

(array) twentyfifteen_get_color_schemes(); 

Can be filtered with .

The order of colors in a colors array: 1. Main Background Color. 2. Sidebar Background Color. 3. Box Background Color. 4. Main Text and Link Color. 5. Sidebar Text and Link Color. 6. Meta Box Background Color.

Returns (array)

An associative array of color scheme options.


Usage

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

Defined (1)

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

/inc/customizer.php  
  1. function twentyfifteen_get_color_schemes() { 
  2. /** 
  3. * Filter the color schemes registered for use with Twenty Fifteen. 
  4. * The default schemes include 'default', 'dark', 'yellow', 'pink', 'purple', and 'blue'. 
  5. * @since Twenty Fifteen 1.0 
  6. * @param array $schemes { 
  7. * Associative array of color schemes data. 
  8. * @type array $slug { 
  9. * Associative array of information for setting up the color scheme. 
  10. * @type string $label Color scheme label. 
  11. * @type array $colors HEX codes for default colors prepended with a hash symbol ('#'). 
  12. * Colors are defined in the following order: Main background, sidebar 
  13. * background, box background, main text and link, sidebar text and link,  
  14. * meta box background. 
  15. * } 
  16. * } 
  17. */ 
  18. return apply_filters( 'twentyfifteen_color_schemes', array( 
  19. 'default' => array( 
  20. 'label' => __( 'Default', 'twentyfifteen' ),  
  21. 'colors' => array( 
  22. '#f1f1f1',  
  23. '#ffffff',  
  24. '#ffffff',  
  25. '#333333',  
  26. '#333333',  
  27. '#f7f7f7',  
  28. ),  
  29. ),  
  30. 'dark' => array( 
  31. 'label' => __( 'Dark', 'twentyfifteen' ),  
  32. 'colors' => array( 
  33. '#111111',  
  34. '#202020',  
  35. '#202020',  
  36. '#bebebe',  
  37. '#bebebe',  
  38. '#1b1b1b',  
  39. ),  
  40. ),  
  41. 'yellow' => array( 
  42. 'label' => __( 'Yellow', 'twentyfifteen' ),  
  43. 'colors' => array( 
  44. '#f4ca16',  
  45. '#ffdf00',  
  46. '#ffffff',  
  47. '#111111',  
  48. '#111111',  
  49. '#f1f1f1',  
  50. ),  
  51. ),  
  52. 'pink' => array( 
  53. 'label' => __( 'Pink', 'twentyfifteen' ),  
  54. 'colors' => array( 
  55. '#ffe5d1',  
  56. '#e53b51',  
  57. '#ffffff',  
  58. '#352712',  
  59. '#ffffff',  
  60. '#f1f1f1',  
  61. ),  
  62. ),  
  63. 'purple' => array( 
  64. 'label' => __( 'Purple', 'twentyfifteen' ),  
  65. 'colors' => array( 
  66. '#674970',  
  67. '#2e2256',  
  68. '#ffffff',  
  69. '#2e2256',  
  70. '#ffffff',  
  71. '#f1f1f1',  
  72. ),  
  73. ),  
  74. 'blue' => array( 
  75. 'label' => __( 'Blue', 'twentyfifteen' ),  
  76. 'colors' => array( 
  77. '#e9f2f9',  
  78. '#55c3dc',  
  79. '#ffffff',  
  80. '#22313f',  
  81. '#ffffff',  
  82. '#f1f1f1',  
  83. ),  
  84. ),  
  85. ) );