| 1 |
<?php |
| 2 |
/** |
| 3 |
* Social Links |
| 4 |
* |
| 5 |
* @package Powerkit |
| 6 |
* @subpackage Modules |
| 7 |
*/ |
| 8 |
|
| 9 |
/** |
| 10 |
* Init module |
| 11 |
*/ |
| 12 |
class Powerkit_Opt_In_Forms extends Powerkit_Module { |
| 13 |
|
| 14 |
/** |
| 15 |
* Register module |
| 16 |
*/ |
| 17 |
public function register() { |
| 18 |
$this->name = esc_html__( 'Opt-in Forms', 'powerkit' ); |
| 19 |
$this->desc = esc_html__( 'Easily add opt-in (subscription) forms to your website and grow your subscribers’ list with the Opt-In Forms module.', 'powerkit' ); |
| 20 |
$this->slug = 'opt_in_forms'; |
| 21 |
$this->type = 'default'; |
| 22 |
$this->category = 'forms'; |
| 23 |
$this->priority = 70; |
| 24 |
$this->public = true; |
| 25 |
$this->enabled = true; |
| 26 |
$this->links = array( |
| 27 |
array( |
| 28 |
'name' => esc_html__( 'Go to settings', 'powerkit' ), |
| 29 |
'url' => powerkit_get_page_url( $this->slug ), |
| 30 |
), |
| 31 |
array( |
| 32 |
'name' => esc_html__( 'View documentation', 'powerkit' ), |
| 33 |
'url' => powerkit_get_setting( 'documentation' ) . '/marketing/opt-in-forms/', |
| 34 |
'target' => '_blank', |
| 35 |
), |
| 36 |
); |
| 37 |
} |
| 38 |
|
| 39 |
/** |
| 40 |
* Initialize module |
| 41 |
*/ |
| 42 |
public function initialize() { |
| 43 |
|
| 44 |
/* Load the required dependencies for this module */ |
| 45 |
|
| 46 |
// Helpers Functions for the module. |
| 47 |
require_once dirname( __FILE__ ) . '/helpers/helper-powerkit-opt-in-forms.php'; |
| 48 |
|
| 49 |
// The classes responsible for defining all actions. |
| 50 |
require_once dirname( __FILE__ ) . '/public/class-powerkit-subscription-form-shortcode.php'; |
| 51 |
require_once dirname( __FILE__ ) . '/public/class-powerkit-subscription-form-widget.php'; |
| 52 |
|
| 53 |
if ( function_exists( 'register_block_type' ) ) { |
| 54 |
require_once dirname( __FILE__ ) . '/public/class-powerkit-subscription-form-block.php'; |
| 55 |
} |
| 56 |
|
| 57 |
// Admin and public area. |
| 58 |
require_once dirname( __FILE__ ) . '/admin/class-powerkit-opt-in-forms-admin.php'; |
| 59 |
require_once dirname( __FILE__ ) . '/public/class-powerkit-opt-in-forms-public.php'; |
| 60 |
|
| 61 |
new Powerkit_Opt_In_Forms_Admin( $this->slug ); |
| 62 |
new Powerkit_Opt_In_Forms_Public( $this->slug ); |
| 63 |
} |
| 64 |
} |
| 65 |
|
| 66 |
new Powerkit_Opt_In_Forms(); |
| 67 |
|