content.php 637 B

1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. /**
  3. * Activity widget content view
  4. */
  5. $num_display = sanitize_int($vars['entity']->num_display, false);
  6. // set default value for display number
  7. if (!$num_display) {
  8. $num_display = 8;
  9. }
  10. $options = array(
  11. 'limit' => $num_display,
  12. 'pagination' => false,
  13. );
  14. if (elgg_in_context('dashboard')) {
  15. if ($vars['entity']->content_type == 'friends') {
  16. $options['relationship_guid'] = elgg_get_page_owner_guid();
  17. $options['relationship'] = 'friend';
  18. }
  19. } else {
  20. $options['subject_guid'] = elgg_get_page_owner_guid();
  21. }
  22. $content = elgg_list_river($options);
  23. if (!$content) {
  24. $content = elgg_echo('river:none');
  25. }
  26. echo $content;