-
Notifications
You must be signed in to change notification settings - Fork 2
/
header.php
38 lines (36 loc) · 1.3 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
<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<?php wp_head() ?>
</head>
<body <?php body_class() ?>>
<header>
<h2>
<a href="<?php echo home_url() ?>">WP REST API Application Registry</a>
</h2>
<ul class="user-links">
<li><a href="<?php echo home_url( '/spec/' ) ?>">Specification</a></li>
<li><a href="http://v2.wp-api.org/">Docs</a></li>
<li><a href="https://demo.wp-api.org/">Console</a></li>
<?php if ( is_user_logged_in() ) : ?>
<li><a href="<?php echo home_url( '/apps/' ) ?>">Apps</a></li>
<li><a href="<?php echo home_url( '/profile/' ) ?>"><?php echo esc_html( wp_get_current_user()->display_name ) ?></a></li>
<li><a href="<?php echo wp_logout_url( home_url() ) ?>">Log Out</a></li>
<?php else : ?>
<li><a href="<?php echo wp_login_url( home_url( '/apps/' ) ) ?>">Log In</a></li>
<li><a href="<?php echo wp_registration_url(); ?> ">Register</a></li>
<?php endif ?>
</ul>
</header>
<div class="wrapper">
<?php if ( has_action( 'ba_error_message' ) ): ?>
<div class="message error">
<?php do_action( 'ba_error_message' ) ?>
</div>
<?php endif ?>
<?php if ( has_action( 'ba_success_message' ) ): ?>
<div class="message success">
<?php do_action( 'ba_success_message' ) ?>
</div>
<?php endif ?>