/* Vimeo code */
$pattern[]="/\[vimeo=null\]/i";
$replacement[]='';

//default size
$pattern[]="/\[vimeo=http[s]*:\/(\/www\.|\/)vimeo\.com\/([0-9]+)\]/i";
$replacement[]="<div class=\"ytc\"><iframe src=\"//player.vimeo.com/video/\\2\" width=\"400\" height=\"225\" frameborder=\"0\" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe></div>";

//with size
$pattern[]="/\[vimeo([1-7][0-9][0-9])x([1-5][0-9][0-9])=http[s]*:\/(\/www\.|\/)vimeo\.com\/([0-9]+)\]/i";
$replacement[]="<div class=\"ytc\"><iframe src=\"//player.vimeo.com/video/\\4\" width=\"\\1\" height=\"\\2\" frameborder=\"0\" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe></div>";

//straight HTML iframe
$pattern[]="/&lt;iframe src=&quot;https:\/\/player\.vimeo\.com\/video\/([0-9]+)(.*)&quot; width=&quot;([1-7][0-9][0-9])&quot; height=&quot;([1-5][0-9][0-9])&quot; frameborder=&quot;0&quot; webkitAllowFullScreen mozallowfullscreen allowfullscreen&gt;&lt;\/iframe&gt;[\r\n]*&lt;p&gt;(.*?)&lt;\/p&gt;/is";
$replacement[]="<div class=\"ytc\"><iframe src=\"https://player.vimeo.com/video/\\1\" width=\"\\3\" height=\"\\4\" frameborder=\"0\" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe></div>";
/* --Vimeo code */