tweet.install in Tweet 5.2
Same filename and directory in other branches
Builds links to post pages to twitter.
File
tweet.installView source
<?php
/**
* @file
* Builds links to post pages to twitter.
*/
/**
* Implementation of hook_update_N().
*/
function hook_update_5200() {
$format = '[url] ';
if (variable_get('tweet_title', 1)) {
$format .= '[title]';
}
if (variable_get('tweet_hashtag', '')) {
if (drupal_substr($format, -1, 1) != ' ') {
$format .= ' ';
}
$format .= variable_get('tweet_hashtag', '');
}
variable_set('tweet_format', $format);
variable_del('tweet_title', 1);
variable_del('tweet_hashtag', '');
return array();
}
/**
* Implementation of hook_uninstall().
*/
function tweet_uninstall() {
variable_del('tweet_service_backup');
variable_del('tweet_new_window');
variable_del('tweet_exclude');
variable_del('tweet_method');
variable_del('tweet_service');
variable_del('tweet_format');
variable_del('tweet_image');
variable_del('tweet_teaser');
variable_del('tweet_types');
variable_del('tweet_node');
}
Functions
Name![]() |
Description |
---|---|
hook_update_5200 | Implementation of hook_update_N(). |
tweet_uninstall | Implementation of hook_uninstall(). |