Version Description
- Fix: Fixed an issue when creating a Search feed using the built-in Custom Twitter Feeds widget box
- Fix: Fixed an issue with the checkbox that allows you to toggle links on/off in the Tweet text
Download this release
Release Info
Developer | smashballoon |
Plugin | Custom Twitter Feeds |
Version | 1.1.6 |
Comparing to | |
See all releases |
Code changes from version 1.1.5 to 1.1.6
- README.txt +5 -1
- custom-twitter-feed.php +2 -2
- inc/CtfAdmin.php +10 -4
- inc/CtfFeed.php +2 -2
- inc/admin-hooks.php +1 -1
- inc/widget.php +3 -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.
|
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.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
|
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.6
|
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.6 =
|
150 |
+
* Fix: Fixed an issue when creating a Search feed using the built-in Custom Twitter Feeds widget box
|
151 |
+
* Fix: Fixed an issue with the checkbox that allows you to toggle links on/off in the Tweet text
|
152 |
+
|
153 |
= 1.1.5 =
|
154 |
* Fix: Fixed a rare issue when loading more Tweets
|
155 |
* Fix: When there is no bio text in the header then the screenname text is now automatically centered vertically
|
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.
|
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.
|
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.6
|
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.6' );
|
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/CtfAdmin.php
CHANGED
@@ -1436,7 +1436,9 @@ class CtfAdmin
|
|
1436 |
} elseif ( in_array( $key, $feed_types ) ) {
|
1437 |
$ctf_options[$key] = apply_filters( 'ctf_admin_validate_include_replies', $val, $input['type'] );
|
1438 |
} elseif ( $key == 'ajax_theme' || $key == 'use_own_consumer' || $key == 'have_own_tokens' || $key == 'preserve_settings' ) {
|
1439 |
-
if ( $val
|
|
|
|
|
1440 |
$ctf_options[$key] = true;
|
1441 |
}
|
1442 |
} else {
|
@@ -1484,7 +1486,9 @@ class CtfAdmin
|
|
1484 |
|
1485 |
foreach ( $input as $key => $val ) {
|
1486 |
if ( in_array( $key, $checkbox_settings ) ) {
|
1487 |
-
if ( $val
|
|
|
|
|
1488 |
$ctf_options[$key] = true;
|
1489 |
}
|
1490 |
} else {
|
@@ -1520,7 +1524,7 @@ class CtfAdmin
|
|
1520 |
|
1521 |
wp_schedule_event( time(), $ctf_cron_schedule, 'ctf_cron_job' );
|
1522 |
}
|
1523 |
-
}
|
1524 |
$checkbox_settings = array( 'showbio', 'disablelinks', 'linktexttotwitter' );
|
1525 |
$checkbox_settings = apply_filters( 'ctf_admin_style_checkbox_settings', $checkbox_settings );
|
1526 |
$leave_spaces = array( 'headertext' );
|
@@ -1531,7 +1535,9 @@ class CtfAdmin
|
|
1531 |
|
1532 |
foreach ( $input as $key => $val ) {
|
1533 |
if ( in_array( $key, $checkbox_settings ) ) {
|
1534 |
-
if ( $val
|
|
|
|
|
1535 |
$ctf_options[$key] = true;
|
1536 |
}
|
1537 |
} else {
|
1436 |
} elseif ( in_array( $key, $feed_types ) ) {
|
1437 |
$ctf_options[$key] = apply_filters( 'ctf_admin_validate_include_replies', $val, $input['type'] );
|
1438 |
} elseif ( $key == 'ajax_theme' || $key == 'use_own_consumer' || $key == 'have_own_tokens' || $key == 'preserve_settings' ) {
|
1439 |
+
if ( $val != 'on' ) {
|
1440 |
+
$ctf_options[$key] = false;
|
1441 |
+
} else {
|
1442 |
$ctf_options[$key] = true;
|
1443 |
}
|
1444 |
} else {
|
1486 |
|
1487 |
foreach ( $input as $key => $val ) {
|
1488 |
if ( in_array( $key, $checkbox_settings ) ) {
|
1489 |
+
if ( $val != 'on' ) {
|
1490 |
+
$ctf_options[$key] = false;
|
1491 |
+
} else {
|
1492 |
$ctf_options[$key] = true;
|
1493 |
}
|
1494 |
} else {
|
1524 |
|
1525 |
wp_schedule_event( time(), $ctf_cron_schedule, 'ctf_cron_job' );
|
1526 |
}
|
1527 |
+
} elseif ( isset( $input['showbio'] ) ) {
|
1528 |
$checkbox_settings = array( 'showbio', 'disablelinks', 'linktexttotwitter' );
|
1529 |
$checkbox_settings = apply_filters( 'ctf_admin_style_checkbox_settings', $checkbox_settings );
|
1530 |
$leave_spaces = array( 'headertext' );
|
1535 |
|
1536 |
foreach ( $input as $key => $val ) {
|
1537 |
if ( in_array( $key, $checkbox_settings ) ) {
|
1538 |
+
if ( $val != 'on' ) {
|
1539 |
+
$ctf_options[$key] = false;
|
1540 |
+
} else {
|
1541 |
$ctf_options[$key] = true;
|
1542 |
}
|
1543 |
} else {
|
inc/CtfFeed.php
CHANGED
@@ -798,7 +798,7 @@ class CtfFeed
|
|
798 |
$html .= '<p>That\'s all! No more Tweets to load</p>';
|
799 |
$html .= '<p>';
|
800 |
$html .= '<a class="twitter-share-button" href="https://twitter.com/share" target="_blank" data-size="large" data-url="<?php echo get_home_url(); ?>">Share</a>';
|
801 |
-
if (
|
802 |
$html .= '<a class="twitter-follow-button" href="https://twitter.com/' . $feed_options['screenname'] . '" target="_blank" data-show-count="false" data-size="large" data-dnt="true">Follow</a>';
|
803 |
}
|
804 |
$html .= '</p>';
|
@@ -1113,7 +1113,7 @@ class CtfFeed
|
|
1113 |
$error_html .= 'data-text="Check out this website">';
|
1114 |
$error_html .= '</a>';
|
1115 |
|
1116 |
-
if (
|
1117 |
$error_html .= '<a class="twitter-follow-button"';
|
1118 |
$error_html .= 'href="https://twitter.com/' . $this->feed_options['screenname'] . '"';
|
1119 |
$error_html .= 'data-show-count="false"';
|
798 |
$html .= '<p>That\'s all! No more Tweets to load</p>';
|
799 |
$html .= '<p>';
|
800 |
$html .= '<a class="twitter-share-button" href="https://twitter.com/share" target="_blank" data-size="large" data-url="<?php echo get_home_url(); ?>">Share</a>';
|
801 |
+
if ( !empty( $feed_options['screenname'] ) ) {
|
802 |
$html .= '<a class="twitter-follow-button" href="https://twitter.com/' . $feed_options['screenname'] . '" target="_blank" data-show-count="false" data-size="large" data-dnt="true">Follow</a>';
|
803 |
}
|
804 |
$html .= '</p>';
|
1113 |
$error_html .= 'data-text="Check out this website">';
|
1114 |
$error_html .= '</a>';
|
1115 |
|
1116 |
+
if ( !empty( $this->feed_options['screenname'] ) ) {
|
1117 |
$error_html .= '<a class="twitter-follow-button"';
|
1118 |
$error_html .= 'href="https://twitter.com/' . $this->feed_options['screenname'] . '"';
|
1119 |
$error_html .= 'data-show-count="false"';
|
inc/admin-hooks.php
CHANGED
@@ -26,7 +26,7 @@ function ctf_validate_search_text( $val ) {
|
|
26 |
|
27 |
add_filter( 'ctf_admin_validate_usertimeline_text', 'ctf_validate_usertimeline_text', 10, 1 );
|
28 |
function ctf_validate_usertimeline_text( $val ) {
|
29 |
-
preg_match( "/^[\p{L}
|
30 |
|
31 |
$new_val = isset( $screenname[0] ) ? $screenname[0] : '';
|
32 |
|
26 |
|
27 |
add_filter( 'ctf_admin_validate_usertimeline_text', 'ctf_validate_usertimeline_text', 10, 1 );
|
28 |
function ctf_validate_usertimeline_text( $val ) {
|
29 |
+
preg_match( "/^[\p{L}0-9_]{1,16}/u" , str_replace( '@', '', trim( $val ) ), $screenname );
|
30 |
|
31 |
$new_val = isset( $screenname[0] ) ? $screenname[0] : '';
|
32 |
|
inc/widget.php
CHANGED
@@ -18,7 +18,7 @@ class CtfWidget extends WP_Widget
|
|
18 |
public function widget( $args, $instance ) {
|
19 |
|
20 |
$title = isset( $instance['title'] ) ? apply_filters( 'widget_title', $instance['title'] ) : '';
|
21 |
-
$content = isset( $instance['content'] ) ?
|
22 |
|
23 |
echo $args['before_widget'];
|
24 |
|
@@ -34,13 +34,13 @@ class CtfWidget extends WP_Widget
|
|
34 |
public function form( $instance ) {
|
35 |
|
36 |
$title = isset( $instance['title'] ) ? $instance['title'] : '';
|
37 |
-
$content = isset ( $instance['content'] ) ?
|
38 |
?>
|
39 |
<p>
|
40 |
<label for="<?php echo esc_attr( $this->get_field_id( 'title' ) ); ?>"><?php _e( 'Title:' ); ?></label>
|
41 |
<input class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'title' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'title' ) ); ?>" type="text" value="<?php echo esc_attr( $title ); ?>" />
|
42 |
</p>
|
43 |
-
<textarea class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'content' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'content' ) ); ?>" rows="16"><?php echo
|
44 |
<?php
|
45 |
}
|
46 |
|
@@ -61,5 +61,3 @@ add_action( 'widgets_init', 'ctf_load_widget' );
|
|
61 |
|
62 |
// allow shortcode in widgets
|
63 |
add_filter( 'widget_text', 'do_shortcode' );
|
64 |
-
|
65 |
-
|
18 |
public function widget( $args, $instance ) {
|
19 |
|
20 |
$title = isset( $instance['title'] ) ? apply_filters( 'widget_title', $instance['title'] ) : '';
|
21 |
+
$content = isset( $instance['content'] ) ? strip_tags( $instance['content'] ) : '[custom-twitter-feeds]';
|
22 |
|
23 |
echo $args['before_widget'];
|
24 |
|
34 |
public function form( $instance ) {
|
35 |
|
36 |
$title = isset( $instance['title'] ) ? $instance['title'] : '';
|
37 |
+
$content = isset ( $instance['content'] ) ? strip_tags( $instance['content'] ) : '[custom-twitter-feeds]';
|
38 |
?>
|
39 |
<p>
|
40 |
<label for="<?php echo esc_attr( $this->get_field_id( 'title' ) ); ?>"><?php _e( 'Title:' ); ?></label>
|
41 |
<input class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'title' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'title' ) ); ?>" type="text" value="<?php echo esc_attr( $title ); ?>" />
|
42 |
</p>
|
43 |
+
<textarea class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'content' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'content' ) ); ?>" rows="16"><?php echo strip_tags( $content ); ?></textarea>
|
44 |
<?php
|
45 |
}
|
46 |
|
61 |
|
62 |
// allow shortcode in widgets
|
63 |
add_filter( 'widget_text', 'do_shortcode' );
|
|
|
|