| 1 |
<?php |
| 2 |
/** |
| 3 |
* Instagram |
| 4 |
* |
| 5 |
* @package Powerkit |
| 6 |
* @subpackage Modules |
| 7 |
*/ |
| 8 |
|
| 9 |
/** |
| 10 |
* Init module |
| 11 |
*/ |
| 12 |
class Powerkit_Instagram extends Powerkit_Module { |
| 13 |
|
| 14 |
/** |
| 15 |
* Register module |
| 16 |
*/ |
| 17 |
public function register() { |
| 18 |
$this->name = esc_html__( 'Instagram Integration', 'powerkit' ); |
| 19 |
$this->desc = esc_html__( 'Display your Instagram feed in your sidebar with a widget or post content via a shortcode, including your Instagram profile image, number of followers, as well as number of comments and likes per each image in the feed.', 'powerkit' ); |
| 20 |
$this->slug = 'instagram_integration'; |
| 21 |
$this->type = 'default'; |
| 22 |
$this->category = 'social'; |
| 23 |
$this->priority = 60; |
| 24 |
$this->public = true; |
| 25 |
$this->enabled = true; |
| 26 |
$this->load_extensions = array( |
| 27 |
'connect', |
| 28 |
); |
| 29 |
$this->links = array( |
| 30 |
array( |
| 31 |
'name' => esc_html__( 'Connect', 'powerkit' ), |
| 32 |
'url' => powerkit_get_page_url( 'connect&tab=instagram' ), |
| 33 |
), |
| 34 |
array( |
| 35 |
'name' => esc_html__( 'Clear cache', 'powerkit' ), |
| 36 |
'url' => powerkit_get_page_url( $this->slug . '&action=powerkit_reset_cache' ), |
| 37 |
), |
| 38 |
array( |
| 39 |
'name' => esc_html__( 'View documentation', 'powerkit' ), |
| 40 |
'url' => powerkit_get_setting( 'documentation' ) . '/social-integrations/instagram-integration/', |
| 41 |
'target' => '_blank', |
| 42 |
), |
| 43 |
); |
| 44 |
} |
| 45 |
|
| 46 |
/** |
| 47 |
* Initialize module |
| 48 |
*/ |
| 49 |
public function initialize() { |
| 50 |
|
| 51 |
/* Load the required dependencies for this module */ |
| 52 |
|
| 53 |
// Helpers Functions for the module. |
| 54 |
require_once dirname( __FILE__ ) . '/helpers/helper-powerkit-instagram.php'; |
| 55 |
require_once dirname( __FILE__ ) . '/helpers/helper-powerkit-instagram-connect-list.php'; |
| 56 |
|
| 57 |
// The classes responsible for defining all actions. |
| 58 |
require_once dirname( __FILE__ ) . '/public/class-powerkit-instagram-shortcode.php'; |
| 59 |
require_once dirname( __FILE__ ) . '/public/class-powerkit-instagram-widget.php'; |
| 60 |
|
| 61 |
if ( function_exists( 'register_block_type' ) ) { |
| 62 |
require_once dirname( __FILE__ ) . '/public/class-powerkit-instagram-block.php'; |
| 63 |
} |
| 64 |
|
| 65 |
// Admin and public area. |
| 66 |
require_once dirname( __FILE__ ) . '/admin/class-powerkit-instagram-admin.php'; |
| 67 |
require_once dirname( __FILE__ ) . '/public/class-powerkit-instagram-public.php'; |
| 68 |
|
| 69 |
new Powerkit_Instagram_Admin( $this->slug ); |
| 70 |
new Powerkit_Instagram_Public( $this->slug ); |
| 71 |
} |
| 72 |
} |
| 73 |
|
| 74 |
new Powerkit_Instagram(); |
| 75 |
|