-
Notifications
You must be signed in to change notification settings - Fork 0
/
header.php
63 lines (45 loc) · 2.83 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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>
<head profile="http://gmpg.org/xfn/11">
<meta http-equiv="Content-Type" content="<?php bloginfo( 'html_type' ); ?>; charset=<?php bloginfo( 'charset' ); ?>" />
<?php if ( current_theme_supports( 'bp-default-responsive' ) ) : ?><meta name="viewport" content="width=device-width, initial-scale=1.0" /><?php endif; ?>
<title><?php wp_title( '|', true, 'right' ); bloginfo( 'name' ); ?></title>
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
<?php bp_head(); ?>
<?php wp_head(); ?>
<link rel="stylesheet" href="<?php echo get_stylesheet_directory_uri(); ?>/responsive.css"/>
<script src="<?php echo get_stylesheet_directory_uri(); ?>/script.js"></script>
</head>
<body <?php body_class(); ?> id="bp-default">
<?php do_action( 'bp_before_header' ); ?>
<div id="header">
<div id="search-bar" role="search">
<div class="padder">
<h1 id="logo" role="banner">
<a href="<?php echo home_url(); ?>" title="<?php echo esc_attr_x( 'Home', 'Home page banner link title', 'buddypress' ); ?>"><?php bp_site_name(); ?></a>
<?php if(is_user_logged_in() && current_user_can('edit_posts')) : ?>
<a href="<?php get_bloginfo('url'); ?>/wp-admin/post-new.php" class="button"><?php echo __('New Post', 'buddypress'); ?></a>
<?php endif; ?>
</h1>
<?php if(is_user_logged_in()) : ?>
<form action="<?php echo bp_search_form_action(); ?>" method="post" id="search-form">
<label for="search-terms" class="accessibly-hidden"><?php _e( 'Search for:', 'buddypress' ); ?></label>
<input type="text" id="search-terms" name="search-terms" value="<?php echo isset( $_REQUEST['s'] ) ? esc_attr( $_REQUEST['s'] ) : ''; ?>" />
<?php echo bp_search_form_type_select(); ?>
<input type="submit" name="search-submit" id="search-submit" value="<?php esc_attr_e( 'Search', 'buddypress' ); ?>" />
<?php wp_nonce_field( 'bp_search_form' ); ?>
</form><!-- #search-form -->
<?php endif; ?>
<?php do_action( 'bp_search_login_bar' ); ?>
</div><!-- .padder -->
</div><!-- #search-bar -->
<?php if(is_user_logged_in()) : ?>
<div id="navigation" role="navigation">
<?php wp_nav_menu( array( 'container' => false, 'menu_id' => 'nav', 'theme_location' => 'primary', 'fallback_cb' => 'bp_dtheme_main_nav' ) ); ?>
</div>
<?php endif; ?>
<?php do_action( 'bp_header' ); ?>
</div><!-- #header -->
<?php do_action( 'bp_after_header' ); ?>
<?php do_action( 'bp_before_container' ); ?>
<div id="container">