Version Description
- Added the option to List/Slider for the tweets. Now from the Slider option tweets can be show as a slider. A single tweet shows at a time after few second it will fade up by the next tweet.
Download this release
Release Info
Developer | vivacityinfotech.jaipur |
Plugin | WP twitter feeds |
Version | 1.4.2 |
Comparing to | |
See all releases |
Code changes from version 1.4.1 to 1.4.2
- README.txt +4 -1
- controller/twitter_widget.class.php +65 -1
- controller/widget_html.php +8 -1
- css/admin_style.min.css +12 -2
- wp-latest-twitter-tweets.php +1 -1
README.txt
CHANGED
@@ -5,7 +5,7 @@ Tags: wp twitter feeds,twitter feeds, twitter timeline,twitter widget,twitter w
|
|
5 |
Requires at least: 3.0
|
6 |
Tested up to: 3.9.1
|
7 |
License: GPLv2 or later
|
8 |
-
Stable tag: 1.4.
|
9 |
|
10 |
|
11 |
WP Twitter Feeds - A simple widget which lets you add your latest tweets in just a few clicks on your website.
|
@@ -87,6 +87,9 @@ Installation consists of following steps:
|
|
87 |
|
88 |
== Changelog ==
|
89 |
|
|
|
|
|
|
|
90 |
= 1.4.1 =
|
91 |
* Squashed some css style conflicts with wordpress theme.
|
92 |
|
5 |
Requires at least: 3.0
|
6 |
Tested up to: 3.9.1
|
7 |
License: GPLv2 or later
|
8 |
+
Stable tag: 1.4.2
|
9 |
|
10 |
|
11 |
WP Twitter Feeds - A simple widget which lets you add your latest tweets in just a few clicks on your website.
|
87 |
|
88 |
== Changelog ==
|
89 |
|
90 |
+
= 1.4.2 =
|
91 |
+
* Added the option to List/Slider for the tweets. Now from the Slider option tweets can be show as a slider. A single tweet shows at a time after few second it will fade up by the next tweet.
|
92 |
+
|
93 |
= 1.4.1 =
|
94 |
* Squashed some css style conflicts with wordpress theme.
|
95 |
|
controller/twitter_widget.class.php
CHANGED
@@ -1,5 +1,10 @@
|
|
1 |
<?php class wptt_TwitterTweets extends WP_Widget{
|
2 |
|
|
|
|
|
|
|
|
|
|
|
3 |
function form($instance){
|
4 |
$defaults=$this->get_defaults();
|
5 |
$instance = wp_parse_args( (array) $instance, $defaults );
|
@@ -19,6 +24,7 @@
|
|
19 |
$consumerKey = trim($instance['consumerKey']);
|
20 |
$intents_text = $instance['twitterIntentsText'];
|
21 |
$color_intents = $instance['intentColor'];
|
|
|
22 |
$showAvatar = $instance['showAvatar'];
|
23 |
$border_rad_avatar = $instance['border_rad'];
|
24 |
$tweet_border = $instance['tweet_border'];
|
@@ -51,6 +57,7 @@
|
|
51 |
, 'intentColor' => "#999999"
|
52 |
, 'showAvatar' => false
|
53 |
, 'border_rad' => false
|
|
|
54 |
);
|
55 |
return $data;
|
56 |
}
|
@@ -98,6 +105,7 @@
|
|
98 |
$instance['twitterIntents'] = $new_instance['twitterIntents'];
|
99 |
$instance['twitterIntentsText'] = $new_instance['twitterIntentsText'];
|
100 |
$instance['intentColor'] = strip_tags( $new_instance['intentColor'] );
|
|
|
101 |
$instance['consumerKey'] = trim($new_instance['consumerKey']);
|
102 |
$instance['consumerSecret'] = trim($new_instance['consumerSecret']);
|
103 |
$instance['accessToken'] = trim($new_instance['accessToken']);
|
@@ -144,6 +152,7 @@
|
|
144 |
$wpltf_wdgt_twitterIntents = isset( $instance['twitterIntents'] ) ? $instance['twitterIntents'] : false;
|
145 |
$wpltf_wdgt_twitterIntentsText = isset( $instance['twitterIntentsText'] ) ? $instance['twitterIntentsText'] : false;
|
146 |
$wpltf_wdgt_intentColor = $instance['intentColor'];
|
|
|
147 |
$wpltf_wdgt_showAvatar = isset( $instance['showAvatar'] ) ? $instance['showAvatar'] : false;
|
148 |
$wpltf_wdgt_border_rad = isset( $instance['border_rad'] ) ? $instance['border_rad'] : false;
|
149 |
$wpltf_wdgt_tewwt_border = isset( $instance['tweet_border'] ) ? $instance['tweet_border'] : 'false';
|
@@ -170,6 +179,16 @@
|
|
170 |
border-width: 1px;
|
171 |
border-style: solid;}</style>';
|
172 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
173 |
?> <ul class="fetched_tweets <?php echo $class;?>">
|
174 |
<?php
|
175 |
|
@@ -184,7 +203,8 @@
|
|
184 |
//$dataShowCount = ($wpltf_wdgt_dataShowCount != "true") ? "false" : "true";
|
185 |
$disp_screen_name = ($wpltf_wdgt_disp_scr_name != "true") ? "false" : "true";
|
186 |
$intents_text = $wpltf_wdgt_twitterIntentsText;
|
187 |
-
$color_intents = $wpltf_wdgt_intentColor;
|
|
|
188 |
$cache_transient = $wpltf_wdgt_timeRef;
|
189 |
$alter_ago_time = $wpltf_wdgt_timeAgo;
|
190 |
$twitterIntents = $wpltf_wdgt_twitterIntents;
|
@@ -354,10 +374,54 @@
|
|
354 |
<?php endif; ?>
|
355 |
</ul>
|
356 |
<?php
|
|
|
357 |
}
|
358 |
echo $after_widget;
|
359 |
}
|
360 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
361 |
}
|
362 |
|
363 |
?>
|
1 |
<?php class wptt_TwitterTweets extends WP_Widget{
|
2 |
|
3 |
+
/**
|
4 |
+
* Widget IDs using Slider display
|
5 |
+
*/
|
6 |
+
static $slider_ids = array();
|
7 |
+
|
8 |
function form($instance){
|
9 |
$defaults=$this->get_defaults();
|
10 |
$instance = wp_parse_args( (array) $instance, $defaults );
|
24 |
$consumerKey = trim($instance['consumerKey']);
|
25 |
$intents_text = $instance['twitterIntentsText'];
|
26 |
$color_intents = $instance['intentColor'];
|
27 |
+
$slide_style = $instance['slide_style'];
|
28 |
$showAvatar = $instance['showAvatar'];
|
29 |
$border_rad_avatar = $instance['border_rad'];
|
30 |
$tweet_border = $instance['tweet_border'];
|
57 |
, 'intentColor' => "#999999"
|
58 |
, 'showAvatar' => false
|
59 |
, 'border_rad' => false
|
60 |
+
, 'slide_style' => 'list'
|
61 |
);
|
62 |
return $data;
|
63 |
}
|
105 |
$instance['twitterIntents'] = $new_instance['twitterIntents'];
|
106 |
$instance['twitterIntentsText'] = $new_instance['twitterIntentsText'];
|
107 |
$instance['intentColor'] = strip_tags( $new_instance['intentColor'] );
|
108 |
+
$instance['slide_style'] = $new_instance['slide_style'];
|
109 |
$instance['consumerKey'] = trim($new_instance['consumerKey']);
|
110 |
$instance['consumerSecret'] = trim($new_instance['consumerSecret']);
|
111 |
$instance['accessToken'] = trim($new_instance['accessToken']);
|
152 |
$wpltf_wdgt_twitterIntents = isset( $instance['twitterIntents'] ) ? $instance['twitterIntents'] : false;
|
153 |
$wpltf_wdgt_twitterIntentsText = isset( $instance['twitterIntentsText'] ) ? $instance['twitterIntentsText'] : false;
|
154 |
$wpltf_wdgt_intentColor = $instance['intentColor'];
|
155 |
+
$wpltf_wdgt_slide_style = isset( $instance['slide_style'] ) ? $instance['slide_style'] : 'list';
|
156 |
$wpltf_wdgt_showAvatar = isset( $instance['showAvatar'] ) ? $instance['showAvatar'] : false;
|
157 |
$wpltf_wdgt_border_rad = isset( $instance['border_rad'] ) ? $instance['border_rad'] : false;
|
158 |
$wpltf_wdgt_tewwt_border = isset( $instance['tweet_border'] ) ? $instance['tweet_border'] : 'false';
|
179 |
border-width: 1px;
|
180 |
border-style: solid;}</style>';
|
181 |
}
|
182 |
+
|
183 |
+
if(isset($wpltf_wdgt_slide_style) && $wpltf_wdgt_slide_style=='slider'){
|
184 |
+
wp_enqueue_script('responsive-slides', plugins_url( '/js/responsiveslides.min.js' , dirname(__FILE__) ), array('jquery'));
|
185 |
+
self::$slider_ids[] = $widget_id;
|
186 |
+
$file_path = WP_PLUGIN_DIR . '/wp-twitter-feeds/views/slider.php';
|
187 |
+
add_action( 'wp_footer', array($this,'twitter_slider_script'), 90 );
|
188 |
+
include($file_path);
|
189 |
+
}
|
190 |
+
else{
|
191 |
+
|
192 |
?> <ul class="fetched_tweets <?php echo $class;?>">
|
193 |
<?php
|
194 |
|
203 |
//$dataShowCount = ($wpltf_wdgt_dataShowCount != "true") ? "false" : "true";
|
204 |
$disp_screen_name = ($wpltf_wdgt_disp_scr_name != "true") ? "false" : "true";
|
205 |
$intents_text = $wpltf_wdgt_twitterIntentsText;
|
206 |
+
$color_intents = $wpltf_wdgt_intentColor;
|
207 |
+
$slide_style = $wpltf_wdgt_slide_style;
|
208 |
$cache_transient = $wpltf_wdgt_timeRef;
|
209 |
$alter_ago_time = $wpltf_wdgt_timeAgo;
|
210 |
$twitterIntents = $wpltf_wdgt_twitterIntents;
|
374 |
<?php endif; ?>
|
375 |
</ul>
|
376 |
<?php
|
377 |
+
}//else loop
|
378 |
}
|
379 |
echo $after_widget;
|
380 |
}
|
381 |
|
382 |
+
|
383 |
+
/*
|
384 |
+
* Outputs Slider Javascript
|
385 |
+
* Shows a single tweet at a time, fading between them.
|
386 |
+
*/
|
387 |
+
public function twitter_slider_script() {
|
388 |
+
|
389 |
+
// Collect the IDs of all Widgets using the Slider display.
|
390 |
+
$widget_ids = wptt_TwitterTweets::$slider_ids;
|
391 |
+
|
392 |
+
foreach ( $widget_ids as $widget_id ) {
|
393 |
+
|
394 |
+
?>
|
395 |
+
<script type="text/javascript">
|
396 |
+
//<![CDATA[
|
397 |
+
jQuery(document).ready(function() {
|
398 |
+
|
399 |
+
timeout = jQuery( ".<?php echo $widget_id; ?>" ).data( "timeout" );
|
400 |
+
speed = jQuery( ".<?php echo $widget_id; ?>" ).data( "speed" );
|
401 |
+
|
402 |
+
jQuery( function($) {
|
403 |
+
jQuery( ".<?php echo $widget_id; ?>" ).responsiveSlides({
|
404 |
+
auto: true, // Boolean: Animate automatically, true or false
|
405 |
+
speed: speed, // Integer: Speed of the transition, in milliseconds
|
406 |
+
timeout: timeout, // Integer: Time between slide transitions, in milliseconds
|
407 |
+
pager: false, // Boolean: Show pager, true or false
|
408 |
+
nav: false, // Boolean: Show navigation, true or false
|
409 |
+
random: false, // Boolean: Randomize the order of the slides, true or false
|
410 |
+
pause: true // Boolean: Pause on hover, true or false
|
411 |
+
});
|
412 |
+
});
|
413 |
+
|
414 |
+
});
|
415 |
+
//]]>
|
416 |
+
</script>
|
417 |
+
<?php
|
418 |
+
|
419 |
+
}
|
420 |
+
|
421 |
+
}
|
422 |
+
|
423 |
+
|
424 |
+
|
425 |
}
|
426 |
|
427 |
?>
|
controller/widget_html.php
CHANGED
@@ -61,10 +61,17 @@ font-weight:bold;
|
|
61 |
<label for="<?php echo $this->get_field_id('intentColor'); ?>">Colour for Intent icons: <input class="intentColor widefat" id="<?php echo $this->get_field_id('intentColor'); ?>" name="<?php echo $this->get_field_name('intentColor'); ?>" type="text" value="<?php echo esc_attr($color_intents); ?>" /></label>
|
62 |
<div id="colorpicker"></div>
|
63 |
</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
64 |
<p>
|
65 |
<input class="checkbox" type="checkbox" value="true" <?php checked( ( isset( $instance['border_rad']) && ($instance['showAvatar'] == "true") ), true ); ?> id="<?php echo $this->get_field_id( 'border_rad' ); ?>" name="<?php echo $this->get_field_name( 'border_rad' ); ?>" />
|
66 |
<label for="<?php echo $this->get_field_id( 'border_rad' ); ?>">Circular Avatar image</label>
|
67 |
-
</p>
|
68 |
<p>
|
69 |
<input class="checkbox" type="checkbox" value="true" <?php checked( ( isset( $instance['showAvatar']) && ($instance['showAvatar'] == "true") ), true ); ?> id="<?php echo $this->get_field_id( 'showAvatar' ); ?>" name="<?php echo $this->get_field_name( 'showAvatar' ); ?>" />
|
70 |
<label for="<?php echo $this->get_field_id( 'showAvatar' ); ?>">Display avatar image</label>
|
61 |
<label for="<?php echo $this->get_field_id('intentColor'); ?>">Colour for Intent icons: <input class="intentColor widefat" id="<?php echo $this->get_field_id('intentColor'); ?>" name="<?php echo $this->get_field_name('intentColor'); ?>" type="text" value="<?php echo esc_attr($color_intents); ?>" /></label>
|
62 |
<div id="colorpicker"></div>
|
63 |
</p>
|
64 |
+
<p>
|
65 |
+
<label for="<?php echo $this->get_field_id( 'slide_style' ); ?>">Style:</label>
|
66 |
+
<select name="<?php echo $this->get_field_name( 'slide_style' ); ?>" id="<?php echo $this->get_field_id( 'slide_style' ); ?>" style="width: 100%;">
|
67 |
+
<option value="list" <?php if(isset($slide_style) && $slide_style=='list'){echo 'selected';} ?>>List</option>
|
68 |
+
<option value="slider" <?php if(isset($slide_style) && $slide_style=='slider'){echo 'selected';} ?>>Slider</option>
|
69 |
+
</select>
|
70 |
+
</p>
|
71 |
<p>
|
72 |
<input class="checkbox" type="checkbox" value="true" <?php checked( ( isset( $instance['border_rad']) && ($instance['showAvatar'] == "true") ), true ); ?> id="<?php echo $this->get_field_id( 'border_rad' ); ?>" name="<?php echo $this->get_field_name( 'border_rad' ); ?>" />
|
73 |
<label for="<?php echo $this->get_field_id( 'border_rad' ); ?>">Circular Avatar image</label>
|
74 |
+
</p>
|
75 |
<p>
|
76 |
<input class="checkbox" type="checkbox" value="true" <?php checked( ( isset( $instance['showAvatar']) && ($instance['showAvatar'] == "true") ), true ); ?> id="<?php echo $this->get_field_id( 'showAvatar' ); ?>" name="<?php echo $this->get_field_name( 'showAvatar' ); ?>" />
|
77 |
<label for="<?php echo $this->get_field_id( 'showAvatar' ); ?>">Display avatar image</label>
|
css/admin_style.min.css
CHANGED
@@ -45,10 +45,20 @@ width:68%;
|
|
45 |
line-height: 18px;
|
46 |
}
|
47 |
.clear{clear:both;}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
48 |
ul.light li.tweets_avatar .times a,ul.light li.tweets_avatar .wdtf-screen-name a,ul.light li.tweets_avatar .stats a{color:#999999 !important;
|
49 |
-
text-decoration:none;}
|
50 |
ul.dark li.tweets_avatar .times a,ul.dark li.tweets_avatar .wdtf-screen-name a,ul.dark li.tweets_avatar .stats a{color:#a0a0a0 !important;
|
51 |
-
text-decoration:none;}
|
52 |
.times a:hover,.wdtf-screen-name a:hover,.stats a:hover{text-decoration: underline;}
|
53 |
.stats-favorites{text-transform: uppercase;font-size: 11px;;}
|
54 |
span.stats-narrow .stats{display:block;}
|
45 |
line-height: 18px;
|
46 |
}
|
47 |
.clear{clear:both;}
|
48 |
+
.fetched_tweets{
|
49 |
+
border: medium none;
|
50 |
+
list-style: none outside none;
|
51 |
+
margin: 0 !important;
|
52 |
+
outline: medium none;
|
53 |
+
padding: 0;
|
54 |
+
position: relative;
|
55 |
+
width: 100%;
|
56 |
+
}
|
57 |
+
|
58 |
ul.light li.tweets_avatar .times a,ul.light li.tweets_avatar .wdtf-screen-name a,ul.light li.tweets_avatar .stats a{color:#999999 !important;
|
59 |
+
text-decoration:none; width: 100%;}
|
60 |
ul.dark li.tweets_avatar .times a,ul.dark li.tweets_avatar .wdtf-screen-name a,ul.dark li.tweets_avatar .stats a{color:#a0a0a0 !important;
|
61 |
+
text-decoration:none; width: 100%;}
|
62 |
.times a:hover,.wdtf-screen-name a:hover,.stats a:hover{text-decoration: underline;}
|
63 |
.stats-favorites{text-transform: uppercase;font-size: 11px;;}
|
64 |
span.stats-narrow .stats{display:block;}
|
wp-latest-twitter-tweets.php
CHANGED
@@ -4,7 +4,7 @@ Plugin Name: WP Twitter Feeds
|
|
4 |
Plugin URI: http://www.vivacityinfotech.net/
|
5 |
Description: Displays latest tweets from your Twitter account using Twitter oAuth API 1.1.
|
6 |
Author: Vivacity Infotech Pvt. Ltd.
|
7 |
-
Version: 1.4.
|
8 |
Author URI: http://www.vivacityinfotech.net/
|
9 |
|
10 |
Copyright 2014 Vivacity InfoTech Pvt. Ltd. (email : support@vivacityinfotech.com)
|
4 |
Plugin URI: http://www.vivacityinfotech.net/
|
5 |
Description: Displays latest tweets from your Twitter account using Twitter oAuth API 1.1.
|
6 |
Author: Vivacity Infotech Pvt. Ltd.
|
7 |
+
Version: 1.4.2
|
8 |
Author URI: http://www.vivacityinfotech.net/
|
9 |
|
10 |
Copyright 2014 Vivacity InfoTech Pvt. Ltd. (email : support@vivacityinfotech.com)
|