-
Notifications
You must be signed in to change notification settings - Fork 0
/
grantedbyme.widget.php
43 lines (39 loc) · 1.11 KB
/
grantedbyme.widget.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<?php
/**
* GrantedByMe WordPress Widget
*
* PHP version 5
*
* @category PlugIn
* @package GBM
* @author GrantedByMe <info@grantedby.me>
* @access private
* @license https://grantedby.me/licenses/php/license.md MIT
* @version Release: <release_id>
* @link https://grantedby.me
*/
class GrantedByMeWidget extends WP_Widget
{
function __construct()
{
parent::__construct(
'GrantedByMeWidget',
__('GrantedByMeWidget', 'GrantedByMeWidget_domain'),
array('description' => __('GrantedByMeWidget', 'GrantedByMeWidget_domain'))
);
}
public function widget($args, $instance)
{
echo $args['before_widget'];
echo '<!--GrantedByMe Component Start-->
<div id="GrantedByMe-Container"></div>
<div id="GrantedByMe-modal" class="GrantedByMe-modal"><div id="GrantedByMe-content"></div></div>
<!--GrantedByMe Component End-->';
echo $args['after_widget'];
}
}
function registerGrantedByMeWidget()
{
register_widget('GrantedByMeWidget');
}
add_action('widgets_init', 'registerGrantedByMeWidget');