Elgg  Version 2.3
comments.php
Go to the documentation of this file.
1 <?php
9 $limit = elgg_extract('limit', $vars, get_input('limit', 0));
10 if (!$limit) {
11  $limit = elgg_trigger_plugin_hook('config', 'comments_per_page', [], 25);
12 }
13 
15  'type' => 'object',
16  'subtype' => 'comment',
17  'container_guid' => $vars['entity']->guid,
18  'reverse_order_by' => true,
19  'full_view' => true,
20  'limit' => $limit,
21  'preload_owners' => true,
22  'distinct' => false,
23 ]);
$vars['entity']
$limit
Definition: comments.php:17
get_input($variable, $default=null, $filter_result=true)
Get some input from variables passed submitted through GET or POST.
Definition: input.php:27
elgg echo
Translates a string.
Definition: languages.js:48
elgg_trigger_plugin_hook($hook, $type, $params=null, $returnvalue=null)
Definition: elgglib.php:826
elgg_extract($key, $array, $default=null, $strict=true)
Checks for $array[$key] and returns its value if it exists, else returns $default.
Definition: elgglib.php:1375
elgg_list_entities(array $options=array(), $getter= 'elgg_get_entities', $viewer= 'elgg_view_entity_list')
Returns a string of rendered entities.
Definition: entities.php:393