1
0
mirror of https://github.com/e107inc/e107.git synced 2025-07-31 11:50:30 +02:00

Update theme_shortcodes.php

adding shortcodes
This commit is contained in:
Jimako
2023-08-06 17:56:02 +02:00
committed by GitHub
parent 0177a00291
commit 6e5aed03e8

View File

@@ -158,7 +158,45 @@ class theme_shortcodes extends e_shortcode
}
function sc_bootstrap_branding()
{
$pref = e107::pref('theme', 'branding');
switch ($pref)
{
case 'logo':
return e107::getParser()->parseTemplate('{SITELOGO: h=30}', true);
break;
case 'sitenamelogo':
return "<span>" . e107::getParser()->parseTemplate('{SITELOGO: h=30}', true) . "</span>" . SITENAME;
break;
case 'sitename':
default:
return SITENAME;
break;
}
}
function sc_bootstrap_nav_align()
{
$pref = e107::pref('theme', 'nav_alignment');
if ($pref == 'right')
{
return e107::getParser()->parseTemplate('{NAVIGATION: type=main&class=ms-auto}');
}
else
{
return e107::getParser()->parseTemplate('{NAVIGATION: type=main&class=me-auto}');
}
}
}