'crearegroup',
'number' => '1',
'showlinks' => false,
'newwindow' => false,
'nofollow' => false,
'avatar' => false
), $atts ) );
//return "showlinks = {$showlinks}";
$twitter = new Creare_Twitter();
$twitter->screen_name = $username;
$twitter->not = $number;
$twitter->consumerkey = get_option('atfi_consumer_key');
$twitter->consumersecret = get_option('atfi_consumer_secret');
$twitter->accesstoken = get_option('atfi_access_token');
$twitter->accesstokensecret = get_option('atfi_access_token_secret');
if($showlinks=="true" && $showlinks != ""){
$twitter->tags = true; // show all html tags? FALSE = remove all tags
}
if($nofollow=="true" && $nofollow != ""){
$twitter->nofollow = true; // all links to be no-follow?
}
if($newwindow=="true" && $newwindow != ""){
$twitter->newwindow = true; // all links to open in new window?
}
if($avatar=="true" && $avatar != ""){
$twitter->showimage = true; // all links to open in new window?
}
$tweets = $twitter->getLatestTweets();
$html = '
";
return $html;
}
add_shortcode( 'get_tweet_timeline', 'get_tweet_timeline_func' );
function get_tweet_search_func( $atts ) {
extract( shortcode_atts( array(
'searchterm' => 'crearegroup',
'number' => '1',
'showlinks' => false,
'newwindow' => false,
'nofollow' => false,
'avatar' => false
), $atts ) );
//return "showlinks = {$showlinks}";
$twitter = new Creare_Twitter();
$twitter->searchterm = $searchterm;
$twitter->not = $number;
$twitter->consumerkey = get_option('atfi_consumer_key');
$twitter->consumersecret = get_option('atfi_consumer_secret');
$twitter->accesstoken = get_option('atfi_access_token');
$twitter->accesstokensecret = get_option('atfi_access_token_secret');
$twitter->cachefile = WP_RECENT_TWEETS_DIR."inc/twitter.txt";
$twitter->errorlog = WP_RECENT_TWEETS_DIR."inc/errors.txt";
if($showlinks=="true" && $showlinks != ""){
$twitter->tags = true; // show all html tags? FALSE = remove all tags
}
if($nofollow=="true" && $nofollow != ""){
$twitter->nofollow = true; // all links to be no-follow?
}
if($newwindow=="true" && $newwindow != ""){
$twitter->newwindow = true; // all links to open in new window?
}
if($avatar=="true" && $avatar != ""){
$twitter->showimage = true; // all links to open in new window?
}
$tweets = $twitter->getSearchTweets();
$html = '";
return $html;
}
add_shortcode( 'get_tweet_search', 'get_tweet_search_func' );