Jake Vanderwerf
7 days ago 46d681c6b825d21b3f698d793c4e630c687d90ad
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
<?php
if (!defined('ABSPATH')) {
    exit; // Exit if accessed directly
}
 
wp_enqueue_script(
    'jvb-notification-manager',
    JVB_URL.'assets/js/min/notificationManager.min.js',
    array('jvb-client-queue'),
    '1.0.0',
    true
);
 
$handler = JVB()->notification();
$user = wp_get_current_user();
$role = array_values($user->roles)[0];
 
$types = [
    'all'       => 'All',
    'favourite' => 'Favourites',
    'artist'    => 'Artists',
    'shop'      => 'Shops',
    'event'     => 'Events',
];
if ($role === 'jvb_artist') {
    $types['news'] = 'News';
}
$types['system'] = 'System';
 
?>
<div class="container">
    <nav class="tabs row left" role="tablist">
    <?php
 
    $i =0;
    foreach ($types as $icon => $name) {
        $active = ($i === 0) ? ' active' : '';
        $selected = ($i === 0) ? 'true' : 'false';
        ?>
        <button type="button" class="tab<?=$active?>" data-tab="<?=$icon?>" role="tab" aria-selected="<?=$selected?>">
            <?= jvbIcon($icon) ?>
            <span>
                <?=$name?>
            </span>
        </button>
        <?php
        $i++;
    }
 
    ?>
    </nav>
    <nav class="filters">
 
    </nav>
    <section class="notifications-list">
 
    </section>
</div>
<?php