color_get_info($theme)
Retrieves the Color module information for a particular theme.
File
- core/modules/color/color.module, line 139
- Allows users to change the color scheme of themes.
Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | function color_get_info( $theme ) { static $theme_info = array (); if (isset( $theme_info [ $theme ])) { return $theme_info [ $theme ]; } $path = drupal_get_path( 'theme' , $theme ); $file = \Drupal::root() . '/' . $path . '/color/color.inc' ; if ( $path && file_exists ( $file )) { include $file ; // Add in default values. $info += array ( // CSS files (excluding @import) to rewrite with new color scheme. 'css' => array (), // Files to copy. 'copy' => array (), // Gradient definitions. 'gradients' => array (), // Color areas to fill (x, y, width, height). 'fill' => array (), // Coordinates of all the theme slices (x, y, width, height) with their // filename as used in the stylesheet. 'slices' => array (), // Reference color used for blending. 'blend_target' => '#ffffff' , ); $theme_info [ $theme ] = $info ; return $info ; } } |
Please login to continue.