Changeset 3019040
- Timestamp:
- 01/09/2024 03:50:15 AM (14 months ago)
- Location:
- sim-social-feed
- Files:
-
- 2 added
- 8 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
sim-social-feed/tags/2.9.3/readme.txt
r2500707 r3019040 1 1 === Sim Social Feed === 2 2 Contributors: icelayer 3 Donate link: https:// switchwebdev.com/wordpress-plugins/3 Donate link: https://wpbrisko.com/wordpress-plugins/ 4 4 Tags: Instagram, Instagram photos, Instagram feed, Instagram widget, Instagram gallery 5 5 Requires at least: 3.4 6 6 Tested up to: 5.7 7 Stable tag: 2. 8.27 Stable tag: 2.9.3 8 8 Requires PHP: 5.6 9 9 License: GPLv2 or later -
sim-social-feed/tags/2.9.3/sim-social.php
r2500707 r3019040 1 1 <?php 2 2 /** 3 * Sim Social Feed4 *5 * @package SimSocialFeed6 * @author Uriel Wilson7 * @copyright 2020 Uriel Wilson8 * @license GPL-2.09 * @link https://urielwilson.com10 3 * 11 4 * @wordpress-plugin 12 5 * Plugin Name: Sim Social Feed 13 * Plugin URI: https:// switchwebdev.com/wordpress-plugins/6 * Plugin URI: https://wpbrisko.com/wordpress-plugins/ 14 7 * Description: Easily Display Social Media Photo Feed for Instagram. The feed will schedule twicedaily updates, you can also update manually with a single click. 15 * Version: 2. 8.28 * Version: 2.9.3 16 9 * Requires at least: 3.4 17 10 * Requires PHP: 5.6 18 * Author: SwitchWebdev.com19 * Author URI: https:// switchwebdev.com11 * Author: wpbrisko.com 12 * Author URI: https://wpbrisko.com 20 13 * Text Domain: sim-social-feed 21 14 * Domain Path: languages … … 29 22 } 30 23 31 /** 32 * Load composer 33 */ 24 // Load composer. 34 25 require_once 'vendor/autoload.php'; 35 26 36 /** 37 * Setup some defualts setup activation schedule 38 */ 27 // Setup some defualts setup activation schedule. 39 28 register_activation_hook( __FILE__, function() { 40 29 … … 49 38 } 50 39 51 /** 52 * Setup some defaults 53 */ 40 // Setup some defaults. 54 41 $simsf_token = array(); 55 42 $simsf_token['token'] = null; … … 62 49 ); 63 50 64 /** 65 * Handle Deactivation 66 */ 51 // Handle Deactivation. 67 52 register_deactivation_hook( __FILE__, function() { 68 53 69 /** 70 * Remove the scheduled event 71 */ 54 // Remove the scheduled event. 72 55 wp_clear_scheduled_hook( 'sim_social_feed_cron' ); 73 56 74 /** 75 * Setup some defaults 76 */ 57 // Setup some defaults. 77 58 $simsf_token = array(); 78 59 $simsf_token['token'] = null; … … 92 73 ); 93 74 94 /** 95 * Create admin pages 96 */ 75 // Create admin pages. 97 76 SimSocialFeed\Admin\SocialFeedAdmin::init(); -
sim-social-feed/tags/2.9.3/src/InstagramData.php
r2470386 r3019040 97 97 */ 98 98 public static function user_profile() { 99 $user = self::api()->getUserProfile(); 100 $user_data = (array) $user; 101 return $user_data; 99 return (array) self::api()->getUserProfile(); 102 100 } 103 101 … … 185 183 public static function refresh_token() { 186 184 185 /* get previous update date */ 186 $previously = date_i18n( get_option( 'date_format' ), $user_token['created_at'] ); 187 188 /* setup api */ 187 189 $newtoken = self::api()->refreshToken( self::access_token() ); 188 190 $user_token = (array) $newtoken; … … 195 197 $user_token['created_at'] = time(); 196 198 $user_token['refresh'] = true; 197 199 198 200 // update token option. 199 201 update_option('simsf_access_token', $user_token ); … … 208 210 // email message. 209 211 $message = __( 210 'H i,212 'Hey there! 211 213 212 214 This notification confirms that your Instagram User Access Token Has Been Updated on ###SITENAME###. … … 216 218 Refreshed tokens are valid for 60 days from the date at which they are refreshed. 217 219 The Sim Social Feed plugin will automatically refresh your Access Token before it expires. 220 221 Token was last Updated: ###PREVIOUS### 218 222 219 223 This email has been sent to ###ADMIN_EMAIL###. … … 229 233 $message = str_replace( '###CREATED###', $token_created, $message ); 230 234 $message = str_replace( '###EXPIRES###', $token_will_expire, $message ); 231 $message = str_replace( '###ADMIN_EMAIL###', get_option( 'admin_email' ), $message ); 232 233 234 # new token array 235 $message = str_replace( '###PREVIOUS###', $previously, $message ); 236 //$message = str_replace( '###ADMIN_EMAIL###', get_option( 'admin_email' ), $message ); 237 $message = str_replace( '###ADMIN_EMAIL###', self::notification_email(), $message ); 238 239 // new token array 235 240 $igtoken = array(); 236 241 $igtoken['access_token'] = get_option('simsf_access_token')['access_token']; 237 242 $igtoken['reset'] = false; 238 243 239 #set new token value244 // set new token value 240 245 update_option('simsf_token', $igtoken ); 241 246 … … 244 249 245 250 return $user_token; 251 } 252 253 /** 254 * Notification about auto updates. 255 * 256 * @return string . 257 */ 258 public static function notification_email() { 259 if ( get_option( 'simsf_notification_email', false ) ) { 260 return get_option( 'simsf_notification_email' ); 261 } 262 get_option( 'admin_email' ); 246 263 } 247 264 … … 284 301 if ( self::has_refresh() ) { 285 302 $created_date = get_option( 'simsf_access_token' )['created_at']; 286 $date = date_i18n( get_option( 'date_format' ), $created_date); 287 return $date; 303 return date_i18n( get_option( 'date_format' ), $created_date); 288 304 } 289 305 return 'no date was found ! '; -
sim-social-feed/tags/2.9.3/uninstall.php
r2470386 r3019040 1 1 <?php 2 /**3 * Uninstall stuff.4 * do some cleanup after user uninstalls the plugin5 * ---------------------------------------------------------------------------6 * -remove stuff7 * ----------------------------------------------------------------------------8 *9 * @category Plugin10 * @copyright Copyright © 2020 Uriel Wilson.11 * @package SimSocialFeed12 * @author Uriel Wilson13 * @link https://switchwebdev.com14 * ----------------------------------------------------------------------------15 */16 2 17 3 // deny direct access. … … 28 14 delete_option( 'simsf_user' ); 29 15 delete_option( 'simsf_user_media' ); 16 delete_option( 'simsf_notification_email' ); 30 17 31 18 -
sim-social-feed/trunk/readme.txt
r2500707 r3019040 1 1 === Sim Social Feed === 2 2 Contributors: icelayer 3 Donate link: https:// switchwebdev.com/wordpress-plugins/3 Donate link: https://wpbrisko.com/wordpress-plugins/ 4 4 Tags: Instagram, Instagram photos, Instagram feed, Instagram widget, Instagram gallery 5 5 Requires at least: 3.4 6 6 Tested up to: 5.7 7 Stable tag: 2. 8.27 Stable tag: 2.9.3 8 8 Requires PHP: 5.6 9 9 License: GPLv2 or later -
sim-social-feed/trunk/sim-social.php
r2500707 r3019040 1 1 <?php 2 2 /** 3 * Sim Social Feed4 *5 * @package SimSocialFeed6 * @author Uriel Wilson7 * @copyright 2020 Uriel Wilson8 * @license GPL-2.09 * @link https://urielwilson.com10 3 * 11 4 * @wordpress-plugin 12 5 * Plugin Name: Sim Social Feed 13 * Plugin URI: https:// switchwebdev.com/wordpress-plugins/6 * Plugin URI: https://wpbrisko.com/wordpress-plugins/ 14 7 * Description: Easily Display Social Media Photo Feed for Instagram. The feed will schedule twicedaily updates, you can also update manually with a single click. 15 * Version: 2. 8.28 * Version: 2.9.3 16 9 * Requires at least: 3.4 17 10 * Requires PHP: 5.6 18 * Author: SwitchWebdev.com19 * Author URI: https:// switchwebdev.com11 * Author: wpbrisko.com 12 * Author URI: https://wpbrisko.com 20 13 * Text Domain: sim-social-feed 21 14 * Domain Path: languages … … 29 22 } 30 23 31 /** 32 * Load composer 33 */ 24 // Load composer. 34 25 require_once 'vendor/autoload.php'; 35 26 36 /** 37 * Setup some defualts setup activation schedule 38 */ 27 // Setup some defualts setup activation schedule. 39 28 register_activation_hook( __FILE__, function() { 40 29 … … 49 38 } 50 39 51 /** 52 * Setup some defaults 53 */ 40 // Setup some defaults. 54 41 $simsf_token = array(); 55 42 $simsf_token['token'] = null; … … 62 49 ); 63 50 64 /** 65 * Handle Deactivation 66 */ 51 // Handle Deactivation. 67 52 register_deactivation_hook( __FILE__, function() { 68 53 69 /** 70 * Remove the scheduled event 71 */ 54 // Remove the scheduled event. 72 55 wp_clear_scheduled_hook( 'sim_social_feed_cron' ); 73 56 74 /** 75 * Setup some defaults 76 */ 57 // Setup some defaults. 77 58 $simsf_token = array(); 78 59 $simsf_token['token'] = null; … … 92 73 ); 93 74 94 /** 95 * Create admin pages 96 */ 75 // Create admin pages. 97 76 SimSocialFeed\Admin\SocialFeedAdmin::init(); -
sim-social-feed/trunk/src/InstagramData.php
r2470386 r3019040 97 97 */ 98 98 public static function user_profile() { 99 $user = self::api()->getUserProfile(); 100 $user_data = (array) $user; 101 return $user_data; 99 return (array) self::api()->getUserProfile(); 102 100 } 103 101 … … 185 183 public static function refresh_token() { 186 184 185 /* get previous update date */ 186 $previously = date_i18n( get_option( 'date_format' ), $user_token['created_at'] ); 187 188 /* setup api */ 187 189 $newtoken = self::api()->refreshToken( self::access_token() ); 188 190 $user_token = (array) $newtoken; … … 195 197 $user_token['created_at'] = time(); 196 198 $user_token['refresh'] = true; 197 199 198 200 // update token option. 199 201 update_option('simsf_access_token', $user_token ); … … 208 210 // email message. 209 211 $message = __( 210 'H i,212 'Hey there! 211 213 212 214 This notification confirms that your Instagram User Access Token Has Been Updated on ###SITENAME###. … … 216 218 Refreshed tokens are valid for 60 days from the date at which they are refreshed. 217 219 The Sim Social Feed plugin will automatically refresh your Access Token before it expires. 220 221 Token was last Updated: ###PREVIOUS### 218 222 219 223 This email has been sent to ###ADMIN_EMAIL###. … … 229 233 $message = str_replace( '###CREATED###', $token_created, $message ); 230 234 $message = str_replace( '###EXPIRES###', $token_will_expire, $message ); 231 $message = str_replace( '###ADMIN_EMAIL###', get_option( 'admin_email' ), $message ); 232 233 234 # new token array 235 $message = str_replace( '###PREVIOUS###', $previously, $message ); 236 //$message = str_replace( '###ADMIN_EMAIL###', get_option( 'admin_email' ), $message ); 237 $message = str_replace( '###ADMIN_EMAIL###', self::notification_email(), $message ); 238 239 // new token array 235 240 $igtoken = array(); 236 241 $igtoken['access_token'] = get_option('simsf_access_token')['access_token']; 237 242 $igtoken['reset'] = false; 238 243 239 #set new token value244 // set new token value 240 245 update_option('simsf_token', $igtoken ); 241 246 … … 244 249 245 250 return $user_token; 251 } 252 253 /** 254 * Notification about auto updates. 255 * 256 * @return string . 257 */ 258 public static function notification_email() { 259 if ( get_option( 'simsf_notification_email', false ) ) { 260 return get_option( 'simsf_notification_email' ); 261 } 262 get_option( 'admin_email' ); 246 263 } 247 264 … … 284 301 if ( self::has_refresh() ) { 285 302 $created_date = get_option( 'simsf_access_token' )['created_at']; 286 $date = date_i18n( get_option( 'date_format' ), $created_date); 287 return $date; 303 return date_i18n( get_option( 'date_format' ), $created_date); 288 304 } 289 305 return 'no date was found ! '; -
sim-social-feed/trunk/uninstall.php
r2470386 r3019040 1 1 <?php 2 /**3 * Uninstall stuff.4 * do some cleanup after user uninstalls the plugin5 * ---------------------------------------------------------------------------6 * -remove stuff7 * ----------------------------------------------------------------------------8 *9 * @category Plugin10 * @copyright Copyright © 2020 Uriel Wilson.11 * @package SimSocialFeed12 * @author Uriel Wilson13 * @link https://switchwebdev.com14 * ----------------------------------------------------------------------------15 */16 2 17 3 // deny direct access. … … 28 14 delete_option( 'simsf_user' ); 29 15 delete_option( 'simsf_user_media' ); 16 delete_option( 'simsf_notification_email' ); 30 17 31 18
Note: See TracChangeset
for help on using the changeset viewer.