Hi.
I’m trying to use PurpleChamber’s solution for Vimeo but keep getting an error code message at the end of the php document.
‘syntax error on line 718’ which refers to this ?> Its the final line of code in the file however removing it creates more problems.
Here is the code I’ve changed it to based on the snippy above. There seems to be some problem with it. To be honest I’m not that smart with php so I’m sure its something obvious but I don’t know what. If anyone can help it would be appreciated.
// Now if we've found a Vimeo ID, let's set the thumbnail URL
if ( isset( $matches[1] ) ) {
$vimeo_thumbnail = getVimeoInfo( $matches[1], $info = 'thumbnail_large' );
if ( is_wp_error( $vimeo_thumbnail ) ) {
return $vimeo_thumbnail;
} else if ( isset( $vimeo_thumbnail ) ) {
$vimeo_960thumb = str_replace('_640.', '_960.', $vimeo_thumbnail);
$vimeo_1280thumb = str_replace('_640.', '_1280.', $vimeo_thumbnail);
if ( false === getimagesize($vimeo_1280thumb) ) {
if ( false === getimagesize($vimeo_960thumb) ) {
$new_thumbnail = $vimeo_thumbnail;
} else {
$new_thumbnail = $vimeo_960thumb;
}
} else {
$new_thumbnail = $vimeo_1280thumb;
}
}
}
}
// Blip.tv
if ( $new_thumbnail == null ) {