| 1 |
<?php |
| 2 |
/** |
| 3 |
* Outputs the 'My Account' navigation |
| 4 |
* |
| 5 |
* Override this template by copying it to yourtheme/propertyhive/account/navigation.php. |
| 6 |
* |
| 7 |
* @author PropertyHive |
| 8 |
* @package PropertyHive/Templates |
| 9 |
* @version 1.0.0 |
| 10 |
*/ |
| 11 |
|
| 12 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly |
| 13 |
?> |
| 14 |
|
| 15 |
<nav class="my-account-navigation"> |
| 16 |
|
| 17 |
<ul> |
| 18 |
<?php |
| 19 |
$i = 0; |
| 20 |
foreach ( $pages as $id => $page ) |
| 21 |
{ |
| 22 |
echo '<li class="my-account-navigation-' . esc_attr($id) . '' . ( ( $i == 0 ) ? ' active' : '' ) . '"><a href="' . ( ( isset($page['href']) ) ? $page['href'] : '#my-account-' . esc_attr($id) ) . '">' . esc_html($page['name']) . '</a></li>'; |
| 23 |
|
| 24 |
++$i; |
| 25 |
} |
| 26 |
?> |
| 27 |
</ul> |
| 28 |
|
| 29 |
</nav> |