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