public function twitter($what, $text=null, $class=null) {
		if (is_null($text)) {
			$text = $what;
		}

		$attributes = $this->getHtmlAttributes(array('class'=>$class));

		if (substr($what,0,1)=='@') {
			$link = "https://www.twitter.com/" . ltrim($what, '@');
		} elseif (substr($what,0,1)=='#') {
			$parts = explode(' ', $what);
			if (count($parts)>1) {
				$link = "https://twitter.com/search?q=" . urlencode($what);
			} else {
				$link = "https://www.twitter.com/hashtag/" . ltrim($what, '#');
			}
		}

		return "<a href='$link'$attributes>$text</a>";
	}
public function twitter($what, $text=null, $class=null) {
		if (is_null($text)) {
			$text = $what;
		}

		$attributes = $this->getHtmlAttributes(array('class'=>$class));

		if (substr($what,0,1)=='@') {
			$link = "https://www.twitter.com/" . ltrim($what, '@');
		} elseif (substr($what,0,1)=='#') {
			$parts = explode(' ', $what);
			if (count($parts)>1) {
				$link = "https://twitter.com/search?q=" . urlencode($what);
			} else {
				$link = "https://www.twitter.com/hashtag/" . ltrim($what, '#');
			}
		}

		return "<a href='$link'$attributes>$text</a>";
	}
public function twitter ( $ what , $ text = null , $ class = null ) { if ( is_null ( $ text ) ) { $ text = $ what ; } $ attributes = $ this -> getHtmlAttributes ( array ( 'class' => $ class ) ) ; if ( substr ( $ what , 0 , 1 ) == '@' ) { $ link = "https://www.twitter.com/" . ltrim ( $ what , '@' ) ; } elseif ( substr ( $ what , 0 , 1 ) == '#' ) { $ parts = explode ( ' ' , $ what ) ; if ( count ( $ parts ) > 1 ) { $ link = "https://twitter.com/search?q=" . urlencode ( $ what ) ; } else { $ link = "https://www.twitter.com/hashtag/" . ltrim ( $ what , '#' ) ; } } return "<a href='$link'$attributes>$text</a>" ; }
Implements the 'twitter' snippet
Implements the twitter snippet