function colors_set_colors in Colors 7
Sets the color configuration for a given selector.
Parameters
$selector: The name of the selector.
$color: The updated color configuration.
2 calls to colors_set_colors()
- colors_install in ./
colors.install - Implements hook_install().
- _colors_set_colors in ./
colors.module - Wrapper function for colors_set_colors()
File
- ./
colors.module, line 213 - Provides an API to match selectors with a color configuration.
Code
function colors_set_colors($selector, $color, $module = 'colors') {
db_merge('colors')
->key(array(
'selector' => $selector,
))
->fields(array(
'color' => serialize($color),
'module' => $module,
))
->execute();
}