elgg_extract('id', $vars, 'comments'), 'class' => (array) elgg_extract('class', $vars, []), ]; $attr['class'][] = 'elgg-comments'; // work around for deprecation code in elgg_view() unset($vars['internalid']); $content = elgg_list_entities(array( 'type' => 'object', 'subtype' => 'comment', 'container_guid' => $vars['entity']->guid, 'reverse_order_by' => true, 'full_view' => true, 'limit' => $limit, 'preload_owners' => true, 'distinct' => false, 'url_fragment' => $attr['id'], )); if ($show_add_form) { $content .= elgg_view_form('comment/save', array(), $vars); } echo elgg_format_element('div', $attr, $content);