You are here

function simpleads_update_7003 in SimpleAds 7

Modify block settings field.

File

./simpleads.updates.inc, line 344
SimpleAds Updates.

Code

function simpleads_update_7003(&$sandbox) {
  $t = get_t();
  db_change_field('simpleads_blocks', 'settings', 'settings', array(
    'type' => 'text',
    'not null' => TRUE,
    'description' => 'Serialized data (settings)',
  ));
  $instance = array(
    'field_name' => 'field_ad_text',
    'entity_type' => 'node',
    'label' => $t('Text Ad'),
    'bundle' => 'simpleads',
    'description' => $t('Enter your text ad. If you would like to embed media, please configure WYSIWYG editor and input format settings.'),
    'required' => FALSE,
    'settings' => array(
      'rows' => 5,
      'text_processing' => 1,
    ),
    'widget' => array(
      'type' => 'text_textarea',
      'settings' => array(),
      'weight' => 0,
      'module' => 'text',
    ),
    'display' => array(
      'default' => array(
        'label' => 'hidden',
        'type' => 'text_default',
        'weight' => -1,
        'module' => 'text',
      ),
      'teaser' => array(
        'label' => 'hidden',
        'type' => 'text_default',
        'weight' => -1,
      ),
    ),
  );
  field_update_instance($instance);
  $instance = array(
    'field_name' => 'field_ad_url',
    'entity_type' => 'node',
    'bundle' => 'simpleads',
    'label' => $t('URL Address'),
    'required' => FALSE,
    'widget' => array(
      'type' => 'text_textfield',
      'settings' => array(
        'size' => 60,
      ),
      'weight' => 1,
    ),
    'settings' => array(
      'text_processing' => 0,
    ),
    'display' => array(
      'default' => array(
        'label' => 'above',
        'type' => 'text_default',
        'settings' => array(),
      ),
    ),
  );
  field_update_instance($instance);
}