Changeset 2739184
- Timestamp:
- 06/08/2022 10:54:58 AM (4 years ago)
- Location:
- fetch-some-tweets
- Files:
-
- 44 added
- 2 deleted
- 2 edited
-
branches (deleted)
-
trunk/Readme.txt (modified) (2 diffs)
-
trunk/composer.json (added)
-
trunk/composer.lock (added)
-
trunk/fetch-some-tweets.php (modified) (6 diffs)
-
trunk/twitterOauth (deleted)
-
trunk/vendor (added)
-
trunk/vendor/abraham (added)
-
trunk/vendor/abraham/twitteroauth (added)
-
trunk/vendor/abraham/twitteroauth/LICENSE.md (added)
-
trunk/vendor/abraham/twitteroauth/autoload.php (added)
-
trunk/vendor/abraham/twitteroauth/composer.json (added)
-
trunk/vendor/abraham/twitteroauth/composer.lock (added)
-
trunk/vendor/abraham/twitteroauth/rector.php (added)
-
trunk/vendor/abraham/twitteroauth/src (added)
-
trunk/vendor/abraham/twitteroauth/src/Config.php (added)
-
trunk/vendor/abraham/twitteroauth/src/Consumer.php (added)
-
trunk/vendor/abraham/twitteroauth/src/HmacSha1.php (added)
-
trunk/vendor/abraham/twitteroauth/src/Request.php (added)
-
trunk/vendor/abraham/twitteroauth/src/Response.php (added)
-
trunk/vendor/abraham/twitteroauth/src/SignatureMethod.php (added)
-
trunk/vendor/abraham/twitteroauth/src/Token.php (added)
-
trunk/vendor/abraham/twitteroauth/src/TwitterOAuth.php (added)
-
trunk/vendor/abraham/twitteroauth/src/TwitterOAuthException.php (added)
-
trunk/vendor/abraham/twitteroauth/src/Util (added)
-
trunk/vendor/abraham/twitteroauth/src/Util.php (added)
-
trunk/vendor/abraham/twitteroauth/src/Util/JsonDecoder.php (added)
-
trunk/vendor/autoload.php (added)
-
trunk/vendor/composer (added)
-
trunk/vendor/composer/ClassLoader.php (added)
-
trunk/vendor/composer/InstalledVersions.php (added)
-
trunk/vendor/composer/LICENSE (added)
-
trunk/vendor/composer/autoload_classmap.php (added)
-
trunk/vendor/composer/autoload_namespaces.php (added)
-
trunk/vendor/composer/autoload_psr4.php (added)
-
trunk/vendor/composer/autoload_real.php (added)
-
trunk/vendor/composer/autoload_static.php (added)
-
trunk/vendor/composer/ca-bundle (added)
-
trunk/vendor/composer/ca-bundle/LICENSE (added)
-
trunk/vendor/composer/ca-bundle/README.md (added)
-
trunk/vendor/composer/ca-bundle/composer.json (added)
-
trunk/vendor/composer/ca-bundle/res (added)
-
trunk/vendor/composer/ca-bundle/res/cacert.pem (added)
-
trunk/vendor/composer/ca-bundle/src (added)
-
trunk/vendor/composer/ca-bundle/src/CaBundle.php (added)
-
trunk/vendor/composer/installed.json (added)
-
trunk/vendor/composer/installed.php (added)
-
trunk/vendor/composer/platform_check.php (added)
Legend:
- Unmodified
- Added
- Removed
-
fetch-some-tweets/trunk/Readme.txt
r2572401 r2739184 3 3 Tags: twitter, twitter feed, json, php 4 4 Donate link: paypal.me/pixelsandthings 5 Requires at least: 4.06 Tested up to: 5.87 Requires PHP: 7. 05 Requires at least: 5.5 6 Tested up to: 6.0 7 Requires PHP: 7.4 8 8 Stable tag: trunk 9 9 License: GPL-2.0+ … … 69 69 = V1.3.61 = 70 70 * Fixed issues with uninstallation. 71 72 = V1.4 = 73 * Upgraded Twitter OAuth Library & made to be compatible with PHP 8.0. 74 71 75 == Upgrade Notice == -
fetch-some-tweets/trunk/fetch-some-tweets.php
r2572401 r2739184 9 9 Plugin Name: Fetch Some Tweets 10 10 Plugin URI: http://www.pixelsandthings.co.uk 11 Description: JSON Driven PHP Twitter Feed - Twitter API 1.112 Version: 1. 3.511 Description: JSON Driven PHP Twitter Feed via Twitter API 12 Version: 1.4 13 13 Author: Pixels & Things 14 14 Author URI: https://www.pixelsandthings.co.uk … … 32 32 ----------------------------------------------------------------------------- */ 33 33 34 define( 'PLUGIN_NAME_VERSION', '1. 2' );34 define( 'PLUGIN_NAME_VERSION', '1.3' ); 35 35 36 36 … … 39 39 ----------------------------------------------------------------------------- */ 40 40 41 require_once 'twitterOauth/autoload.php'; 41 if ( is_readable( __DIR__ . '/vendor/autoload.php' ) ) { 42 require __DIR__ . '/vendor/autoload.php'; 43 } 44 42 45 use Abraham\TwitterOAuth\TwitterOAuth; 43 46 … … 272 275 // Key & Tokens 273 276 $options = get_option( 'fst_settings' ); 274 $consumer_key = $options['fst_text_field_0']; 275 $consumer_secret = $options['fst_text_field_1']; 276 $access_token = $options['fst_text_field_2']; 277 $access_token_secret = $options['fst_text_field_3']; 277 278 if(isset($options['fst_text_field_0'])): 279 $consumer_key = $options['fst_text_field_0']; 280 endif; 281 282 if(isset($options['fst_text_field_1'])): 283 $consumer_secret = $options['fst_text_field_1']; 284 endif; 285 286 if(isset($options['fst_text_field_2'])): 287 $access_token = $options['fst_text_field_2']; 288 endif; 289 290 if(isset($options['fst_text_field_3'])): 291 $access_token_secret = $options['fst_text_field_3']; 292 endif; 278 293 279 294 // User Details 280 $screen_name = $options['fst_text_field_4']; 281 $tweet_count = $options['fst_text_field_5']; 295 if(isset($options['fst_text_field_4'])): 296 $screen_name = $options['fst_text_field_4']; 297 endif; 298 299 if(isset($options['fst_text_field_5'])): 300 $tweet_count = $options['fst_text_field_5']; 301 endif; 282 302 283 303 // Timeline Options 284 $include_retweets = $options['fst_text_field_6']; 285 $exclude_replies = $options['fst_text_field_7']; 304 if(isset($options['fst_text_field_6'])): 305 $include_retweets = $options['fst_text_field_6']; 306 endif; 307 308 if(isset($options['fst_text_field_7'])): 309 $exclude_replies = $options['fst_text_field_7']; 310 endif; 286 311 287 312 // Connect to Twitter API - https://github.com/abraham/twitteroauth … … 363 388 // Tweet Status 364 389 $retweet = $tweet->retweeted; 365 $quoted_retweet = $tweet->quoted_status; 390 391 if(isset($tweet->quoted_status)): 392 $quoted_retweet = $tweet->quoted_status; 393 endif; 394 366 395 $reply = $tweet->in_reply_to_status_id; 367 396 … … 410 439 411 440 // Tweet Type - Tweet, Retweet, Quoted Retweet or Reply 412 if( $retweet){441 if( isset( $retweet ) ){ 413 442 $tweet_user_timeline .= '<span class="tweet-type">Retweet</span> <span class="seperator"> - </span>'; 414 } elseif( $quoted_retweet){443 } elseif( isset( $quoted_retweet ) ){ 415 444 $tweet_user_timeline .= '<span class="tweet-type">Quoted Retweet</span> <span class="seperator"> - </span>'; 416 } elseif( $reply){445 } elseif( isset( $reply ) ){ 417 446 $tweet_user_timeline .= '<span class="tweet-type">Reply</span> <span class="seperator"> - </span>'; 418 447 } else {
Note: See TracChangeset
for help on using the changeset viewer.