You are here

function colors_colors_exist in Colors 7

Checks if there is a color configuration for this selector.

Parameters

$selector: The name of the selector.

Return value

TRUE if the selector has a color configuration FALSE if the selector doesn't have a color configuration

File

./colors.module, line 176
Provides an API to match selectors with a color configuration.

Code

function colors_colors_exist($selector) {
  $result = db_select('colors', 'c')
    ->fields('c', array(
    'color',
  ))
    ->condition('selector', $selector)
    ->execute()
    ->fetchField();
  return !empty($result);
}