-
Notifications
You must be signed in to change notification settings - Fork 3
/
header.php
68 lines (57 loc) · 2.08 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
64
65
66
67
68
<!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel=icon href="<?php bloginfo( 'stylesheet_directory' ); ?>/assets/img/favicon.png" type="image/png">
<title>
<?php
if ( is_front_page() || is_home() ) {
bloginfo( 'name' );
} else {
echo wp_title( '' ); }
?>
</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.0.0/dist/css/bootstrap.min.css">
<link rel="stylesheet" href="<?php bloginfo( 'stylesheet_directory' ); ?>/style.css?v=94">
<?php wp_head(); ?>
<?php
if ( current_user_can( 'delete_others_posts' ) and is_user_logged_in() ) {
} else {
?>
<style> #wpadminbar{display:none} html{margin-top: 0px !important;} </style>
<?php } ?>
</head>
<body <?php body_class(); ?>>
<header class="forum-header-menu <?php echo header_class(); ?>">
<div class="container">
<div class="row">
<?php echo siforum_get_header_logo_and_link(); ?>
<span class="forum-header-menu-mobile-button dashicons dashicons-menu" style="display:none"></span>
<?php
wp_nav_menu(
array(
'theme_location' => 'header_menu',
'menu_class' => 'header_menu',
)
);
?>
<div class="forum-header-profile">
<?php if ( is_user_logged_in() ) { ?>
<a href ="<?php bloginfo( 'url' ); ?>/members/<?php echo get_the_author_meta( 'login', get_current_user_id() ); ?>" >
<?php echo get_avatar( get_current_user_id(), 30 ); ?>
<span class="username-text"><?php echo get_the_author_meta( 'login', get_current_user_id() ); ?></span>
</a>
<ul class="dropdown-user">
<li><a href="<?php bloginfo( 'url' ); ?>/members/<?php echo get_the_author_meta( 'login', get_current_user_id() ); ?>"><?php _e( 'Profile', 'siforum' ); ?></a></li>
<li><a href="<?php echo wp_logout_url( home_url() ); ?>"><?php _e( 'Logout', 'siforum' ); ?></a></li>
</ul>
<?php } else { ?>
<a href ="<?php bloginfo( 'url' ); ?>/wp-login.php?redirect_to=<?php bloginfo( 'url' ); ?>" >
<?php _e( 'Login', 'siforum' ); ?>
</a>
<?php } ?>
</div>
</div>
</div>
</header>