-
Notifications
You must be signed in to change notification settings - Fork 0
/
header.php
63 lines (48 loc) · 1.64 KB
/
header.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
<?php
$color_class = 'blue';
if(isset($_GET['action'])) {
if($_GET['action'] == 'register') {
aviators_flash_add_message('AVIATORS_FLASH_SUCCESS', __('Registration complete. Please check your e-mail.'));
}
}
if (get_theme_mod('general_variant') != '') {
$general_variant = get_theme_mod('general_variant');
$name = explode('-', $general_variant);
$classes = explode('.', end($name));
if (!empty($classes[0])) {
$color_class = $classes[0];
}
}
$locations = get_nav_menu_locations();
$main_menu_settings = array(
'theme_location' => 'main',
'menu_class' => 'nav',
'echo' => FALSE
);
if (!empty($locations['main']) && $locations['main'] == 0) {
$main_menu_settings['menu'] = 'Main';
}
$anonymous_menu_settings = array(
'theme_location' => 'anonymous',
'menu_class' => 'nav nav-pills',
'echo' => FALSE
);
if (!empty($locations['anonymous']) && $locations['anonymous'] == 0) {
$anonymous_menu_settings['menu'] = 'Anonymous';
}
$authenticated_menu_settings = array(
'theme_location' => 'authenticated',
'menu_class' => 'nav nav-pills',
'echo' => FALSE
);
if (!empty($locations['authenticated']) && $locations['authenticated'] == 0) {
$authenticated_menu_settings['menu'] = 'Authenticated';
}
require_once get_template_directory() . '/aviators/plugins/properties/enquire.php';
do_action('aviators_before_page_render');
echo View::render('helpers/header.twig', array(
'color_class' => $color_class,
'main_menu' => wp_nav_menu($main_menu_settings),
'anonymous_menu' => wp_nav_menu($anonymous_menu_settings),
'authenticated_menu' => wp_nav_menu($authenticated_menu_settings),
));