You are here

function tweet_feed_uninstall in Tweet Feed 7.3

Same name and namespace in other branches
  1. 8.3 tweet_feed.install \tweet_feed_uninstall()
  2. 6 tweet_feed.install \tweet_feed_uninstall()
  3. 7 tweet_feed.install \tweet_feed_uninstall()
  4. 7.2 tweet_feed.install \tweet_feed_uninstall()
  5. 4.x tweet_feed.install \tweet_feed_uninstall()

Implements hook_uninstall().

File

./tweet_feed.install, line 180

Code

function tweet_feed_uninstall() {
  $content_types = array(
    'twitter_tweet_feed',
    'twitter_user_profile',
  );
  foreach ($content_types as $content_type) {

    // Clear out the content type
    $nids = array();
    $result = db_select('node', 'n')
      ->fields('n')
      ->condition('type', $content_type, '=')
      ->execute();
    if ($result
      ->rowCount() > 0) {
      node_type_delete($content_type);
    }
  }
  variable_del('tweet_feed_pull_data_from_feed');
  variable_del('tweet_feed_cron_last_feed');
}