core/modules/comment/comment.module | 4 ++-- .../Plugin/Field/FieldFormatter/CommentDefaultFormatter.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/core/modules/comment/comment.module b/core/modules/comment/comment.module index a2956db..fa38bfb 100644 --- a/core/modules/comment/comment.module +++ b/core/modules/comment/comment.module @@ -1733,7 +1733,7 @@ function comment_library_info() { } /** - * #post_render_cache callback; inserts the comment form. + * #post_render_cache callback; replaces the placeholder with the comment form. * * @param array $context * An array with the following keys: @@ -1744,7 +1744,7 @@ function comment_library_info() { * @return array $element * The updated $element. */ -function comment_insert_form(array $context) { +function comment_replace_form_placeholder(array $context) { $entity = entity_load($context['entity_type'], $context['entity_id']); return comment_add($entity, $context['field_name']); } diff --git a/core/modules/comment/lib/Drupal/comment/Plugin/Field/FieldFormatter/CommentDefaultFormatter.php b/core/modules/comment/lib/Drupal/comment/Plugin/Field/FieldFormatter/CommentDefaultFormatter.php index d9b4a6d..be1b6db 100644 --- a/core/modules/comment/lib/Drupal/comment/Plugin/Field/FieldFormatter/CommentDefaultFormatter.php +++ b/core/modules/comment/lib/Drupal/comment/Plugin/Field/FieldFormatter/CommentDefaultFormatter.php @@ -148,7 +148,7 @@ public function viewElements(FieldItemListInterface $items) { else { $output['comment_form'] = array( '#type' => 'render_cache_placeholder', - '#callback' => 'comment_insert_form', + '#callback' => 'comment_replace_form_placeholder', '#context' => array( 'entity_type' => $entity->entityType(), 'entity_id' => $entity->id(),