You are here

function environment_indicator_update_7201 in Environment Indicator 7.2

Add the default text color for existing environments.

File

./environment_indicator.install, line 147
Install implementation file.

Code

function environment_indicator_update_7201(&$sandbox) {
  module_load_include('inc', 'ctools', 'includes/export');
  $environments = ctools_export_crud_load_all('environment_indicator_environment');
  foreach ($environments as $machine => $environment) {
    if (!isset($environment->settings['text_color'])) {
      $environment->settings['text_color'] = '#ffffff';
      ctools_export_crud_save('environment_indicator_environment', $environment);
    }
  }
}