PluginProbe
Powerkit – Supercharge your WordPress Site / 2.4.4
Powerkit – Supercharge your WordPress Site v2.4.4
3.1.1 3.1.0 3.0.9 3.0.8 trunk 2.2.6 2.2.7 2.2.8 2.2.9 2.3.0 2.3.1 2.3.2 2.3.3 2.3.4 2.3.5 2.3.6 2.3.7 2.3.8 2.3.9 2.4.0 2.4.1 2.4.2 2.4.3 2.4.4 2.4.5 All 87 releases
powerkit / modules / share-buttons / class-powerkit-share-buttons.php

class-powerkit-share-buttons.php in Powerkit – Supercharge your WordPress Site 2.4.4, at modules/share-buttons/class-powerkit-share-buttons.php

72 lines 2.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Share Buttons
4 *
5 * @package Powerkit
6 * @subpackage Modules
7 */
8
9 /**
10 * Init module
11 */
12 class Powerkit_Share_Buttons extends Powerkit_Module {
13
14 /**
15 * Register module
16 */
17 public function register() {
18 $this->name = esc_html__( 'Share Buttons', 'powerkit' );
19 $this->desc = esc_html__( 'Display share buttons in theme-predefined or standard locations. Select from various social networks and add per-button and the total share counts with just a few clicks.', 'powerkit' );
20 $this->slug = 'share_buttons';
21 $this->type = 'default';
22 $this->category = 'social';
23 $this->priority = 10;
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__( 'Clear cache', 'powerkit' ),
33 'url' => powerkit_get_page_url( $this->slug . '&action=powerkit_reset_cache' ),
34 ),
35 array(
36 'name' => esc_html__( 'View documentation', 'powerkit' ),
37 'url' => powerkit_get_setting( 'documentation' ) . '/social-integrations/share-buttons/',
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-powerkit-buttons.php';
52 require_once dirname( __FILE__ ) . '/helpers/helper-powerkit-buttons-list.php';
53 require_once dirname( __FILE__ ) . '/helpers/helper-powerkit-buttons-api.php';
54
55 // The classes responsible for defining all actions.
56 require_once dirname( __FILE__ ) . '/public/class-powerkit-share-buttons-shortcode.php';
57
58 if ( function_exists( 'register_block_type' ) ) {
59 require_once dirname( __FILE__ ) . '/public/class-powerkit-share-buttons-block.php';
60 }
61
62 // Admin and public area.
63 require_once dirname( __FILE__ ) . '/admin/class-powerkit-share-buttons-admin.php';
64 require_once dirname( __FILE__ ) . '/public/class-powerkit-share-buttons-public.php';
65
66 new Powerkit_Share_Buttons_Admin( $this->slug );
67 new Powerkit_Share_Buttons_Public( $this->slug );
68 }
69 }
70
71 new Powerkit_Share_Buttons();
72