Version Description
[11-12-2020] * Minor changes.
Download this release
Release Info
Developer | weblizar |
Plugin | Weblizar Twitter Widget |
Version | 1.9.8 |
Comparing to | |
See all releases |
Code changes from version 1.9.7 to 1.9.8
- load-tweets.php +9 -11
- readme.txt +4 -1
- twiiter_help.php +3 -0
- twitter-tweets.php +1 -1
load-tweets.php
CHANGED
@@ -3,7 +3,13 @@
|
|
3 |
|
4 |
use Abraham\TwitterOAuth\TwitterOAuth;
|
5 |
|
6 |
-
$wl_twitter_api_settings = get_option('wl_twitter_api_settings');
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
|
8 |
if( ! empty( $wl_twitter_api_settings ) ) {
|
9 |
$wl_twitter_consumer_key = $wl_twitter_api_settings['wl_twitter_consumer_key'];
|
@@ -14,20 +20,13 @@ if( ! empty( $wl_twitter_api_settings ) ) {
|
|
14 |
|
15 |
/* temp value assigned in case of empty value coming from DB */
|
16 |
|
17 |
-
$temp_wl_twitter_consumer_key = "72eoxhZGGhhACh4oQ0MKM5Z1G";
|
18 |
-
$temp_wl_twitter_consumer_secret = "LLVWGiSB6mUfjdNk1UugGHxpkHSo3ppcmRVZWqe7VfiVlZaFjs";
|
19 |
-
$temp_wl_twitter_access_token = "2409346562-OR0avORZhdUblkLh7mQmzbR4lqlrccfcb3okLd7";
|
20 |
-
$temp_wl_twitter_token_secret = "iRohUaA8INkcWZG7S8TnrUCd24lFDHPviEs4XW2ALfKhy";
|
21 |
-
|
22 |
$wl_twitter_tweets = ( isset( $wl_twitter_api_settings['wl_twitter_tweets'] ) ) ? $wl_twitter_api_settings['wl_twitter_tweets'] : '5';
|
23 |
$wl_twitter_layout = ( isset( $wl_twitter_api_settings['wl_twitter_layout'] ) ) ? $wl_twitter_api_settings['wl_twitter_layout'] : '6';
|
24 |
|
25 |
function get_twitter_connection( $wl_twitter_consumer_key, $wl_twitter_consumer_secret, $wl_twitter_access_token, $wl_twitter_token_secret ) {
|
26 |
try {
|
27 |
$twitter_client = new TwitterOAuth( $wl_twitter_consumer_key, $wl_twitter_consumer_secret, $wl_twitter_access_token, $wl_twitter_token_secret );
|
28 |
-
|
29 |
$content = $twitter_client->get( "account/verify_credentials" );
|
30 |
-
|
31 |
if ( ! $content ) {
|
32 |
throw new Exception( esc_html__( 'Connection Error', 'twitter-tweets' ) );
|
33 |
}
|
@@ -35,7 +34,6 @@ if( ! empty( $wl_twitter_api_settings ) ) {
|
|
35 |
echo esc_html($e->getMessage());
|
36 |
return null;
|
37 |
}
|
38 |
-
|
39 |
return $twitter_client;
|
40 |
}
|
41 |
|
@@ -102,12 +100,12 @@ if( ! empty( $wl_twitter_api_settings ) ) {
|
|
102 |
}
|
103 |
else {
|
104 |
$connection = get_twitter_connection( $temp_wl_twitter_consumer_key, $temp_wl_twitter_consumer_secret, $temp_wl_twitter_access_token, $temp_wl_twitter_token_secret );
|
105 |
-
}
|
106 |
|
107 |
if ( ! $connection ) {
|
108 |
$error_messaage = esc_html__("Can't connect to Twitter API. Check your internet connection.", 'twitter-tweets');
|
109 |
die( $error_messaage );
|
110 |
-
}
|
111 |
$statuses = $connection->get( "statuses/home_timeline",
|
112 |
["count" => $wl_twitter_tweets,
|
113 |
"exclude_replies" => 'false',
|
3 |
|
4 |
use Abraham\TwitterOAuth\TwitterOAuth;
|
5 |
|
6 |
+
$wl_twitter_api_settings = get_option('wl_twitter_api_settings');
|
7 |
+
|
8 |
+
|
9 |
+
$temp_wl_twitter_consumer_key = "";
|
10 |
+
$temp_wl_twitter_consumer_secret = "";
|
11 |
+
$temp_wl_twitter_access_token = "";
|
12 |
+
$temp_wl_twitter_token_secret = "";
|
13 |
|
14 |
if( ! empty( $wl_twitter_api_settings ) ) {
|
15 |
$wl_twitter_consumer_key = $wl_twitter_api_settings['wl_twitter_consumer_key'];
|
20 |
|
21 |
/* temp value assigned in case of empty value coming from DB */
|
22 |
|
|
|
|
|
|
|
|
|
|
|
23 |
$wl_twitter_tweets = ( isset( $wl_twitter_api_settings['wl_twitter_tweets'] ) ) ? $wl_twitter_api_settings['wl_twitter_tweets'] : '5';
|
24 |
$wl_twitter_layout = ( isset( $wl_twitter_api_settings['wl_twitter_layout'] ) ) ? $wl_twitter_api_settings['wl_twitter_layout'] : '6';
|
25 |
|
26 |
function get_twitter_connection( $wl_twitter_consumer_key, $wl_twitter_consumer_secret, $wl_twitter_access_token, $wl_twitter_token_secret ) {
|
27 |
try {
|
28 |
$twitter_client = new TwitterOAuth( $wl_twitter_consumer_key, $wl_twitter_consumer_secret, $wl_twitter_access_token, $wl_twitter_token_secret );
|
|
|
29 |
$content = $twitter_client->get( "account/verify_credentials" );
|
|
|
30 |
if ( ! $content ) {
|
31 |
throw new Exception( esc_html__( 'Connection Error', 'twitter-tweets' ) );
|
32 |
}
|
34 |
echo esc_html($e->getMessage());
|
35 |
return null;
|
36 |
}
|
|
|
37 |
return $twitter_client;
|
38 |
}
|
39 |
|
100 |
}
|
101 |
else {
|
102 |
$connection = get_twitter_connection( $temp_wl_twitter_consumer_key, $temp_wl_twitter_consumer_secret, $temp_wl_twitter_access_token, $temp_wl_twitter_token_secret );
|
103 |
+
}
|
104 |
|
105 |
if ( ! $connection ) {
|
106 |
$error_messaage = esc_html__("Can't connect to Twitter API. Check your internet connection.", 'twitter-tweets');
|
107 |
die( $error_messaage );
|
108 |
+
}
|
109 |
$statuses = $connection->get( "statuses/home_timeline",
|
110 |
["count" => $wl_twitter_tweets,
|
111 |
"exclude_replies" => 'false',
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.weblizar.com/
|
|
4 |
Tags: twitter, tweets, twitter tweets, twitter widget, twitter wordPress plugin, twitter feed
|
5 |
Requires at least: 3.8
|
6 |
Tested up to: 5.6
|
7 |
-
Stable tag: 1.9.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -114,6 +114,9 @@ Please use WordPress support forum to ask any query regarding any issue.
|
|
114 |
For more information, see Weblizar(https://weblizar.com/)
|
115 |
|
116 |
|
|
|
|
|
|
|
117 |
= 1.9.7 =[11-12-2020]
|
118 |
* Minor Fix.
|
119 |
* Tested Upto WP 5.6.
|
4 |
Tags: twitter, tweets, twitter tweets, twitter widget, twitter wordPress plugin, twitter feed
|
5 |
Requires at least: 3.8
|
6 |
Tested up to: 5.6
|
7 |
+
Stable tag: 1.9.8
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
114 |
For more information, see Weblizar(https://weblizar.com/)
|
115 |
|
116 |
|
117 |
+
= 1.9.8 =[11-12-2020]
|
118 |
+
* Minor changes.
|
119 |
+
|
120 |
= 1.9.7 =[11-12-2020]
|
121 |
* Minor Fix.
|
122 |
* Tested Upto WP 5.6.
|
twiiter_help.php
CHANGED
@@ -703,6 +703,9 @@ include_once('load-tweets.php');
|
|
703 |
</div> <!-- Tweet box -->
|
704 |
<?php
|
705 |
}
|
|
|
|
|
|
|
706 |
} ?>
|
707 |
</div>
|
708 |
</div>
|
703 |
</div> <!-- Tweet box -->
|
704 |
<?php
|
705 |
}
|
706 |
+
}
|
707 |
+
else {
|
708 |
+
echo "No Feeds Found";
|
709 |
} ?>
|
710 |
</div>
|
711 |
</div>
|
twitter-tweets.php
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?php
|
2 |
/*
|
3 |
* Plugin Name: Customize Feeds for Twitter
|
4 |
-
* Version: 1.9.
|
5 |
* Description: Customize Feeds for Twitter plugin for WordPress. You can use this to display real time Twitter feeds on any where on your webiste by using shortcode or widgets
|
6 |
* Author: Weblizar
|
7 |
* Author URI: https://www.weblizar.com/
|
1 |
<?php
|
2 |
/*
|
3 |
* Plugin Name: Customize Feeds for Twitter
|
4 |
+
* Version: 1.9.8
|
5 |
* Description: Customize Feeds for Twitter plugin for WordPress. You can use this to display real time Twitter feeds on any where on your webiste by using shortcode or widgets
|
6 |
* Author: Weblizar
|
7 |
* Author URI: https://www.weblizar.com/
|