You are here

function custom_pub_update_6130 in Custom Publishing Options 6

Implements hook_update_N().

File

./custom_pub.install, line 44
Install and update functions for Custom Publishing Options.

Code

function custom_pub_update_6130() {
  $types = variable_get('custom_pub_types', array());
  $node_types = node_get_types();
  foreach ($types as $type) {
    foreach ($node_types as $node_type) {
      if (!empty($type['node_types'][$node_type->type])) {
        $type['node_types'][$node_type->type] = $node_type->name;
      }
    }
    $types[$type['type']] = $type;
  }
  variable_set('custom_pub_types', $types);
  drupal_set_message('Updated Custom Publishing Options');
  return array();
}