Adding HTTPS support on twitter Avatar
-
The Kebo Twitter Feed doesn’t use https version of avatar.
Here is a little improve of list view (views/list.php:86-109) :
<p class="ktext"> <?php if ( 'avatar' == $instance['avatar'] ) : ?> <?php $profil_image = ''; if(isset( $tweet->retweeted_status )) { if($_SERVER['HTTPS'] === 'on') { $profil_image = $tweet->retweeted_status->user->profile_image_url_https; } else { $profil_image = $tweet->retweeted_status->user->profile_image_url; } } else { if($_SERVER['HTTPS'] === 'on') { $profil_image = $tweet->user->profile_image_url_https; } else { $profil_image = $tweet->user->profile_image_url; } } ?> <a href="https://twitter.com/<?php echo ( isset( $tweet->retweeted_status ) ) ? $tweet->retweeted_status->user->screen_name : $tweet->user->screen_name ; ?>" target="_blank"> <img class="kavatar" src="<?php echo $profil_image ; ?>" /> </a> <?php endif; ?> <?php echo ( ! empty( $tweet->retweeted_status ) ) ? $tweet->retweeted_status->text : $tweet->text ; ?> </p>Enjoy
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘Adding HTTPS support on twitter Avatar’ is closed to new replies.