content.php 501 B

1234567891011121314151617181920212223242526
  1. <?php
  2. /**
  3. * Tidypics Plugin
  4. *
  5. * Index page Latest Albums widget for Widget Manager plugin
  6. *
  7. */
  8. // get widget settings
  9. $count = sanitise_int($vars["entity"]->tp_latest_albums_count, false);
  10. if(empty($count)){
  11. $count = 6;
  12. }
  13. $prev_context = elgg_get_context();
  14. elgg_set_context('front');
  15. $image_html = elgg_list_entities(array(
  16. 'type' => 'object',
  17. 'subtype' => 'album',
  18. 'limit' => $count,
  19. 'full_view' => false,
  20. 'pagination' => false,
  21. ));
  22. elgg_set_context($prev_context);
  23. echo $image_html;