You are here

function social_content_twitter_enable in Social Content 7

Implements hook_enable().

File

modules/twitter/social_content_twitter.install, line 10
Install/uninstall code for Social Content: Twitter.

Code

function social_content_twitter_enable() {
  module_load_include('inc', 'social_content_twitter', 'social_content_twitter.filters');
  $tweet_format = array(
    'format' => 'tweet',
    'name' => 'Tweet',
    'status' => 1,
  );
  foreach (social_content_twitter_filter_info() as $name => $filter) {
    $tweet_format['filters'][$name]['status'] = 1;
  }
  $tweet_format = (object) $tweet_format;
  filter_format_save($tweet_format);
}