mirror of
https://github.com/getgrav/grav.git
synced 2026-05-06 06:06:19 +02:00
cleanup with default value
This commit is contained in:
@@ -1121,11 +1121,12 @@ class TwigExtension extends \Twig_Extension implements \Twig_Extension_GlobalsIn
|
||||
* Get a theme variable
|
||||
*
|
||||
* @param $var
|
||||
* @param bool $default
|
||||
* @return string
|
||||
*/
|
||||
public function themeVarFunc($var)
|
||||
public function themeVarFunc($var, $default = null)
|
||||
{
|
||||
return $this->config->get('theme.' . $var, false) ?: '';
|
||||
return $this->config->get('theme.' . $var, $default);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user