Plugin Directory

Changeset 3019040


Ignore:
Timestamp:
01/09/2024 03:50:15 AM (14 months ago)
Author:
icelayer
Message:

Update to version 2.9.3 from GitHub

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  
    11=== Sim Social Feed ===
    22Contributors: icelayer
    3 Donate link: https://switchwebdev.com/wordpress-plugins/
     3Donate link: https://wpbrisko.com/wordpress-plugins/
    44Tags: Instagram, Instagram photos, Instagram feed, Instagram widget, Instagram gallery
    55Requires at least: 3.4
    66Tested up to: 5.7
    7 Stable tag: 2.8.2
     7Stable tag: 2.9.3
    88Requires PHP: 5.6
    99License: GPLv2 or later
  • sim-social-feed/tags/2.9.3/sim-social.php

    r2500707 r3019040  
    11<?php
    22/**
    3  * Sim Social Feed
    4  *
    5  * @package   SimSocialFeed
    6  * @author    Uriel Wilson
    7  * @copyright 2020 Uriel Wilson
    8  * @license   GPL-2.0
    9  * @link      https://urielwilson.com
    103 *
    114 * @wordpress-plugin
    125 * Plugin Name:       Sim Social Feed
    13  * Plugin URI:        https://switchwebdev.com/wordpress-plugins/
     6 * Plugin URI:        https://wpbrisko.com/wordpress-plugins/
    147 * 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.2
     8 * Version:           2.9.3
    169 * Requires at least: 3.4
    1710 * Requires PHP:      5.6
    18  * Author:            SwitchWebdev.com
    19  * Author URI:        https://switchwebdev.com
     11 * Author:            wpbrisko.com
     12 * Author URI:        https://wpbrisko.com
    2013 * Text Domain:       sim-social-feed
    2114 * Domain Path:       languages
     
    2922    }
    3023
    31     /**
    32      * Load composer
    33      */
     24    // Load composer.
    3425    require_once 'vendor/autoload.php';
    3526
    36     /**
    37      * Setup some defualts setup activation schedule
    38      */
     27    // Setup some defualts setup activation schedule.
    3928    register_activation_hook( __FILE__, function() {
    4029
     
    4938            }
    5039
    51             /**
    52              * Setup some defaults
    53              */
     40            // Setup some defaults.
    5441            $simsf_token = array();
    5542            $simsf_token['token'] = null;
     
    6249    );
    6350
    64     /**
    65      * Handle Deactivation
    66      */
     51    // Handle Deactivation.
    6752    register_deactivation_hook( __FILE__, function() {
    6853
    69             /**
    70              * Remove the scheduled event
    71              */
     54            // Remove the scheduled event.
    7255            wp_clear_scheduled_hook( 'sim_social_feed_cron' );
    7356
    74             /**
    75              * Setup some defaults
    76              */
     57            // Setup some defaults.
    7758            $simsf_token = array();
    7859            $simsf_token['token'] = null;
     
    9273    );
    9374
    94     /**
    95      * Create admin pages
    96      */
     75    // Create admin pages.
    9776    SimSocialFeed\Admin\SocialFeedAdmin::init();
  • sim-social-feed/tags/2.9.3/src/InstagramData.php

    r2470386 r3019040  
    9797     */
    9898    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();
    102100    }
    103101
     
    185183    public static function refresh_token() {
    186184
     185        /* get previous update date */
     186        $previously = date_i18n( get_option( 'date_format' ), $user_token['created_at'] );
     187
     188        /* setup api */
    187189        $newtoken = self::api()->refreshToken( self::access_token() );
    188190        $user_token = (array) $newtoken;
     
    195197        $user_token['created_at']  = time();
    196198        $user_token['refresh']     = true;
    197        
     199
    198200        // update token option.
    199201        update_option('simsf_access_token', $user_token );
     
    208210        // email message.
    209211        $message = __(
    210         'Hi,
     212        'Hey there!
    211213
    212214        This notification confirms that your Instagram User Access Token Has Been Updated on ###SITENAME###.
     
    216218        Refreshed tokens are valid for 60 days from the date at which they are refreshed.
    217219        The Sim Social Feed plugin will automatically refresh your Access Token before it expires.
     220
     221        Token was last Updated: ###PREVIOUS###
    218222
    219223        This email has been sent to ###ADMIN_EMAIL###.
     
    229233        $message = str_replace( '###CREATED###', $token_created, $message );
    230234        $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
    235240        $igtoken = array();
    236241        $igtoken['access_token'] = get_option('simsf_access_token')['access_token'];
    237242        $igtoken['reset'] = false;
    238243
    239         # set new token value
     244        // set new token value
    240245        update_option('simsf_token', $igtoken );
    241246
     
    244249
    245250        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' );
    246263    }
    247264
     
    284301        if ( self::has_refresh() ) {
    285302            $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);
    288304        }
    289305        return 'no date was found ! ';
  • sim-social-feed/tags/2.9.3/uninstall.php

    r2470386 r3019040  
    11<?php
    2 /**
    3  *  Uninstall stuff.
    4  *  do some cleanup after user uninstalls the plugin
    5  *  ---------------------------------------------------------------------------
    6  *  -remove stuff
    7  * ----------------------------------------------------------------------------
    8  *
    9  * @category   Plugin
    10  * @copyright  Copyright © 2020 Uriel Wilson.
    11  * @package    SimSocialFeed
    12  * @author     Uriel Wilson
    13  * @link       https://switchwebdev.com
    14  *  ----------------------------------------------------------------------------
    15  */
    162
    173    // deny direct access.
     
    2814    delete_option( 'simsf_user' );
    2915    delete_option( 'simsf_user_media' );
     16    delete_option( 'simsf_notification_email' );
    3017
    3118
  • sim-social-feed/trunk/readme.txt

    r2500707 r3019040  
    11=== Sim Social Feed ===
    22Contributors: icelayer
    3 Donate link: https://switchwebdev.com/wordpress-plugins/
     3Donate link: https://wpbrisko.com/wordpress-plugins/
    44Tags: Instagram, Instagram photos, Instagram feed, Instagram widget, Instagram gallery
    55Requires at least: 3.4
    66Tested up to: 5.7
    7 Stable tag: 2.8.2
     7Stable tag: 2.9.3
    88Requires PHP: 5.6
    99License: GPLv2 or later
  • sim-social-feed/trunk/sim-social.php

    r2500707 r3019040  
    11<?php
    22/**
    3  * Sim Social Feed
    4  *
    5  * @package   SimSocialFeed
    6  * @author    Uriel Wilson
    7  * @copyright 2020 Uriel Wilson
    8  * @license   GPL-2.0
    9  * @link      https://urielwilson.com
    103 *
    114 * @wordpress-plugin
    125 * Plugin Name:       Sim Social Feed
    13  * Plugin URI:        https://switchwebdev.com/wordpress-plugins/
     6 * Plugin URI:        https://wpbrisko.com/wordpress-plugins/
    147 * 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.2
     8 * Version:           2.9.3
    169 * Requires at least: 3.4
    1710 * Requires PHP:      5.6
    18  * Author:            SwitchWebdev.com
    19  * Author URI:        https://switchwebdev.com
     11 * Author:            wpbrisko.com
     12 * Author URI:        https://wpbrisko.com
    2013 * Text Domain:       sim-social-feed
    2114 * Domain Path:       languages
     
    2922    }
    3023
    31     /**
    32      * Load composer
    33      */
     24    // Load composer.
    3425    require_once 'vendor/autoload.php';
    3526
    36     /**
    37      * Setup some defualts setup activation schedule
    38      */
     27    // Setup some defualts setup activation schedule.
    3928    register_activation_hook( __FILE__, function() {
    4029
     
    4938            }
    5039
    51             /**
    52              * Setup some defaults
    53              */
     40            // Setup some defaults.
    5441            $simsf_token = array();
    5542            $simsf_token['token'] = null;
     
    6249    );
    6350
    64     /**
    65      * Handle Deactivation
    66      */
     51    // Handle Deactivation.
    6752    register_deactivation_hook( __FILE__, function() {
    6853
    69             /**
    70              * Remove the scheduled event
    71              */
     54            // Remove the scheduled event.
    7255            wp_clear_scheduled_hook( 'sim_social_feed_cron' );
    7356
    74             /**
    75              * Setup some defaults
    76              */
     57            // Setup some defaults.
    7758            $simsf_token = array();
    7859            $simsf_token['token'] = null;
     
    9273    );
    9374
    94     /**
    95      * Create admin pages
    96      */
     75    // Create admin pages.
    9776    SimSocialFeed\Admin\SocialFeedAdmin::init();
  • sim-social-feed/trunk/src/InstagramData.php

    r2470386 r3019040  
    9797     */
    9898    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();
    102100    }
    103101
     
    185183    public static function refresh_token() {
    186184
     185        /* get previous update date */
     186        $previously = date_i18n( get_option( 'date_format' ), $user_token['created_at'] );
     187
     188        /* setup api */
    187189        $newtoken = self::api()->refreshToken( self::access_token() );
    188190        $user_token = (array) $newtoken;
     
    195197        $user_token['created_at']  = time();
    196198        $user_token['refresh']     = true;
    197        
     199
    198200        // update token option.
    199201        update_option('simsf_access_token', $user_token );
     
    208210        // email message.
    209211        $message = __(
    210         'Hi,
     212        'Hey there!
    211213
    212214        This notification confirms that your Instagram User Access Token Has Been Updated on ###SITENAME###.
     
    216218        Refreshed tokens are valid for 60 days from the date at which they are refreshed.
    217219        The Sim Social Feed plugin will automatically refresh your Access Token before it expires.
     220
     221        Token was last Updated: ###PREVIOUS###
    218222
    219223        This email has been sent to ###ADMIN_EMAIL###.
     
    229233        $message = str_replace( '###CREATED###', $token_created, $message );
    230234        $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
    235240        $igtoken = array();
    236241        $igtoken['access_token'] = get_option('simsf_access_token')['access_token'];
    237242        $igtoken['reset'] = false;
    238243
    239         # set new token value
     244        // set new token value
    240245        update_option('simsf_token', $igtoken );
    241246
     
    244249
    245250        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' );
    246263    }
    247264
     
    284301        if ( self::has_refresh() ) {
    285302            $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);
    288304        }
    289305        return 'no date was found ! ';
  • sim-social-feed/trunk/uninstall.php

    r2470386 r3019040  
    11<?php
    2 /**
    3  *  Uninstall stuff.
    4  *  do some cleanup after user uninstalls the plugin
    5  *  ---------------------------------------------------------------------------
    6  *  -remove stuff
    7  * ----------------------------------------------------------------------------
    8  *
    9  * @category   Plugin
    10  * @copyright  Copyright © 2020 Uriel Wilson.
    11  * @package    SimSocialFeed
    12  * @author     Uriel Wilson
    13  * @link       https://switchwebdev.com
    14  *  ----------------------------------------------------------------------------
    15  */
    162
    173    // deny direct access.
     
    2814    delete_option( 'simsf_user' );
    2915    delete_option( 'simsf_user_media' );
     16    delete_option( 'simsf_notification_email' );
    3017
    3118
Note: See TracChangeset for help on using the changeset viewer.