AccessPress Twitter Feed – Twitter Feed for WordPress - Version 1.2.5

Version Description

  • Checked oauth class exists with PHP to prevent conflict
Download this release

Release Info

Developer Access Keys
Plugin Icon 128x128 AccessPress Twitter Feed – Twitter Feed for WordPress
Version 1.2.5
Comparing to
See all releases

Code changes from version 1.2.4 to 1.2.5

accesspress-twitter-feed.php CHANGED
@@ -4,7 +4,7 @@ defined('ABSPATH') or die('No script kiddies please!');
4
  * Plugin Name: AccessPress Twitter Feed
5
  * Plugin URI: https://accesspressthemes.com/wordpress-plugins/accesspress-twitter-feed/
6
  * Description: A plugin to show your twitter feed in your site with various configurable settings
7
- * Version: 1.2.4
8
  * Author: AccessPress Themes
9
  * Author URI: http://accesspressthemes.com
10
  * Text Domain: ap-twitter-feed
@@ -24,7 +24,7 @@ if (!defined('APTF_CSS_DIR')) {
24
  define('APTF_CSS_DIR', plugin_dir_url(__FILE__) . 'css');
25
  }
26
  if (!defined('APTF_VERSION')) {
27
- define('APTF_VERSION', '1.2.4');
28
  }
29
 
30
  if (!defined('APTF_TD')) {
4
  * Plugin Name: AccessPress Twitter Feed
5
  * Plugin URI: https://accesspressthemes.com/wordpress-plugins/accesspress-twitter-feed/
6
  * Description: A plugin to show your twitter feed in your site with various configurable settings
7
+ * Version: 1.2.5
8
  * Author: AccessPress Themes
9
  * Author URI: http://accesspressthemes.com
10
  * Text Domain: ap-twitter-feed
24
  define('APTF_CSS_DIR', plugin_dir_url(__FILE__) . 'css');
25
  }
26
  if (!defined('APTF_VERSION')) {
27
+ define('APTF_VERSION', '1.2.5');
28
  }
29
 
30
  if (!defined('APTF_TD')) {
readme.txt CHANGED
@@ -4,7 +4,7 @@ Tags: twitter, twitter feeds, twitter slider, twitter feeds slider, twitter plug
4
  Donate link: http://accesspressthemes.com/donation/
5
  Requires at least: 3.8
6
  Tested up to: 4.2
7
- Stable tag: 1.2.4
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -107,6 +107,9 @@ Once you install the plugin , you can check some general documentation about how
107
 
108
 
109
  == Changelog ==
 
 
 
110
  = 1.2.4 =
111
  * Checked API class exists with PHP to prevent conflict
112
 
4
  Donate link: http://accesspressthemes.com/donation/
5
  Requires at least: 3.8
6
  Tested up to: 4.2
7
+ Stable tag: 1.2.5
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
107
 
108
 
109
  == Changelog ==
110
+ = 1.2.5 =
111
+ * Checked oauth class exists with PHP to prevent conflict
112
+
113
  = 1.2.4 =
114
  * Checked API class exists with PHP to prevent conflict
115
 
twitteroauth/OAuth.php CHANGED
@@ -9,6 +9,7 @@ if (!class_exists('OAuthException')) {
9
  }
10
  }
11
 
 
12
  class OAuthConsumer {
13
  public $key;
14
  public $secret;
@@ -23,7 +24,9 @@ class OAuthConsumer {
23
  return "OAuthConsumer[key=$this->key,secret=$this->secret]";
24
  }
25
  }
 
26
 
 
27
  class OAuthToken {
28
  // access tokens and request tokens
29
  public $key;
@@ -53,11 +56,13 @@ class OAuthToken {
53
  return $this->to_string();
54
  }
55
  }
 
56
 
57
  /**
58
  * A class for implementing a Signature Method
59
  * See section 9 ("Signing Requests") in the spec
60
  */
 
61
  abstract class OAuthSignatureMethod {
62
  /**
63
  * Needs to return the name of the Signature Method (ie HMAC-SHA1)
@@ -90,6 +95,7 @@ abstract class OAuthSignatureMethod {
90
  return $built == $signature;
91
  }
92
  }
 
93
 
94
  /**
95
  * The HMAC-SHA1 signature method uses the HMAC-SHA1 signature algorithm as defined in [RFC2104]
@@ -98,6 +104,7 @@ abstract class OAuthSignatureMethod {
98
  * character (ASCII code 38) even if empty.
99
  * - Chapter 9.2 ("HMAC-SHA1")
100
  */
 
101
  class OAuthSignatureMethod_HMAC_SHA1 extends OAuthSignatureMethod {
102
  function get_name() {
103
  return "HMAC-SHA1";
@@ -118,12 +125,14 @@ class OAuthSignatureMethod_HMAC_SHA1 extends OAuthSignatureMethod {
118
  return base64_encode(hash_hmac('sha1', $base_string, $key, true));
119
  }
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
  */
 
127
  class OAuthSignatureMethod_PLAINTEXT extends OAuthSignatureMethod {
128
  public function get_name() {
129
  return "PLAINTEXT";
@@ -151,6 +160,7 @@ class OAuthSignatureMethod_PLAINTEXT extends OAuthSignatureMethod {
151
  return $key;
152
  }
153
  }
 
154
 
155
  /**
156
  * The RSA-SHA1 signature method uses the RSASSA-PKCS1-v1_5 signature algorithm as defined in
@@ -160,6 +170,7 @@ class OAuthSignatureMethod_PLAINTEXT extends OAuthSignatureMethod {
160
  * specification.
161
  * - Chapter 9.3 ("RSA-SHA1")
162
  */
 
163
  abstract class OAuthSignatureMethod_RSA_SHA1 extends OAuthSignatureMethod {
164
  public function get_name() {
165
  return "RSA-SHA1";
@@ -218,7 +229,9 @@ abstract class OAuthSignatureMethod_RSA_SHA1 extends OAuthSignatureMethod {
218
  return $ok == 1;
219
  }
220
  }
 
221
 
 
222
  class OAuthRequest {
223
  private $parameters;
224
  private $http_method;
@@ -479,7 +492,9 @@ class OAuthRequest {
479
  return md5($mt . $rand); // md5s look nicer than numbers
480
  }
481
  }
 
482
 
 
483
  class OAuthServer {
484
  protected $timestamp_threshold = 300; // in seconds, five minutes
485
  protected $version = '1.0'; // hi blaine
@@ -690,7 +705,9 @@ class OAuthServer {
690
  }
691
 
692
  }
 
693
 
 
694
  class OAuthDataStore {
695
  function lookup_consumer($consumer_key) {
696
  // implement me
@@ -716,7 +733,9 @@ class OAuthDataStore {
716
  }
717
 
718
  }
 
719
 
 
720
  class OAuthUtil {
721
  public static function urlencode_rfc3986($input) {
722
  if (is_array($input)) {
@@ -872,3 +891,4 @@ class OAuthUtil {
872
  return implode('&', $pairs);
873
  }
874
  }
 
9
  }
10
  }
11
 
12
+ if(!class_exists('OAuthConsumer')){
13
  class OAuthConsumer {
14
  public $key;
15
  public $secret;
24
  return "OAuthConsumer[key=$this->key,secret=$this->secret]";
25
  }
26
  }
27
+ }
28
 
29
+ if(!class_exists('OAuthToken')){
30
  class OAuthToken {
31
  // access tokens and request tokens
32
  public $key;
56
  return $this->to_string();
57
  }
58
  }
59
+ }
60
 
61
  /**
62
  * A class for implementing a Signature Method
63
  * See section 9 ("Signing Requests") in the spec
64
  */
65
+ if(!class_exists('OAuthSignatureMethod')){
66
  abstract class OAuthSignatureMethod {
67
  /**
68
  * Needs to return the name of the Signature Method (ie HMAC-SHA1)
95
  return $built == $signature;
96
  }
97
  }
98
+ }
99
 
100
  /**
101
  * The HMAC-SHA1 signature method uses the HMAC-SHA1 signature algorithm as defined in [RFC2104]
104
  * character (ASCII code 38) even if empty.
105
  * - Chapter 9.2 ("HMAC-SHA1")
106
  */
107
+ if(!class_exists('OAuthSignatureMethod_HMAC_SHA1')){
108
  class OAuthSignatureMethod_HMAC_SHA1 extends OAuthSignatureMethod {
109
  function get_name() {
110
  return "HMAC-SHA1";
125
  return base64_encode(hash_hmac('sha1', $base_string, $key, true));
126
  }
127
  }
128
+ }
129
 
130
  /**
131
  * The PLAINTEXT method does not provide any security protection and SHOULD only be used
132
  * over a secure channel such as HTTPS. It does not use the Signature Base String.
133
  * - Chapter 9.4 ("PLAINTEXT")
134
  */
135
+ if(!class_exists('OAuthSignatureMethod_PLAINTEXT')){
136
  class OAuthSignatureMethod_PLAINTEXT extends OAuthSignatureMethod {
137
  public function get_name() {
138
  return "PLAINTEXT";
160
  return $key;
161
  }
162
  }
163
+ }
164
 
165
  /**
166
  * The RSA-SHA1 signature method uses the RSASSA-PKCS1-v1_5 signature algorithm as defined in
170
  * specification.
171
  * - Chapter 9.3 ("RSA-SHA1")
172
  */
173
+ if(!class_exists('OAuthSignatureMethod_RSA_SHA1')){
174
  abstract class OAuthSignatureMethod_RSA_SHA1 extends OAuthSignatureMethod {
175
  public function get_name() {
176
  return "RSA-SHA1";
229
  return $ok == 1;
230
  }
231
  }
232
+ }
233
 
234
+ if(!class_exists('OAuthRequest')){
235
  class OAuthRequest {
236
  private $parameters;
237
  private $http_method;
492
  return md5($mt . $rand); // md5s look nicer than numbers
493
  }
494
  }
495
+ }
496
 
497
+ if(!class_exists('OAuthServer')){
498
  class OAuthServer {
499
  protected $timestamp_threshold = 300; // in seconds, five minutes
500
  protected $version = '1.0'; // hi blaine
705
  }
706
 
707
  }
708
+ }
709
 
710
+ if(!class_exists('OAuthDataStore')){
711
  class OAuthDataStore {
712
  function lookup_consumer($consumer_key) {
713
  // implement me
733
  }
734
 
735
  }
736
+ }
737
 
738
+ if(!class_exists('OAuthUtil')){
739
  class OAuthUtil {
740
  public static function urlencode_rfc3986($input) {
741
  if (is_array($input)) {
891
  return implode('&', $pairs);
892
  }
893
  }
894
+ }