| 1 |
<?php |
| 2 |
/** |
| 3 |
* Basic Elements |
| 4 |
* |
| 5 |
* @package Powerkit |
| 6 |
* @subpackage Modules |
| 7 |
*/ |
| 8 |
|
| 9 |
/** |
| 10 |
* Init module |
| 11 |
*/ |
| 12 |
class Powerkit_Basic_Elements extends Powerkit_Module { |
| 13 |
|
| 14 |
/** |
| 15 |
* Register module |
| 16 |
*/ |
| 17 |
public function register() { |
| 18 |
$this->name = esc_html__( 'Basic Elements', 'powerkit' ); |
| 19 |
$this->desc = esc_html__( 'Basic shortcodes with a shortcode generator right in the WordPress editor.', 'powerkit' ); |
| 20 |
$this->slug = 'basic_elements'; |
| 21 |
$this->type = 'default'; |
| 22 |
$this->category = 'basic'; |
| 23 |
$this->priority = 80; |
| 24 |
$this->public = true; |
| 25 |
$this->enabled = true; |
| 26 |
|
| 27 |
$this->links = array( |
| 28 |
array( |
| 29 |
'name' => esc_html__( 'View documentation', 'powerkit' ), |
| 30 |
'url' => powerkit_get_setting( 'documentation' ) . '/content-presentation/basic-elements/', |
| 31 |
'target' => '_blank', |
| 32 |
), |
| 33 |
); |
| 34 |
} |
| 35 |
|
| 36 |
/** |
| 37 |
* Initialize module |
| 38 |
*/ |
| 39 |
public function initialize() { |
| 40 |
|
| 41 |
/* Load the required dependencies for this module */ |
| 42 |
|
| 43 |
// Helpers Functions for the module. |
| 44 |
require_once dirname( __FILE__ ) . '/helpers/helper-basic-elements.php'; |
| 45 |
|
| 46 |
// Admin and public area. |
| 47 |
require_once dirname( __FILE__ ) . '/admin/class-powerkit-basic-elements-admin.php'; |
| 48 |
require_once dirname( __FILE__ ) . '/public/class-powerkit-basic-elements-public.php'; |
| 49 |
|
| 50 |
// Include default templates. |
| 51 |
powerkit_basic_shortcodes_autoload( dirname( __FILE__ ) . '/templates' ); |
| 52 |
|
| 53 |
new Powerkit_Basic_Elements_Admin( $this->slug ); |
| 54 |
new Powerkit_Basic_Elements_Public( $this->slug ); |
| 55 |
} |
| 56 |
} |
| 57 |
|
| 58 |
new Powerkit_Basic_Elements(); |
| 59 |
|