Version Description
- [Fixed] Cleanup - variable definition errors
- [Fixed] Cleanup - oAuth port definition error
- [Fixed] i18n localisation couple missing textdomain references (props: alysko)
Download this release
Release Info
Developer | Planet Interactive |
Plugin | Simple Twitter Tweets |
Version | 4.4 |
Comparing to | |
See all releases |
Code changes from version 4.3 to 4.4
- README.txt +6 -1
- simple-twitter-tweets.php +4 -4
- twitteroauth/OAuth.php +13 -13
README.txt
CHANGED
@@ -4,7 +4,7 @@ Donate: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A94
|
|
4 |
Tags: Twitter, Stream, Tweets, Twitter OAuth, social
|
5 |
Requires at least: 3.0
|
6 |
Tested up to: 4.4.2
|
7 |
-
Stable tag: 4.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -129,6 +129,11 @@ We've tested it and as far as we know it works great! Phew, but if you have an i
|
|
129 |
9. Style how you like, "Your Tweets your way"
|
130 |
|
131 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
132 |
= 4.3 =
|
133 |
* [Added] Load Plugin Text Domain. Now loads the language files.
|
134 |
* [Updated] Made the permalink on the list item (Cheers Brian)
|
4 |
Tags: Twitter, Stream, Tweets, Twitter OAuth, social
|
5 |
Requires at least: 3.0
|
6 |
Tested up to: 4.4.2
|
7 |
+
Stable tag: 4.4
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
129 |
9. Style how you like, "Your Tweets your way"
|
130 |
|
131 |
== Changelog ==
|
132 |
+
= 4.4 =
|
133 |
+
* [Fixed] Cleanup - variable definition errors
|
134 |
+
* [Fixed] Cleanup - oAuth port definition error
|
135 |
+
* [Fixed] i18n localisation couple missing textdomain references (props: alysko)
|
136 |
+
|
137 |
= 4.3 =
|
138 |
* [Added] Load Plugin Text Domain. Now loads the language files.
|
139 |
* [Updated] Made the permalink on the list item (Cheers Brian)
|
simple-twitter-tweets.php
CHANGED
@@ -4,7 +4,7 @@ Plugin Name: Simple Twitter Tweets
|
|
4 |
Plugin URI: http://www.planet-interactive.co.uk/simple-twitter-tweets
|
5 |
Description: Display last x number tweets from Twitter API stream, store locally in database to present past tweets when failure to access Twitters restrictive API occurs
|
6 |
Author: Ashley Sheinwald
|
7 |
-
Version: 4.
|
8 |
Author URI: http://www.planet-interactive.co.uk/
|
9 |
Text Domain: simple-twitter-tweets
|
10 |
*/
|
@@ -187,7 +187,7 @@ class PI_SimpleTwitterTweets extends WP_Widget{
|
|
187 |
<p>
|
188 |
<label for="<?php echo $this->get_field_id("titleLink"); ?>">
|
189 |
<input type="checkbox" class="checkbox" id="<?php echo $this->get_field_id("titleLink"); ?>" name="<?php echo $this->get_field_name("titleLink"); ?>"<?php checked( (bool) $instance["titleLink"], true ); ?> />
|
190 |
-
<?php _e( 'Make widget title link' ); ?>
|
191 |
</label>
|
192 |
</p>
|
193 |
<p>
|
@@ -550,7 +550,7 @@ class PI_SimpleTwitterTweets extends WP_Widget{
|
|
550 |
?>
|
551 |
<?php echo $t['text']; ?>
|
552 |
<span class="stt-em">
|
553 |
-
<a href="<?php echo $t[permalink]; ?>" target="_blank">
|
554 |
<?php
|
555 |
|
556 |
// Original - long time ref: hours...
|
@@ -568,7 +568,7 @@ class PI_SimpleTwitterTweets extends WP_Widget{
|
|
568 |
$displayAgo = "";
|
569 |
}
|
570 |
// Use to make il8n compliant
|
571 |
-
printf(__('%1$s%2$s'), $timeDisplay, $displayAgo);
|
572 |
|
573 |
?>
|
574 |
</a>
|
4 |
Plugin URI: http://www.planet-interactive.co.uk/simple-twitter-tweets
|
5 |
Description: Display last x number tweets from Twitter API stream, store locally in database to present past tweets when failure to access Twitters restrictive API occurs
|
6 |
Author: Ashley Sheinwald
|
7 |
+
Version: 4.4
|
8 |
Author URI: http://www.planet-interactive.co.uk/
|
9 |
Text Domain: simple-twitter-tweets
|
10 |
*/
|
187 |
<p>
|
188 |
<label for="<?php echo $this->get_field_id("titleLink"); ?>">
|
189 |
<input type="checkbox" class="checkbox" id="<?php echo $this->get_field_id("titleLink"); ?>" name="<?php echo $this->get_field_name("titleLink"); ?>"<?php checked( (bool) $instance["titleLink"], true ); ?> />
|
190 |
+
<?php _e( 'Make widget title link', 'simple-twitter-tweets' ); ?>
|
191 |
</label>
|
192 |
</p>
|
193 |
<p>
|
550 |
?>
|
551 |
<?php echo $t['text']; ?>
|
552 |
<span class="stt-em">
|
553 |
+
<a href="<?php echo $t['permalink']; ?>" target="_blank">
|
554 |
<?php
|
555 |
|
556 |
// Original - long time ref: hours...
|
568 |
$displayAgo = "";
|
569 |
}
|
570 |
// Use to make il8n compliant
|
571 |
+
printf(__( '%1$s%2$s', 'simple-twitter-tweets' ), $timeDisplay, $displayAgo);
|
572 |
|
573 |
?>
|
574 |
</a>
|
twitteroauth/OAuth.php
CHANGED
@@ -92,9 +92,9 @@ abstract class OAuthSignatureMethod {
|
|
92 |
}
|
93 |
|
94 |
/**
|
95 |
-
* The HMAC-SHA1 signature method uses the HMAC-SHA1 signature algorithm as defined in [RFC2104]
|
96 |
-
* where the Signature Base String is the text and the key is the concatenated values (each first
|
97 |
-
* encoded per Parameter Encoding) of the Consumer Secret and Token Secret, separated by an '&'
|
98 |
* character (ASCII code 38) even if empty.
|
99 |
* - Chapter 9.2 ("HMAC-SHA1")
|
100 |
*/
|
@@ -120,7 +120,7 @@ class OAuthSignatureMethod_HMAC_SHA1 extends OAuthSignatureMethod {
|
|
120 |
}
|
121 |
|
122 |
/**
|
123 |
-
* The PLAINTEXT method does not provide any security protection and SHOULD only be used
|
124 |
* over a secure channel such as HTTPS. It does not use the Signature Base String.
|
125 |
* - Chapter 9.4 ("PLAINTEXT")
|
126 |
*/
|
@@ -130,8 +130,8 @@ class OAuthSignatureMethod_PLAINTEXT extends OAuthSignatureMethod {
|
|
130 |
}
|
131 |
|
132 |
/**
|
133 |
-
* oauth_signature is set to the concatenated encoded values of the Consumer Secret and
|
134 |
-
* Token Secret, separated by a '&' character (ASCII code 38), even if either secret is
|
135 |
* empty. The result MUST be encoded again.
|
136 |
* - Chapter 9.4.1 ("Generating Signatures")
|
137 |
*
|
@@ -153,10 +153,10 @@ class OAuthSignatureMethod_PLAINTEXT extends OAuthSignatureMethod {
|
|
153 |
}
|
154 |
|
155 |
/**
|
156 |
-
* The RSA-SHA1 signature method uses the RSASSA-PKCS1-v1_5 signature algorithm as defined in
|
157 |
-
* [RFC3447] section 8.2 (more simply known as PKCS#1), using SHA-1 as the hash function for
|
158 |
-
* EMSA-PKCS1-v1_5. It is assumed that the Consumer has provided its RSA public key in a
|
159 |
-
* verified way to the Service Provider, in a manner which is beyond the scope of this
|
160 |
* specification.
|
161 |
* - Chapter 9.3 ("RSA-SHA1")
|
162 |
*/
|
@@ -381,7 +381,7 @@ class OAuthRequest {
|
|
381 |
*/
|
382 |
public function get_normalized_http_url() {
|
383 |
$parts = parse_url($this->http_url);
|
384 |
-
|
385 |
$port = @$parts['port'];
|
386 |
$scheme = $parts['scheme'];
|
387 |
$host = $parts['host'];
|
@@ -558,7 +558,7 @@ class OAuthServer {
|
|
558 |
private function get_version(&$request) {
|
559 |
$version = $request->get_parameter("oauth_version");
|
560 |
if (!$version) {
|
561 |
-
// Service Providers MUST assume the protocol version to be 1.0 if this parameter is not present.
|
562 |
// Chapter 7.0 ("Accessing Protected Ressources")
|
563 |
$version = '1.0';
|
564 |
}
|
@@ -658,7 +658,7 @@ class OAuthServer {
|
|
658 |
throw new OAuthException(
|
659 |
'Missing timestamp parameter. The parameter is required'
|
660 |
);
|
661 |
-
|
662 |
// verify that timestamp is recentish
|
663 |
$now = time();
|
664 |
if (abs($now - $timestamp) > $this->timestamp_threshold) {
|
92 |
}
|
93 |
|
94 |
/**
|
95 |
+
* The HMAC-SHA1 signature method uses the HMAC-SHA1 signature algorithm as defined in [RFC2104]
|
96 |
+
* where the Signature Base String is the text and the key is the concatenated values (each first
|
97 |
+
* encoded per Parameter Encoding) of the Consumer Secret and Token Secret, separated by an '&'
|
98 |
* character (ASCII code 38) even if empty.
|
99 |
* - Chapter 9.2 ("HMAC-SHA1")
|
100 |
*/
|
120 |
}
|
121 |
|
122 |
/**
|
123 |
+
* The PLAINTEXT method does not provide any security protection and SHOULD only be used
|
124 |
* over a secure channel such as HTTPS. It does not use the Signature Base String.
|
125 |
* - Chapter 9.4 ("PLAINTEXT")
|
126 |
*/
|
130 |
}
|
131 |
|
132 |
/**
|
133 |
+
* oauth_signature is set to the concatenated encoded values of the Consumer Secret and
|
134 |
+
* Token Secret, separated by a '&' character (ASCII code 38), even if either secret is
|
135 |
* empty. The result MUST be encoded again.
|
136 |
* - Chapter 9.4.1 ("Generating Signatures")
|
137 |
*
|
153 |
}
|
154 |
|
155 |
/**
|
156 |
+
* The RSA-SHA1 signature method uses the RSASSA-PKCS1-v1_5 signature algorithm as defined in
|
157 |
+
* [RFC3447] section 8.2 (more simply known as PKCS#1), using SHA-1 as the hash function for
|
158 |
+
* EMSA-PKCS1-v1_5. It is assumed that the Consumer has provided its RSA public key in a
|
159 |
+
* verified way to the Service Provider, in a manner which is beyond the scope of this
|
160 |
* specification.
|
161 |
* - Chapter 9.3 ("RSA-SHA1")
|
162 |
*/
|
381 |
*/
|
382 |
public function get_normalized_http_url() {
|
383 |
$parts = parse_url($this->http_url);
|
384 |
+
$port = ""; // just define it
|
385 |
$port = @$parts['port'];
|
386 |
$scheme = $parts['scheme'];
|
387 |
$host = $parts['host'];
|
558 |
private function get_version(&$request) {
|
559 |
$version = $request->get_parameter("oauth_version");
|
560 |
if (!$version) {
|
561 |
+
// Service Providers MUST assume the protocol version to be 1.0 if this parameter is not present.
|
562 |
// Chapter 7.0 ("Accessing Protected Ressources")
|
563 |
$version = '1.0';
|
564 |
}
|
658 |
throw new OAuthException(
|
659 |
'Missing timestamp parameter. The parameter is required'
|
660 |
);
|
661 |
+
|
662 |
// verify that timestamp is recentish
|
663 |
$now = time();
|
664 |
if (abs($now - $timestamp) > $this->timestamp_threshold) {
|