| 1 |
<?php |
| 2 |
/** |
| 3 |
* Retina Images |
| 4 |
* |
| 5 |
* @package Powerkit |
| 6 |
* @subpackage Modules |
| 7 |
*/ |
| 8 |
|
| 9 |
if ( class_exists( 'Powerkit_Module' ) ) { |
| 10 |
/** |
| 11 |
* Init module |
| 12 |
*/ |
| 13 |
class Powerkit_Retina_Images extends Powerkit_Module { |
| 14 |
|
| 15 |
/** |
| 16 |
* Register module |
| 17 |
*/ |
| 18 |
public function register() { |
| 19 |
$this->name = esc_html__( 'Retina Images', 'powerkit' ); |
| 20 |
$this->desc = esc_html__( 'Make your images ultra-crisp on Retina screens with the Retina Images module integrated in Powerkit.', 'powerkit' ); |
| 21 |
$this->slug = 'retina'; |
| 22 |
$this->type = 'default'; |
| 23 |
$this->category = 'basic'; |
| 24 |
$this->priority = 1010; |
| 25 |
$this->public = true; |
| 26 |
$this->enabled = false; |
| 27 |
$this->badge = esc_html__( 'Advanced', 'powerkit' ); |
| 28 |
$this->links = array( |
| 29 |
array( |
| 30 |
'name' => esc_html__( 'Go to settings', 'powerkit' ), |
| 31 |
'url' => admin_url( sprintf( 'options-media.php#%s', powerkit_get_page_slug( $this->slug ) ) ), |
| 32 |
), |
| 33 |
array( |
| 34 |
'name' => esc_html__( 'View documentation', 'powerkit' ), |
| 35 |
'url' => powerkit_get_setting( 'documentation' ) . '/image-optimization/retina-images/', |
| 36 |
'target' => '_blank', |
| 37 |
), |
| 38 |
); |
| 39 |
} |
| 40 |
|
| 41 |
/** |
| 42 |
* Initialize module |
| 43 |
*/ |
| 44 |
public function initialize() { |
| 45 |
|
| 46 |
/* Load the required dependencies for this module */ |
| 47 |
|
| 48 |
// Helpers Functions for the module. |
| 49 |
require_once dirname( __FILE__ ) . '/helpers/helper-powerkit-retina-images.php'; |
| 50 |
|
| 51 |
// Admin and public area. |
| 52 |
require_once dirname( __FILE__ ) . '/admin/class-powerkit-retina-images-admin.php'; |
| 53 |
require_once dirname( __FILE__ ) . '/public/class-powerkit-retina-images-public.php'; |
| 54 |
|
| 55 |
new Powerkit_Retina_Images_Admin( $this->slug ); |
| 56 |
new Powerkit_Retina_Images_Public( $this->slug ); |
| 57 |
} |
| 58 |
} |
| 59 |
|
| 60 |
new Powerkit_Retina_Images(); |
| 61 |
} |
| 62 |
|