1<?php
2
3if(!defined('DOKU_INC')) die();
4
5class action_plugin_publish_debug extends DokuWiki_Action_Plugin {
6
7    private $hlp;
8
9    function __construct() {
10        $this->hlp = plugin_load('helper','publish');
11    }
12
13    function register(Doku_Event_Handler $controller) {
14        global $conf;
15        if ($conf['allowdebug']) {
16            $controller->register_hook('TPL_ACT_RENDER', 'AFTER', $this, 'debug', array());
17        }
18    }
19
20    function debug(&$event, $param) {
21        global $ID;
22        ptln('<h1>Publish plug-in debug</h1>');
23        ptln('<h1>Metadata</h1>');
24        ptln('<pre>');
25        ptln(print_r(p_get_metadata($ID), true));
26        ptln('</pre>');
27        ptln('<h1>pageinfo</h1>');
28        ptln('<pre>');
29        ptln(print_r(pageinfo(), true));
30        ptln('</pre>');
31    }
32
33}
34