Skip to content

Instantly share code, notes, and snippets.

@nedSaf
Created February 26, 2015 12:39
Show Gist options
  • Save nedSaf/735793672f559217903a to your computer and use it in GitHub Desktop.
Save nedSaf/735793672f559217903a to your computer and use it in GitHub Desktop.
Add display mode.
/**
* Implements hook_entity_info_alter().
*
* Add "Activity stream" view mode.
*/
function c4m_message_entity_info_alter(&$entity_info) {
$entity_info['message']['view modes']['activity_stream'] = array(
'label' => t('Activity stream'),
'custom settings' => TRUE,
);
$entity_info['node']['view modes']['activity_stream'] = array(
'label' => t('Activity stream'),
'custom settings' => TRUE,
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment