Merge branch 'develop' of https://github.com/getgrav/grav into 1.6

# Conflicts:
#	system/src/Grav/Common/Twig/TwigExtension.php
This commit is contained in:
Matias Griese
2018-09-07 14:44:14 +03:00
5 changed files with 6 additions and 5 deletions

View File

@@ -17,6 +17,8 @@
1. [](#bugfix)
* Allow `$page->slug()` to be called before `$page->init()` without breaking the page
* Fix for `Page::translatedLanguages()` to use routes always [#2163](https://github.com/getgrav/grav/issues/2163)
* Fixed `nicetime()` twig function
* Allow twig tags `{% script %}`, `{% style %}` and `{% switch %}` to be placed outside of blocks
# v1.5.1
## 08/23/2018

View File

@@ -8,7 +8,7 @@
namespace Grav\Common\Twig\Node;
class TwigNodeScript extends \Twig_Node implements \Twig_NodeOutputInterface
class TwigNodeScript extends \Twig_Node implements \Twig_NodeCaptureInterface
{
protected $tagName = 'script';

View File

@@ -8,7 +8,7 @@
namespace Grav\Common\Twig\Node;
class TwigNodeStyle extends \Twig_Node implements \Twig_NodeOutputInterface
class TwigNodeStyle extends \Twig_Node implements \Twig_NodeCaptureInterface
{
protected $tagName = 'style';

View File

@@ -8,7 +8,7 @@
namespace Grav\Common\Twig\Node;
class TwigNodeSwitch extends \Twig_Node implements \Twig_NodeOutputInterface
class TwigNodeSwitch extends \Twig_Node
{
public function __construct(
\Twig_Node $value,

View File

@@ -159,10 +159,9 @@ class TwigExtension extends \Twig_Extension implements \Twig_Extension_GlobalsIn
new \Twig_SimpleFunction('read_file', [$this, 'readFileFunc']),
new \Twig_SimpleFunction('nicenumber', [$this, 'niceNumberFunc']),
new \Twig_SimpleFunction('nicefilesize', [$this, 'niceFilesizeFunc']),
new \Twig_SimpleFunction('nicetime', [$this, 'nicetimeFilter']),
new \Twig_SimpleFunction('nicetime', [$this, 'nicetimeFunc']),
new \Twig_SimpleFunction('cron', [$this, 'cronFunc']),
// Translations
new \Twig_simpleFunction('t', [$this, 'translate']),
new \Twig_simpleFunction('tl', [$this, 'translateLanguage']),