sewmyheadon /
bitsy
| 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 bitsy |
||||
| 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 | |||||
| 19 | <?php wp_head(); ?> |
||||
| 20 | </head> |
||||
| 21 | |||||
| 22 | <body id="top" <?php body_class(); ?>> |
||||
| 23 | |||||
| 24 | <a class="skip-link screen-reader-text" href="#content"><?php esc_html_e( 'Skip to content', 'bitsy' ); ?></a> |
||||
| 25 | <header id="header" class="<?php bitsy_header_class(); ?>"> |
||||
| 26 | |||||
| 27 | <?php |
||||
| 28 | if ( is_front_page() || is_home() ) : ?> |
||||
| 29 | <h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1> |
||||
|
0 ignored issues
–
show
Are you sure the usage of
home_url('/') is correct as it seems to always return null.
This check looks for function or method calls that always return null and whose return value is used. class A
{
function getObject()
{
return null;
}
}
$a = new A();
if ($a->getObject()) {
The method The reason is most likely that a function or method is imcomplete or has been reduced for debug purposes. Loading history...
|
|||||
| 30 | <?php else : ?> |
||||
| 31 | <p class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></p> |
||||
|
0 ignored issues
–
show
Are you sure the usage of
home_url('/') is correct as it seems to always return null.
This check looks for function or method calls that always return null and whose return value is used. class A
{
function getObject()
{
return null;
}
}
$a = new A();
if ($a->getObject()) {
The method The reason is most likely that a function or method is imcomplete or has been reduced for debug purposes. Loading history...
|
|||||
| 32 | <?php |
||||
| 33 | endif; ?> |
||||
| 34 | <?php $description = get_bloginfo( 'description', 'display' ); |
||||
|
0 ignored issues
–
show
The call to
get_bloginfo() has too many arguments starting with 'description'.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. Please note the @ignore annotation hint above. Loading history...
Are you sure the assignment to
$description is correct as get_bloginfo('description', 'display') seems to always return null.
This check looks for function or method calls that always return null and whose return value is assigned to a variable. class A
{
function getObject()
{
return null;
}
}
$a = new A();
$object = $a->getObject();
The method The reason is most likely that a function or method is imcomplete or has been reduced for debug purposes. Loading history...
|
|||||
| 35 | if ( $description || is_customize_preview() ) : ?> |
||||
| 36 | <span class="site-description"><?php echo $description; /* WPCS: xss ok. */ ?></span> |
||||
| 37 | <?php |
||||
| 38 | endif; ?> |
||||
| 39 | <?php wp_loginout(); ?> |
||||
| 40 | <a href="#nav">Menu</a> |
||||
| 41 | </header><!-- #header --> |
||||
| 42 | |||||
| 43 | <?php get_template_part( 'components/navigation/navigation', 'primary' ); ?> |
||||
| 44 | |||||
| 45 | <?php if( is_front_page()) { get_template_part( 'components/header/banner', 'hero' ); } ?> |
||||
| 46 | |||||
| 47 | <div id="main" class="site-content container <?php bitsy_content_class(); ?>" role="main"> |
||||
| 48 |
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue.
If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. Please note the @ignore annotation hint above.