You are here

function easy_social_admin_order_submit in Easy Social 7.2

Submit callback. Sorts Easy Social widgets.

See also

easy_social_admin_order()

File

includes/easy_social.admin.inc, line 606
Easy Social admin settings.

Code

function easy_social_admin_order_submit($form, &$form_state) {
  $order = array();
  foreach ($form_state['values']['widgets'] as $name => $value) {
    $order[$value['weight']] = $name;
  }
  ksort($order);
  $order = array_values($order);
  variable_set('easy_social_global_order', $order);

  // Display a message to the user.
  drupal_set_message(t('The configuration options have been saved.'));
}