| 1 |
<?php |
| 2 |
/** |
| 3 |
* Typekit Fonts |
| 4 |
* |
| 5 |
* @package Powerkit |
| 6 |
* @subpackage Modules |
| 7 |
*/ |
| 8 |
|
| 9 |
/** |
| 10 |
* Init module |
| 11 |
*/ |
| 12 |
class Powerkit_Typekit_Fonts extends Powerkit_Module { |
| 13 |
|
| 14 |
/** |
| 15 |
* Register module |
| 16 |
*/ |
| 17 |
public function register() { |
| 18 |
$this->name = esc_html__( 'Adobe Fonts (formerly Typekit)', 'powerkit' ); |
| 19 |
$this->desc = esc_html__( 'Easily integrate Adobe fonts on your site by using the Adobe Fonts module.', 'powerkit' ); |
| 20 |
$this->slug = 'typekit_fonts'; |
| 21 |
$this->type = 'default'; |
| 22 |
$this->category = 'basic'; |
| 23 |
$this->priority = 1030; |
| 24 |
$this->public = true; |
| 25 |
$this->enabled = false; |
| 26 |
$this->badge = esc_html__( 'Advanced', 'powerkit' ); |
| 27 |
$this->load_extensions = array( |
| 28 |
'fonts', |
| 29 |
); |
| 30 |
$this->links = array( |
| 31 |
array( |
| 32 |
'name' => esc_html__( 'Go to settings', 'powerkit' ), |
| 33 |
'url' => powerkit_get_page_url( 'fonts&tab=' . $this->slug, 'themes' ), |
| 34 |
), |
| 35 |
array( |
| 36 |
'name' => esc_html__( 'View documentation', 'powerkit' ), |
| 37 |
'url' => powerkit_get_setting( 'documentation' ) . '/content-presentation/typekit-fonts/', |
| 38 |
'target' => '_blank', |
| 39 |
), |
| 40 |
); |
| 41 |
} |
| 42 |
|
| 43 |
/** |
| 44 |
* Initialize module |
| 45 |
*/ |
| 46 |
public function initialize() { |
| 47 |
|
| 48 |
/* Load the required dependencies for this module */ |
| 49 |
|
| 50 |
// Helpers Functions for the module. |
| 51 |
require_once dirname( __FILE__ ) . '/helpers/helper-typekit-fonts.php'; |
| 52 |
require_once dirname( __FILE__ ) . '/helpers/helper-typekit-fonts-api.php'; |
| 53 |
|
| 54 |
// Admin and public area. |
| 55 |
require_once dirname( __FILE__ ) . '/admin/class-powerkit-typekit-fonts-admin.php'; |
| 56 |
require_once dirname( __FILE__ ) . '/public/class-powerkit-typekit-fonts-public.php'; |
| 57 |
|
| 58 |
new Powerkit_Typekit_Fonts_Admin( $this->slug ); |
| 59 |
new Powerkit_Typekit_Fonts_Public( $this->slug ); |
| 60 |
} |
| 61 |
} |
| 62 |
|
| 63 |
new Powerkit_Typekit_Fonts(); |
| 64 |
|