From a886f68c58c3b45ae70cd91906cbd0677e9fd821 Mon Sep 17 00:00:00 2001 From: Raissa North Date: Wed, 4 Apr 2018 15:45:45 +1200 Subject: [PATCH] FIX reintroduce extension hook for comment form rendering In CWP 1.x there was an extension hook to allow alterations to the commenting form. Since the upgrade of this module for CWP 2.x this was no longer there, meaning functionality that relied upon it no longer worked. This commit reintroduces this functionality to keep other modules that apply extensions to that hook, happy. --- src/Controllers/CommentingController.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Controllers/CommentingController.php b/src/Controllers/CommentingController.php index 49c6330..a1bdbab 100644 --- a/src/Controllers/CommentingController.php +++ b/src/Controllers/CommentingController.php @@ -475,7 +475,12 @@ class CommentingController extends Controller */ public function CommentsForm() { - return Injector::inst()->create(CommentForm::class, __FUNCTION__, $this); + $form = Injector::inst()->create(CommentForm::class, __FUNCTION__, $this); + + // hook to allow further extensions to alter the comments form + $this->extend('alterCommentForm', $form); + + return $form; }