views_counter.php 412 B

12345678910111213141516
  1. <?php
  2. namespace AU\ViewsCounter;
  3. $view_override = elgg_get_config('views_counter_view_override');
  4. if (is_array($view_override) && in_array($view_orig, $view_override)) {
  5. $vars['views_counter_full_view_override'] = true;
  6. }
  7. // Add the views counter to any elgg entity
  8. echo elgg_view('views_counter/add', $vars);
  9. // Shows the views counter number
  10. echo elgg_view('views_counter/display_views_counter', $vars);