Start processing for comments only if comments are enabled on that route
This commit is contained in:
parent
ba09e9a865
commit
29adbc56cb
|
@ -42,6 +42,7 @@ class CommentsPlugin extends Plugin
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($this->enable) {
|
||||||
$header = $page->header();
|
$header = $page->header();
|
||||||
if (!isset($header->form)) {
|
if (!isset($header->form)) {
|
||||||
$header->form = $this->grav['config']->get('plugins.comments.form');
|
$header->form = $this->grav['config']->get('plugins.comments.form');
|
||||||
|
@ -49,6 +50,7 @@ class CommentsPlugin extends Plugin
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public function onTwigSiteVariables() {
|
public function onTwigSiteVariables() {
|
||||||
if (!$this->isAdmin()) {
|
if (!$this->isAdmin()) {
|
||||||
|
|
Loading…
Reference in New Issue