public function vimeo($link, $width=480, $height=360, $portrait=true, $title=true, $byline=true) {
		$matches = array();
		$regexp = '/(https?:\/\/)?(www\.)?(player\.)?vimeo\.com\/([a-z]*\/)*(?\'video_id\'[0-9]{6,11})[?]?.*/';
		if (preg_match_all($regexp, $link, $matches)) {
			if (array_key_exists('video_id', $matches)) {
				$embed = "//player.vimeo.com/video/" . $matches['video_id'][0];

				$opts = array();
				if (!$this->isTrue($portrait)) { $opts[] = "portrait=0"; }
				if (!$this->isTrue($title))    { $opts[] = "title=0"; }
				if (!$this->isTrue($byline))   { $opts[] = "byline=0"; }
				if (count($opts)>0) {
					$embed .="?" . implode("&amp;", $opts);
				}

				return "<iframe width=\"$width\" height=\"$height\" src=\"$embed\" frameborder=\"0\" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>";
			}
		}
	}
public function vimeo($link, $width=480, $height=360, $portrait=true, $title=true, $byline=true) {
		$matches = array();
		$regexp = '/(https?:\/\/)?(www\.)?(player\.)?vimeo\.com\/([a-z]*\/)*(?\'video_id\'[0-9]{6,11})[?]?.*/';
		if (preg_match_all($regexp, $link, $matches)) {
			if (array_key_exists('video_id', $matches)) {
				$embed = "//player.vimeo.com/video/" . $matches['video_id'][0];

				$opts = array();
				if (!$this->isTrue($portrait)) { $opts[] = "portrait=0"; }
				if (!$this->isTrue($title))    { $opts[] = "title=0"; }
				if (!$this->isTrue($byline))   { $opts[] = "byline=0"; }
				if (count($opts)>0) {
					$embed .="?" . implode("&amp;", $opts);
				}

				return "<iframe width=\"$width\" height=\"$height\" src=\"$embed\" frameborder=\"0\" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>";
			}
		}
	}
public function vimeo ( $ link , $ width = 480 , $ height = 360 , $ portrait = true , $ title = true , $ byline = true ) { $ matches = array ( ) ; $ regexp = '/(https?:\/\/)?(www\.)?(player\.)?vimeo\.com\/([a-z]*\/)*(?\'video_id\'[0-9]{6,11})[?]?.*/' ; if ( preg_match_all ( $ regexp , $ link , $ matches ) ) { if ( array_key_exists ( 'video_id' , $ matches ) ) { $ embed = "//player.vimeo.com/video/" . $ matches [ 'video_id' ] [ 0 ] ; $ opts = array ( ) ; if ( ! $ this -> isTrue ( $ portrait ) ) { $ opts [ ] = "portrait=0" ; } if ( ! $ this -> isTrue ( $ title ) ) { $ opts [ ] = "title=0" ; } if ( ! $ this -> isTrue ( $ byline ) ) { $ opts [ ] = "byline=0" ; } if ( count ( $ opts ) > 0 ) { $ embed .= "?" . implode ( "&amp;" , $ opts ) ; } return "<iframe width=\"$width\" height=\"$height\" src=\"$embed\" frameborder=\"0\" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>" ; } } }
Implements the 'vimeo' snippet
Implements the vimeo snippet