1<?php
2/**
3 * action.php for Plugin hidden
4 * @license  GPL 2 (http://www.gnu.org/licenses/gpl.html)
5 * @author   Guillaume Turri <guillaume.turri@gmail.com>
6 */
7
8if(!defined('DOKU_INC')) die();
9
10class action_plugin_hidden extends Dokuwiki_Action_Plugin {
11  function register(Doku_Event_Handler $controller) {
12    $controller->register_hook('TOOLBAR_DEFINE', 'AFTER', $this, 'insert_button', array ());
13  }
14
15  /**
16   * Inserts a toolbar button
17   */
18  function insert_button(&$event, $param) {
19    $event->data[] = array (
20        'type' => 'format',
21        'title' => $this->getLang('button'),
22        'icon' => '../../plugins/hidden/images/hidden.png',
23        'open' => '<hidden>',
24        'close' => '</hidden>',
25        );
26  }
27}
28
29