header.php 657 B

123456789101112131415161718192021222324252627282930
  1. <?php
  2. /**
  3. * Header for layouts
  4. *
  5. * @uses $vars['title'] Title
  6. * @uses $vars['header'] Optional override for the header
  7. */
  8. if (isset($vars['header'])) {
  9. echo '<div class="elgg-head clearfix">';
  10. echo $vars['header'];
  11. echo '</div>';
  12. return;
  13. }
  14. $title = elgg_extract('title', $vars, '');
  15. $buttons = elgg_view_menu('title', array(
  16. 'sort_by' => 'priority',
  17. 'class' => 'elgg-menu-hz',
  18. ));
  19. if ($title || $buttons) {
  20. echo '<div class="elgg-head clearfix">';
  21. // @todo .elgg-heading-main supports action buttons - maybe rename class name?
  22. echo $buttons;
  23. echo elgg_view_title($vars['title'], array('class' => 'elgg-heading-main'));
  24. echo '</div>';
  25. }