Skip to content

Commit

Permalink
refactor: remove simsocial()
Browse files Browse the repository at this point in the history
  • Loading branch information
devuri committed Dec 5, 2020
1 parent fa7fa15 commit f1d4d26
Showing 1 changed file with 13 additions and 30 deletions.
43 changes: 13 additions & 30 deletions sim-social.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,22 @@
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt
*/

// deny direct access.
// deny direct access.
if ( ! defined( 'WPINC' ) ) {
die;
die;
}

/**
* Load composer
*/
require_once 'vendor/autoload.php';

// require_once / schedule.
require_once plugin_dir_path( __FILE__ ) . '/src/schedule.php';

// require_once / shortcode.
require_once plugin_dir_path( __FILE__ ) . '/src/shortcode.php';

/**
* Setup some defualts setup activation schedule
*/
Expand Down Expand Up @@ -79,41 +90,13 @@
}
);

/**
* Load composer
*/
require_once 'vendor/autoload.php';

// require_once / schedule.
require_once plugin_dir_path( __FILE__ ) . '/src/schedule.php';

// require_once / shortcode.
require_once plugin_dir_path( __FILE__ ) . '/src/shortcode.php';

// register styles.
add_action( 'init', function() {

wp_register_style( 'igfeed-grid', plugin_dir_url( __FILE__ ) . 'assets/css/igfeed-gird.css', array(), '1.6.3', 'all' );
}
);

/**
* Setup the IG class
*/
function simsocial() {
/**
* Initialize the feed API
* how to get the token
*
* @link https://www.youtube.com/watch?v=rWUcb8jXgVA
*/
$instagram = new EspressoDev\InstagramBasicDisplay\InstagramBasicDisplay( get_option( 'simsf_token' )['access_token'] );

// Get IG the object.
return $instagram;
}


/**
* Create admin pages
*/
Expand Down

0 comments on commit f1d4d26

Please sign in to comment.