-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathaction.php
More file actions
28 lines (24 loc) · 735 Bytes
/
action.php
File metadata and controls
28 lines (24 loc) · 735 Bytes
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
/**
* action.php for Plugin hidden
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
* @author Guillaume Turri <guillaume.turri@gmail.com>
*/
if(!defined('DOKU_INC')) die();
class action_plugin_hidden extends Dokuwiki_Action_Plugin {
function register(Doku_Event_Handler $controller) {
$controller->register_hook('TOOLBAR_DEFINE', 'AFTER', $this, 'insert_button', array ());
}
/**
* Inserts a toolbar button
*/
function insert_button(&$event, $param) {
$event->data[] = array (
'type' => 'format',
'title' => $this->getLang('button'),
'icon' => '../../plugins/hidden/images/hidden.png',
'open' => '<hidden>',
'close' => '</hidden>',
);
}
}