Skip to content

Commit 29dfb01

Browse files
authored
Merge pull request #9 from circuscode/bugfix/display-videos
Bugfix Display Videos
2 parents 0c71bde + 3a8184b commit 29dfb01

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

mathilda_painting.php

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -601,7 +601,17 @@ function mathilda_tweet_paint($date,$tweet,$id,$me,$image,$mention,$url,$hashtag
601601
$upload_dir = wp_upload_dir();
602602
$mathilda_images_dirname="mathilda-images";
603603
$mathilda_images_dirwithpath = $upload_dir['baseurl'].'/'.$mathilda_images_dirname .'/';
604-
$mathilda_content.='<img src="'.$mathilda_images_dirwithpath.$mathilda_tweet_image.'" alt="Tweet Image" class="mathilda-tweet-image"/>';
604+
$mathilda_content.='<img src="'.$mathilda_images_dirwithpath.$mathilda_tweet_image.'" alt="Tweet Image" class="mathilda-tweet-image"/>';
605+
606+
// Identify Video Tweet
607+
$video_extendedurl=$tweet_image[6];
608+
$is_video_url = strpos($video_extendedurl, 'video');
609+
if($is_video_url!==false) {
610+
$mathilda_content.='<span style="position:relative;top:7px;padding-left:50px;">';
611+
$mathilda_content.='Video: <a href="'.$tweet_image[6].'">'.$tweet_image[6].'</a>';
612+
$mathilda_content.="</span>";
613+
$mathilda_content.="&nbsp;<br/>";
614+
}
605615

606616
// Line Break for Tweet Galerys
607617
if($number_of_images>1) {

0 commit comments

Comments
 (0)