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