You are here

function colors_rename_selector in Colors 7

Renames a given selector.

Parameters

$oldselector: The name of the given selector.

$newselector: The new name for the selector.

File

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

Code

function colors_rename_selector($old_selector, $new_selector) {
  db_update('colors')
    ->fields(array(
    'selector' => $new_selector,
  ))
    ->condition('selector', $old_selector)
    ->execute();
}