Avoid adding the onTwigTemplatePaths if it's not enabled on this page
This commit is contained in:
parent
87c6d7eb95
commit
cdee9fa1fa
|
@ -103,12 +103,13 @@ class CommentsPlugin extends Plugin
|
||||||
|
|
||||||
$this->calculateEnable();
|
$this->calculateEnable();
|
||||||
|
|
||||||
|
if ($this->enable) {
|
||||||
$this->enable([
|
$this->enable([
|
||||||
'onTwigTemplatePaths' => ['onTwigTemplatePaths', 0],
|
'onTwigTemplatePaths' => ['onTwigTemplatePaths', 0],
|
||||||
]);
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
/** @var Uri $uri */
|
/** @var Uri $uri */
|
||||||
$uri = $this->grav['uri'];
|
$uri = $this->grav['uri'];
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue