Elgg  Version 2.3
content.php
Go to the documentation of this file.
1 <?php
6 $widget = elgg_extract('entity', $vars);
7 
8 $num_display = sanitize_int($widget->num_display, false);
9 // set default value for display number
10 if (!$num_display) {
11  $num_display = 8;
12 }
13 
14 echo get_online_users([
15  'pagination' => false,
16  'limit' => $num_display,
17 ]);
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
sanitize_int($int, $signed=true)
Sanitizes an integer for database use.
Definition: database.php:180
get_online_users(array $options=array())
Render a list of currently online users.
Definition: statistics.php:89
if(elgg_in_context('default_widgets')) $widget
Definition: content.php:8
$vars['title']
Definition: content.php:19
$num_display
Definition: content.php:7