You are here

function panopoly_widgets_update_7021 in Panopoly Widgets 7

Grant new tablefield permission to admin roles. Update field settings.

File

./panopoly_widgets.install, line 453
An installation file for Panopoly Widgets

Code

function panopoly_widgets_update_7021() {

  // Make sure new permissions from tablefield get added to the admin role.
  if (function_exists('user_modules_installed')) {
    user_modules_installed(array(
      'tablefield',
    ));
  }
  $instance_info = field_info_instance('fieldable_panels_pane', 'field_basic_table_table', 'table');
  $instance_info['display']['default']['settings']['sticky_header'] = 1;
  $instance_info['display']['default']['settings']['striping'] = 1;
  $instance_info['display']['default']['settings']['trim_trailing_cols'] = 1;
  $instance_info['display']['default']['settings']['trim_trailing_rows'] = 1;
  field_update_instance($instance_info);
}