content.php 464 B

12345678910111213141516171819
  1. <?php
  2. // don't show content for default widgets
  3. if (elgg_in_context('default_widgets')) {
  4. return;
  5. }
  6. $widget = elgg_extract('entity', $vars);
  7. if (!elgg_instanceof($widget, 'object', 'widget')) {
  8. return;
  9. }
  10. $handler = $widget->handler;
  11. if (elgg_view_exists("widgets/$handler/content")) {
  12. echo elgg_view("widgets/$handler/content", $vars);
  13. } else {
  14. echo elgg_view_deprecated("widgets/$handler/view", $vars, "Widgets use content as the display view", '1.8');
  15. }