Add the theme shortcut

This commit is contained in:
danpros 2025-10-29 15:03:09 +07:00
commit 857d1eaaec
2 changed files with 13 additions and 2 deletions

View file

@ -167,6 +167,13 @@ if (isset($author[0])) {
</p>
</a>
</li>
<li class="nav-item">
<a href="<?php echo site_url();?>admin/themes" class="nav-link">
<p>
<?php echo i18n('blog_theme'); ?>
</p>
</a>
</li>
<li class="nav-item">
<a href="<?php echo site_url();?>admin/users" class="nav-link">
<p>

View file

@ -134,8 +134,12 @@ function save_config($data = array(), $new = array())
// Set the theme settings
function theme_settings()
{
$exp = explode('/', config('views.root'));
$settings = 'config/themes/' . $exp[1] . '.ini';
$views_root = config('views.root');
$settings = '';
if (!empty($views_root)) {
$exp = explode('/', $views_root);
$settings = 'config/themes/' . $exp[1] . '.ini';
}
if (file_exists($settings)) {
theme_config('source', $settings);