mirror of
https://github.com/e107inc/e107.git
synced 2025-01-17 20:58:30 +01:00
Added {THEME} shortcode (path) to core shortcodes.
This commit is contained in:
parent
8023a2b9f6
commit
3a71366954
6
e107_core/shortcodes/single/theme.php
Normal file
6
e107_core/shortcodes/single/theme.php
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
function theme_shortcode($parm = null)
|
||||||
|
{
|
||||||
|
return THEME_ABS;
|
||||||
|
}
|
@ -76,7 +76,7 @@ if (varset($e107_popup) != 1)
|
|||||||
|
|
||||||
$psc = array(
|
$psc = array(
|
||||||
'</body>' => '',
|
'</body>' => '',
|
||||||
'{THEME}' => THEME_ABS,
|
// '{THEME}' => THEME_ABS, // moved to e107_core/shortcodes/single/
|
||||||
'{---MODAL---}' => $LAYOUT['_modal_'],
|
'{---MODAL---}' => $LAYOUT['_modal_'],
|
||||||
'{---HEADER---}' => $tp->parseTemplate('{HEADER}',true),
|
'{---HEADER---}' => $tp->parseTemplate('{HEADER}',true),
|
||||||
'{---FOOTER---}' => $tp->parseTemplate('{FOOTER}',true)
|
'{---FOOTER---}' => $tp->parseTemplate('{FOOTER}',true)
|
||||||
|
@ -789,7 +789,7 @@ e107::getDebug()->logTime('Render Layout');
|
|||||||
|
|
||||||
$psc = array(
|
$psc = array(
|
||||||
'magicSC'=>array(
|
'magicSC'=>array(
|
||||||
'{THEME}' => THEME_ABS,
|
// '{THEME}' => THEME_ABS, // moved to e107_core/shortcodes/single/
|
||||||
'{BODY_ONLOAD}' => $body_onload,
|
'{BODY_ONLOAD}' => $body_onload,
|
||||||
'{LAYOUT_ID}' => 'layout-'.e107::getForm()->name2id(THEME_LAYOUT),
|
'{LAYOUT_ID}' => 'layout-'.e107::getForm()->name2id(THEME_LAYOUT),
|
||||||
'THEME_LAYOUT' => THEME_LAYOUT, // BC Fall-back: Catch and replace the missing constant- ony works with PHP < 8
|
'THEME_LAYOUT' => THEME_LAYOUT, // BC Fall-back: Catch and replace the missing constant- ony works with PHP < 8
|
||||||
|
@ -1263,7 +1263,7 @@ class e_parse_shortcode
|
|||||||
if (is_readable(e_CORE.'shortcodes/single/'.strtolower($code).'.php'))
|
if (is_readable(e_CORE.'shortcodes/single/'.strtolower($code).'.php'))
|
||||||
{
|
{
|
||||||
$_function = strtolower($code).'_shortcode';
|
$_function = strtolower($code).'_shortcode';
|
||||||
$_class = strtolower($code);
|
$_class = ($code === 'sitelinks_alt') ? sitelinks_alt : null; // all others are plain functions.
|
||||||
$_path = e_CORE.'shortcodes/single/'.strtolower($code).'.php';
|
$_path = e_CORE.'shortcodes/single/'.strtolower($code).'.php';
|
||||||
|
|
||||||
include_once($_path);
|
include_once($_path);
|
||||||
@ -1274,7 +1274,7 @@ class e_parse_shortcode
|
|||||||
// SecretR - fix array(parm, sc_mode) causing parm to become an array, see issue 424
|
// SecretR - fix array(parm, sc_mode) causing parm to become an array, see issue 424
|
||||||
if(!method_exists($_class, $_function))
|
if(!method_exists($_class, $_function))
|
||||||
{
|
{
|
||||||
trigger_error($_function." doesn't exist in ".$_path, E_USER_NOTICE);
|
trigger_error("Method ".$_function." doesn't exist in class ".$_class." within file ".$_path);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user