You are here

function command_buttons_update_7104 in Command Buttons 7

Update comman button field values.

File

./command_buttons.install, line 88

Code

function command_buttons_update_7104() {
  foreach (array(
    'lg' => 'large',
    'sm' => 'small',
    'xs' => 'mini',
  ) as $new => $old) {
    db_update('field_data_field_button_size')
      ->fields(array(
      'field_button_size_value' => 'btn-' . $new,
    ))
      ->condition('field_button_size_value', 'btn-' . $old)
      ->execute();
    db_update('field_revision_field_button_size')
      ->fields(array(
      'field_button_size_value' => 'btn-' . $new,
    ))
      ->condition('field_button_size_value', 'btn-' . $old)
      ->execute();
  }
}