'', 'id' =>'', 'class' =>'', 'width' =>'', 'height' =>'', 'mute' =>'', 'link' =>'', 'autoplay' =>'', 'loop' =>'', 'controls' =>'', 'position' => 'left' ),$args ); extract( $defaults ); self::$args = $defaults; if(is_numeric($width)) $width = $width.'px'; if(is_numeric($height)) $height = $height.'px'; $sid = ''; $class .= ' magee-vimeo'; if( $autoplay == 'yes'): $autoplay = '1'; else: $autoplay = '0'; endif; if( $loop == 'yes'): $loop = '1'; else: $loop = '0'; endif; if( $controls == 'yes'): $controls = '1'; else: $controls = '0'; endif; if( $mute == 'yes'): $mute = '1'; else: $mute = '0'; endif; if($link !== ''){ preg_match( '/[0-9]+/',$link,$match); $sid = $match[0]; } $out = "
"; if ($mute == 1) { wp_enqueue_script( 'jquery-froogaloop', 'https://f.vimeocdn.com/js/froogaloop2.min.js', array( 'jquery' ), null, // No version of the jQuery froogaloop2 Plugin. true ); } preg_match('/https/',$link,$link_match); if( $width == '100%' || $height == '100%' && $width == '' || $height == ''): if(implode($link_match) == ''){$out .= "" ; }else{ $out .= "";} $out .= '
'; else: if(implode($link_match) == ''){ $out .= "";}else{ $out .= ""; } $out .= ''; endif; if ($mute == 1) { $out .= ''; } return $out; } } new Magee_Vimeo(); endif;