You are here

function party_log_update_7001 in Party 7

Add the Message Text field to our message_type bundle.

File

modules/party_log/party_log.install, line 82
Install hooks for the Party Logging module.

Code

function party_log_update_7001() {
  if (!field_info_instance('message_type', MESSAGE_FIELD_MESSAGE_TEXT, 'party_log')) {
    $instance = array(
      'field_name' => MESSAGE_FIELD_MESSAGE_TEXT,
      'bundle' => 'party_log',
      'entity_type' => 'message_type',
      'label' => t('Message text'),
      'description' => t('This is the text of all messages of this type.'),
      'required' => TRUE,
      'settings' => array(
        'text_processing' => 1,
      ),
    );
    field_create_instance($instance);
  }
}