Completed
Push — master ( deb440...52cafd )
by Md. Mozahidur
02:21
created

header.php (1 issue)

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

1
<?php
2
/**
3
 * The header for our theme.
4
 *
5
 * This is the template that displays all of the <head> section and everything up until <div id="content">
6
 *
7
 * @link https://developer.wordpress.org/themes/basics/template-files/#template-partials
8
 *
9
 * @package Lighthouse
10
 */
11
12
?><!DOCTYPE html>
13
<html <?php language_attributes(); ?>>
14
<head>
15
<meta charset="<?php bloginfo( 'charset' ); ?>">
16
<meta name="viewport" content="width=device-width, initial-scale=1">
17
<link rel="profile" href="http://gmpg.org/xfn/11">
18
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>">
19
20
<?php wp_head(); ?>
21
</head>
22
23
<body <?php body_class(); ?>>
24
<div id="page" class="site">
25
	<a class="skip-link screen-reader-text" href="#content"><?php esc_html_e( 'Skip to content', 'lighthouse' ); ?></a>
26
27
	<header id="masthead" class="site-header" role="banner">
28
		<div class="site-branding">
29
			<?php
30 View Code Duplication
			if ( is_front_page() && is_home() ) : ?>
0 ignored issues
show
This code seems to be duplicated across your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
31
				<h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1>
32
			<?php else : ?>
33
				<p class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></p>
34
			<?php
35
			endif;
36
37
			$description = get_bloginfo( 'description', 'display' );
38
			if ( $description || is_customize_preview() ) : ?>
39
				<p class="site-description"><?php echo $description; /* WPCS: xss ok. */ ?></p>
40
			<?php
41
			endif; ?>
42
		</div><!-- .site-branding -->
43
44
		<nav id="site-navigation" class="main-navigation" role="navigation">
45
			<button class="menu-toggle" aria-controls="primary-menu" aria-expanded="false"><?php esc_html_e( 'Primary Menu', 'lighthouse' ); ?></button>
46
			<?php wp_nav_menu( array( 'theme_location' => 'primary', 'menu_id' => 'primary-menu' ) ); ?>
47
		</nav><!-- #site-navigation -->
48
	</header><!-- #masthead -->
49
50
	<div id="content" class="site-content">
51