You are here

function delta_theme_overrides_form_submit in Delta 7

Same name and namespace in other branches
  1. 6 delta.module \delta_theme_overrides_form_submit()

Process main blocks administration form submission.

File

./delta.module, line 323
The Delta Theme API is an advanced manipulation of the Theme Settings API to allow for customization/configuration of theme settings based on node types, context, or groups of paths.

Code

function delta_theme_overrides_form_submit($form, &$form_state) {

  // here we will be updating the default weight AND the assigned template
  foreach ($form_state['values'] as $delta) {
    if (is_array($delta)) {
      db_query("\n        UPDATE {delta_theme_overrides} \n        SET weight = %d, tid = %d \n        WHERE did = %d", $delta['weight'], $delta['theme_settings_template'], $delta['did']);
    }
  }
  drupal_set_message(t('The Delta API settings have been updated.'));
}