Skip to content

Commit

Permalink
cleanup with default value
Browse files Browse the repository at this point in the history
  • Loading branch information
rhukster committed Feb 20, 2018
1 parent 8e68317 commit 84a0b5d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions system/src/Grav/Common/Twig/TwigExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -1121,11 +1121,12 @@ public function niceNumberFunc($n)
* 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);
}

/**
Expand Down

0 comments on commit 84a0b5d

Please sign in to comment.