Custom Twitter Feeds - Version 1.1.5

Version Description

  • Fix: Fixed a rare issue when loading more Tweets
  • Fix: When there is no bio text in the header then the screenname text is now automatically centered vertically
Download this release

Release Info

Developer smashballoon
Plugin Icon 128x128 Custom Twitter Feeds
Version 1.1.5
Comparing to
See all releases

Code changes from version 1.1.4 to 1.1.5

README.txt CHANGED
@@ -5,7 +5,7 @@ Support Website: http://smashballoon/custom-twitter-feeds/
5
  Tags: Twitter, Twitter feed, Custom Twitter Feed, Twitter feeds, Custom Twitter Feeds, Tweets, Custom Tweets, Tweets feed, Twitter widget, Custom Twitter widget, Twitter plugin, Twitter API, Twitter tweets
6
  Requires at least: 3.0
7
  Tested up to: 4.6
8
- Stable tag: 1.1.4
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -146,6 +146,10 @@ If you're still having trouble displaying your Tweets after trying the common is
146
  2. Custom Twitter Feeds plugin Settings pages
147
 
148
  == Changelog ==
 
 
 
 
149
  = 1.1.4 =
150
  * Fix: Fixed an issue with some setting checkboxes
151
  * Fix: Fixed a rare encoding issue which occurred on some server configurations
5
  Tags: Twitter, Twitter feed, Custom Twitter Feed, Twitter feeds, Custom Twitter Feeds, Tweets, Custom Tweets, Tweets feed, Twitter widget, Custom Twitter widget, Twitter plugin, Twitter API, Twitter tweets
6
  Requires at least: 3.0
7
  Tested up to: 4.6
8
+ Stable tag: 1.1.5
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
146
  2. Custom Twitter Feeds plugin Settings pages
147
 
148
  == Changelog ==
149
+ = 1.1.5 =
150
+ * Fix: Fixed a rare issue when loading more Tweets
151
+ * Fix: When there is no bio text in the header then the screenname text is now automatically centered vertically
152
+
153
  = 1.1.4 =
154
  * Fix: Fixed an issue with some setting checkboxes
155
  * Fix: Fixed a rare encoding issue which occurred on some server configurations
custom-twitter-feed.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Custom Twitter Feeds
4
  Plugin URI: http://smashballoon.com/custom-twitter-feeds
5
  Description: Customizable Twitter feeds for your website
6
- Version: 1.1.4
7
  Author: Smash Balloon
8
  Author URI: http://smashballoon.com/
9
  Text Domain: custom-twitter-feeds
@@ -24,7 +24,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
24
  */
25
 
26
  define( 'CTF_URL', plugin_dir_path( __FILE__ ) );
27
- define( 'CTF_VERSION', '1.1.4' );
28
  define( 'CTF_TITLE', 'Custom Twitter Feeds' );
29
  define( 'CTF_JS_URL', plugins_url( '/js/ctf-scripts.js?ver=' . CTF_VERSION , __FILE__ ) );
30
  define( 'OAUTH_PROCESSOR_URL', 'https://smashballoon.com/ctf-at-retriever/?return_uri=' );
3
  Plugin Name: Custom Twitter Feeds
4
  Plugin URI: http://smashballoon.com/custom-twitter-feeds
5
  Description: Customizable Twitter feeds for your website
6
+ Version: 1.1.5
7
  Author: Smash Balloon
8
  Author URI: http://smashballoon.com/
9
  Text Domain: custom-twitter-feeds
24
  */
25
 
26
  define( 'CTF_URL', plugin_dir_path( __FILE__ ) );
27
+ define( 'CTF_VERSION', '1.1.5' );
28
  define( 'CTF_TITLE', 'Custom Twitter Feeds' );
29
  define( 'CTF_JS_URL', plugins_url( '/js/ctf-scripts.js?ver=' . CTF_VERSION , __FILE__ ) );
30
  define( 'OAUTH_PROCESSOR_URL', 'https://smashballoon.com/ctf-at-retriever/?return_uri=' );
inc/CtfFeed.php CHANGED
@@ -193,7 +193,7 @@ class CtfFeed
193
  $bool_true = array(
194
  'showbutton',
195
  'showbio',
196
- 'showheader'
197
  );
198
  $this->setStandardBoolOptions( $bool_true, true );
199
 
@@ -880,7 +880,7 @@ class CtfFeed
880
  protected function getFeedHeaderHtml( $tweet_set, $feed_options )
881
  {
882
  $ctf_header_html = '';
883
- $ctf_no_bio = $feed_options['showbio'] ? '' : ' ctf-no-bio';
884
 
885
  // temporary workaround for cached http images
886
  $tweet_set[0]['user']['profile_image_url_https'] = isset( $tweet_set[0]['user']['profile_image_url_https'] ) ? $tweet_set[0]['user']['profile_image_url_https'] : $tweet_set[0]['user']['profile_image_url'];
@@ -908,7 +908,7 @@ class CtfFeed
908
  $ctf_header_html .= '<span class="ctf-header-follow"><i class="fa fa-twitter" aria-hidden="true"></i>Follow</span>';
909
  $ctf_header_html .= '</p>';
910
 
911
- if ( $feed_options['showbio'] ) {
912
  $ctf_header_html .= '<p class="ctf-header-bio" style="' . $feed_options['headertextcolor'] . '">' . $tweet_set[0]['user']['description'] . '</p>';
913
  }
914
 
193
  $bool_true = array(
194
  'showbutton',
195
  'showbio',
196
+ 'showheader'
197
  );
198
  $this->setStandardBoolOptions( $bool_true, true );
199
 
880
  protected function getFeedHeaderHtml( $tweet_set, $feed_options )
881
  {
882
  $ctf_header_html = '';
883
+ $ctf_no_bio = ( $feed_options['showbio'] && !empty($tweet_set[0]['user']['description']) ) ? '' : ' ctf-no-bio';
884
 
885
  // temporary workaround for cached http images
886
  $tweet_set[0]['user']['profile_image_url_https'] = isset( $tweet_set[0]['user']['profile_image_url_https'] ) ? $tweet_set[0]['user']['profile_image_url_https'] : $tweet_set[0]['user']['profile_image_url'];
908
  $ctf_header_html .= '<span class="ctf-header-follow"><i class="fa fa-twitter" aria-hidden="true"></i>Follow</span>';
909
  $ctf_header_html .= '</p>';
910
 
911
+ if ( $feed_options['showbio'] && !empty($tweet_set[0]['user']['description']) ) {
912
  $ctf_header_html .= '<p class="ctf-header-bio" style="' . $feed_options['headertextcolor'] . '">' . $tweet_set[0]['user']['description'] . '</p>';
913
  }
914
 
js/ctf-scripts.js CHANGED
@@ -92,6 +92,7 @@ if(!ctf_js_exists){
92
  } // end ctfScripts()
93
 
94
  function ctfLoadTweets( lastIDData, shortcodeData , $ctf, $ctfMore, numNeeded ) {
 
95
  //Display loader
96
  $ctfMore.addClass('ctf-loading').append('<div class="ctf-loader"></div>');
97
  $ctfMore.find('.ctf-loader').css('background-color', $ctfMore.css('color'));
@@ -122,7 +123,9 @@ if(!ctf_js_exists){
122
  success : function(data) {
123
  if(lastIDData !== '') {
124
  // appends the html echoed out in ctf_get_new_posts() to the last post element
125
- $ctf.find('.ctf-item').removeClass('ctf-new').last().after(data);
 
 
126
 
127
  if($ctf.find('.ctf-out-of-tweets').length) {
128
  $ctfMore.hide();
@@ -155,13 +158,16 @@ if(!ctf_js_exists){
155
 
156
  ctfScripts( $ctf );
157
 
158
- if(numNeeded > 0) {
159
- var $ctfMore = $ctf.find('.ctf-more'),
160
- lastIDData = $ctf.find('.ctf-item').last().attr('id'),
161
- shortcodeData = $ctf.attr('data-ctfshortcode');
 
 
162
 
163
- ctfLoadTweets( lastIDData, shortcodeData , $ctf, $ctfMore, numNeeded );
164
- }
 
165
 
166
  // add the load more button and input to simulate a dynamic json file call
167
  $ctf.find('.ctf-more').on('click', function() {
92
  } // end ctfScripts()
93
 
94
  function ctfLoadTweets( lastIDData, shortcodeData , $ctf, $ctfMore, numNeeded ) {
95
+
96
  //Display loader
97
  $ctfMore.addClass('ctf-loading').append('<div class="ctf-loader"></div>');
98
  $ctfMore.find('.ctf-loader').css('background-color', $ctfMore.css('color'));
123
  success : function(data) {
124
  if(lastIDData !== '') {
125
  // appends the html echoed out in ctf_get_new_posts() to the last post element
126
+ if(data.indexOf('<meta charset') == -1) {
127
+ $ctf.find('.ctf-item').removeClass('ctf-new').last().after(data);
128
+ }
129
 
130
  if($ctf.find('.ctf-out-of-tweets').length) {
131
  $ctfMore.hide();
158
 
159
  ctfScripts( $ctf );
160
 
161
+ // delay added to prevent strange issue with ajax themes returning the entire page
162
+ setTimeout(function(){
163
+ if(numNeeded > 0) {
164
+ var $ctfMore = $ctf.find('.ctf-more'),
165
+ lastIDData = $ctf.find('.ctf-item').last().attr('id'),
166
+ shortcodeData = $ctf.attr('data-ctfshortcode');
167
 
168
+ ctfLoadTweets( lastIDData, shortcodeData , $ctf, $ctfMore, numNeeded );
169
+ }
170
+ },500);
171
 
172
  // add the load more button and input to simulate a dynamic json file call
173
  $ctf.find('.ctf-more').on('click', function() {
views/admin/main.php CHANGED
@@ -43,7 +43,7 @@
43
  </div>
44
 
45
  <a href="https://smashballoon.com/custom-twitter-feeds/demo" target="_blank" class="ctf-pro-notice">
46
- <img src="<?php echo plugins_url( '../../img/pro-notice.png' , __FILE__ ) ?>" alt="Custom Twitter Feeds Pro" />
47
  </a>
48
 
49
  </div>
43
  </div>
44
 
45
  <a href="https://smashballoon.com/custom-twitter-feeds/demo" target="_blank" class="ctf-pro-notice">
46
+ <img src="<?php echo plugins_url( '../../img/pro-notice.png?1' , __FILE__ ) ?>" alt="Custom Twitter Feeds Pro" />
47
  </a>
48
 
49
  </div>