Elgg  Version 3.0
content.php
Go to the documentation of this file.
1 <?php
2 
3 // don't show content for default widgets
4 if (elgg_in_context('default_widgets')) {
5  return;
6 }
7 
8 $widget = elgg_extract('entity', $vars);
9 if (!$widget instanceof ElggWidget) {
10  return;
11 }
12 
13 $handler = $widget->handler;
14 
15 echo elgg_view("widgets/$handler/content", $vars);
if(elgg_in_context('default_widgets')) $widget
Definition: content.php:8
elgg_in_context($context)
Check if this context exists anywhere in the stack.
Definition: pageowner.php:238
elgg echo
Translates a string.
Definition: languages.js:43
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:1131
$vars['type']
Definition: save.php:11
if(!$widget instanceof ElggWidget) $handler
Definition: content.php:13
elgg_view($view, $vars=[], $viewtype= '')
Return a parsed view.
Definition: views.php:246