-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
32 lines (30 loc) · 826 Bytes
/
index.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
<?php
/* Plugin Name: sprclldr Custom Widget
Plugin URI: http://sprclldr.com
Description: The sprclldr widget framework
Version: 1.0
Author: Kenneth White
*/
class sprclldrWidget extends WP_Widget {
function sprClassName() {
$widget_ops = array(
'classname' => 'sprClassName',
'description' => 'A description for your widget'
);
$this->WP_Widget(
'sprClassName',
'The Widget Name',
$widget_ops
);
}
function widget($args, $instance) { // widget sidebar output
extract($args, EXTR_SKIP);
echo $before_widget; // pre-widget code from theme
// Presentation code here
echo $after_widget; // post-widget code from theme
}
}
add_action(
'widgets_init',
create_function('','return register_widget("sprclldrWidget");')
);