content_admin_display_overview_form_submit

Versions
5
content_admin_display_overview_form_submit($form_id, $form_values)

Code

contributions/cck/content_admin.inc, line 395

<?php
function content_admin_display_overview_form_submit($form_id, $form_values) {
  $type = $form_values['type_name'];

  if (isset($form_values['fields'])) {
    foreach ($form_values['fields'] as $fieldname => $fieldvalues) {
      $display_settings = array();
      foreach ($fieldvalues as $key => $value) {
        $display_settings[$key] = $value;
      }

      db_query("UPDATE {node_field_instance} SET display_settings = '%s' WHERE type_name = '%s' AND field_name = '%s'",
        serialize($display_settings), $type, $fieldname);
    }
    content_clear_type_cache();
  }
  drupal_set_message(t('Your settings have been saved.'));
}
?>

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.
  • Web page addresses and e-mail addresses turn into links automatically.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Enter the characters shown in the image.