-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathaction.php
37 lines (32 loc) · 988 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
28
29
30
31
32
33
34
35
36
37
<?php
/**
* Blockquote Plugin
*
* Allows correctly formatted blockquotes. Action component provides toolbar
* button.
*
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
* @author Tobias Deutsch <[email protected]>
* @author Gina Haeussge <[email protected]>
*/
class action_plugin_blockquote extends DokuWiki_Action_Plugin {
/**
* register the eventhandlers
*/
function register(Doku_Event_Handler $controller) {
$controller->register_hook('TOOLBAR_DEFINE', 'AFTER', $this, 'blockquote_button', array ());
}
/**
* Inserts a toolbar button
*/
function blockquote_button(Doku_Event $event, $param) {
$event->data[] = array (
'type' => 'format',
'title' => $this->getLang('qb_blockquote'),
'icon' => '../../plugins/blockquote/images/blockquote-icon.png',
'open' => '<blockquote>',
'close' => '</blockquote>',
);
return true;
}
}