| 1 |
<?php |
| 2 |
/** |
| 3 |
* Scroll To Top |
| 4 |
* |
| 5 |
* @package Powerkit |
| 6 |
* @subpackage Modules |
| 7 |
*/ |
| 8 |
|
| 9 |
/** |
| 10 |
* Init module |
| 11 |
*/ |
| 12 |
class Powerkit_Scroll_To_Top extends Powerkit_Module { |
| 13 |
|
| 14 |
/** |
| 15 |
* Register module |
| 16 |
*/ |
| 17 |
public function register() { |
| 18 |
$this->name = esc_html__( 'Scroll To Top Button', 'powerkit' ); |
| 19 |
$this->desc = esc_html__( 'A simple and light-weight Scroll To Top button will appear automatically as soon as a user scrolls past the first screen.', 'powerkit' ); |
| 20 |
$this->slug = 'scroll_to_top'; |
| 21 |
$this->type = 'default'; |
| 22 |
$this->category = 'basic'; |
| 23 |
$this->priority = 180; |
| 24 |
$this->public = true; |
| 25 |
$this->enabled = true; |
| 26 |
$this->links = array( |
| 27 |
array( |
| 28 |
'name' => esc_html__( 'View documentation', 'powerkit' ), |
| 29 |
'url' => powerkit_get_setting( 'documentation' ) . '/utilities/scroll-to-top-button/', |
| 30 |
'target' => '_blank', |
| 31 |
), |
| 32 |
); |
| 33 |
} |
| 34 |
|
| 35 |
/** |
| 36 |
* Initialize module |
| 37 |
*/ |
| 38 |
public function initialize() { |
| 39 |
|
| 40 |
/* Load the required dependencies for this module */ |
| 41 |
|
| 42 |
// Admin and public area. |
| 43 |
require_once dirname( __FILE__ ) . '/public/class-powerkit-scroll-to-top-public.php'; |
| 44 |
|
| 45 |
new Powerkit_Scroll_To_Top_Public( $this->slug ); |
| 46 |
} |
| 47 |
} |
| 48 |
|
| 49 |
new Powerkit_Scroll_To_Top(); |
| 50 |
|