xref: /dokuwiki/lib/plugins/styling/popup.php (revision 2a7fef40a3ec5483cb6f84418251f8b157c01c15)
1<?php
2// FIXME the following skip rule seems not to work - https://github.com/squizlabs/PHP_CodeSniffer/issues/2015
3// phpcs:disable PSR1.Files.SideEffects.FoundWithSymbols
4if (!defined('DOKU_INC')) define('DOKU_INC', dirname(__FILE__) . '/../../../');
5require_once(DOKU_INC . 'inc/init.php');
6//close session
7session_write_close();
8header('Content-Type: text/html; charset=utf-8');
9header('X-UA-Compatible: IE=edge,chrome=1');
10
11/** @var admin_plugin_styling $plugin */
12$plugin = plugin_load('admin', 'styling');
13if (!auth_isadmin()) die('only admins allowed');
14$plugin->ispopup = true;
15
16// handle posts
17$plugin->handle();
18
19// output plugin in a very minimal template:
20?><!DOCTYPE html>
21<html lang="<?php echo $conf['lang'] ?>" dir="<?php echo $lang['direction'] ?>">
22<head>
23    <meta charset="utf-8" />
24    <title><?php echo $plugin->getLang('menu') ?></title>
25    <?php tpl_metaheaders(false) ?>
26    <meta name="viewport" content="width=device-width,initial-scale=1" />
27    <?php echo tpl_favicon(array('favicon')) ?>
28</head>
29<body class="dokuwiki">
30    <?php $plugin->html() ?>
31</body>
32</html>
33