views_counter_pageowner.php 445 B

12345678910111213141516171819
  1. <?php
  2. namespace AU\ViewsCounter;
  3. $view_override = elgg_get_config('views_counter_view_override');
  4. $vars['views_counter_full_view_override'] = true;
  5. if (!$vars['entity']) {
  6. // the entity isn't set yet...
  7. $vars['entity'] = elgg_get_page_owner_entity();
  8. }
  9. // Add the views counter to any elgg entity
  10. echo elgg_view('views_counter/add', $vars);
  11. // Shows the views counter number
  12. echo elgg_view('views_counter/display_views_counter', $vars);