Christopher Ditto
Forum Replies Created
-
Playing Vimeo videos from an HTTPS page still doesn’t work for me. The https URL passes verification (is_url function) within the plugin but the vimeo URLs don’t change to https (which is necessary for it to work).
Here’s what I changed in the plugin to get it to work for Vimeo:
Changed:
$iframeurl = ‘https://player.vimeo.com/video/’ . $videoid;
/* to */
$protocol = ‘http’;
if (strpos($content, ‘https://’) !== FALSE)
$protocol = ‘https’;
$iframeurl = $protocol.’://player.vimeo.com/video/’ . $videoid;and changed:
return ‘<span class=”vvqbox vvqvimeo” style=”‘ . esc_attr( ‘width:’ . $atts[‘width’] . ‘px;height:’ . $atts[‘height’] . ‘px;’ ) . ‘”><iframe id=”‘ . esc_attr( $objectid ) . ‘” src=”‘ . esc_url( $iframeurl ) . ‘” width=”‘ . esc_attr( $atts[‘width’] ) . ‘” height=”‘ . esc_attr( $atts[‘height’] ) . ‘” frameborder=”0″>‘ . esc_url( ‘https://www.vimeo.com/’ . $videoid ) . ‘</iframe></span>’;to
return ‘<span class=”vvqbox vvqvimeo” style=”‘ . esc_attr( ‘width:’ . $atts[‘width’] . ‘px;height:’ . $atts[‘height’] . ‘px;’ ) . ‘”><iframe id=”‘ . esc_attr( $objectid ) . ‘” src=”‘ . esc_url( $iframeurl ) . ‘” width=”‘ . esc_attr( $atts[‘width’] ) . ‘” height=”‘ . esc_attr( $atts[‘height’] ) . ‘” frameborder=”0″>‘ . esc_url( $protocol.’://www.vimeo.com/’ . $videoid ) . ‘</iframe></span>’;
Hope this helps someone.