forked from gturri/nspages
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaction.php
27 lines (23 loc) · 886 Bytes
/
action.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
<?php
require_once(DOKU_PLUGIN.'action.php');
class action_plugin_nspages extends DokuWiki_Action_Plugin {
/**
* Register its handlers with the dokuwiki's event controller
*/
function register(Doku_Event_Handler $controller) {
$controller->register_hook('TOOLBAR_DEFINE', 'AFTER', $this, 'insert_button', array());
$controller->register_hook('PLUGIN_POPULARITY_DATA_SETUP', 'AFTER', $this, 'usage_data');
}
function insert_button(& $event, $param) {
$event->data[] = array (
'type' => 'insert',
'title' => 'nspages',
'icon' => '../../plugins/nspages/images/tb_nspages.png',
'insert' => $this->getConf('toolbar_inserted_markup')
);
}
function usage_data(&$event){
$plugin_info = $this->getInfo();
$event->data['nspages']['version'] = $plugin_info['date'];
}
}