friendica/mod/view.php

28 lines
519 B
PHP
Raw Normal View History

<?php
2019-01-07 12:26:46 -05:00
use Friendica\App;
use Friendica\Util\Strings;
2019-01-07 12:26:46 -05:00
/**
2019-01-07 12:24:01 -05:00
* load view/theme/$current_theme/style.php with friendica context
2019-01-07 01:07:42 -05:00
*
* @param App $a
*/
2019-01-07 12:26:46 -05:00
function view_init(App $a)
{
header("Content-Type: text/css");
if ($a->argc == 4) {
$theme = $a->argv[2];
$theme = Strings::sanitizeFilePathItem($theme);
2019-01-22 07:44:49 -05:00
// set the path for later use in the theme styles
2019-01-22 04:36:42 -05:00
$THEMEPATH = "view/theme/$theme";
if (file_exists("view/theme/$theme/style.php")) {
require_once("view/theme/$theme/style.php");
}
}
2018-12-26 00:40:12 -05:00
exit();
}