diff --git a/comments.php b/comments.php index 743971d..49be739 100644 --- a/comments.php +++ b/comments.php @@ -103,12 +103,13 @@ class CommentsPlugin extends Plugin $this->calculateEnable(); - $this->enable([ - 'onTwigTemplatePaths' => ['onTwigTemplatePaths', 0], - ]); + if ($this->enable) { + $this->enable([ + 'onTwigTemplatePaths' => ['onTwigTemplatePaths', 0], + ]); + } } else { - /** @var Uri $uri */ $uri = $this->grav['uri'];