Skip to content

Commit fee9e9d

Browse files
committed
Fix PHPCS Errors
1 parent 88d029a commit fee9e9d

7 files changed

Lines changed: 71 additions & 51 deletions

File tree

src/wp-content/themes/twentyeleven/header.php

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -78,19 +78,21 @@
7878
<div id="page" class="hfeed">
7979
<header id="branding">
8080
<hgroup>
81-
<?php
82-
$is_front = ! is_paged() && ( is_front_page() || ( is_home() && ( (int) get_option( 'page_for_posts' ) !== get_queried_object_id() ) ) );
83-
$site_name = get_bloginfo( 'name' );
84-
$site_description = get_bloginfo( 'description' );
85-
86-
if ( $site_name ) :
87-
?>
88-
<h1 id="site-title"><span><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home" <?php echo $is_front ? 'aria-current="page"' : ''; ?>><?php echo $site_name; ?></a></span></h1>
89-
<?php endif; ?>
81+
<?php
82+
$is_front = ! is_paged() && ( is_front_page() || ( is_home() && ( (int) get_option( 'page_for_posts' ) !== get_queried_object_id() ) ) );
83+
$site_name = get_bloginfo( 'name' );
84+
$site_description = get_bloginfo( 'description' );
9085

91-
<?php if ( $site_description ) : ?>
92-
<h2 id="site-description"><?php echo $site_description; ?></h2>
93-
<?php endif; ?>
86+
if ( $site_name ) :
87+
?>
88+
<h1 id="site-title"><span><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home" <?php echo $is_front ? 'aria-current="page"' : ''; ?>><?php echo $site_name; ?></a></span></h1>
89+
<?php
90+
endif;
91+
92+
if ( $site_description ) :
93+
?>
94+
<h2 id="site-description"><?php echo $site_description; ?></h2>
95+
<?php endif; ?>
9496
</hgroup>
9597

9698
<?php

src/wp-content/themes/twentyfifteen/header.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,17 @@
3636
$is_front = ! is_paged() && ( is_front_page() || ( is_home() && ( (int) get_option( 'page_for_posts' ) !== get_queried_object_id() ) ) );
3737
$site_name = get_bloginfo( 'name' );
3838

39-
if ( $site_name && is_front_page() && is_home() ) : ?>
39+
if ( $site_name && is_front_page() && is_home() ) :
40+
?>
4041
<h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home" <?php echo $is_front ? 'aria-current="page"' : ''; ?>><?php echo $site_name; ?></a></h1>
4142
<?php elseif ( $site_name ) : ?>
4243
<p class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home" <?php echo $is_front ? 'aria-current="page"' : ''; ?>><?php echo $site_name; ?></a></p>
43-
<?php endif;
44+
<?php
45+
endif;
4446

4547
$description = get_bloginfo( 'description', 'display' );
46-
if ( $description || is_customize_preview() ) : ?>
48+
if ( $description || is_customize_preview() ) :
49+
?>
4750
<p class="site-description"><?php echo $description; ?></p>
4851
<?php endif; ?>
4952

src/wp-content/themes/twentyseventeen/template-parts/header/site-branding.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,18 @@
1919
$is_front = ! is_paged() && ( is_front_page() || ( is_home() && ( (int) get_option( 'page_for_posts' ) !== get_queried_object_id() ) ) );
2020
$site_name = get_bloginfo( 'name' );
2121

22-
if ( $site_name && is_front_page() ) : ?>
22+
if ( $site_name && is_front_page() ) :
23+
?>
2324
<h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home" <?php echo $is_front ? 'aria-current="page"' : ''; ?>><?php echo $site_name; ?></a></h1>
2425
<?php elseif ( $site_name ) : ?>
2526
<p class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home" <?php echo $is_front ? 'aria-current="page"' : ''; ?>><?php echo $site_name; ?></a></p>
26-
<?php endif;
27+
<?php
28+
endif;
2729

2830
$description = get_bloginfo( 'description', 'display' );
2931

30-
if ( $description || is_customize_preview() ) : ?>
32+
if ( $description || is_customize_preview() ) :
33+
?>
3134
<p class="site-description"><?php echo $description; ?></p>
3235
<?php endif; ?>
3336
</div><!-- .site-branding-text -->

src/wp-content/themes/twentysixteen/header.php

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,19 +35,24 @@
3535
<header id="masthead" class="site-header">
3636
<div class="site-header-main">
3737
<div class="site-branding">
38-
<?php twentysixteen_the_custom_logo(); ?>
3938
<?php
39+
twentysixteen_the_custom_logo();
4040
$is_front = ! is_paged() && ( is_front_page() || ( is_home() && ( (int) get_option( 'page_for_posts' ) !== get_queried_object_id() ) ) );
4141
$site_name = get_bloginfo( 'name' );
4242

43-
if ( $site_name && is_front_page() && is_home() ) : ?>
43+
if ( $site_name && is_front_page() && is_home() ) :
44+
?>
4445
<h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home" <?php echo $is_front ? 'aria-current="page"' : ''; ?>><?php echo $site_name; ?></a></h1>
45-
<?php elseif ( $site_name ) : ?>
46+
<?php
47+
elseif ( $site_name ) :
48+
?>
4649
<p class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home" <?php echo $is_front ? 'aria-current="page"' : ''; ?>><?php echo $site_name; ?></a></p>
47-
<?php endif;
50+
<?php
51+
endif;
4852

4953
$description = get_bloginfo( 'description', 'display' );
50-
if ( $description || is_customize_preview() ) : ?>
54+
if ( $description || is_customize_preview() ) :
55+
?>
5156
<p class="site-description"><?php echo $description; ?></p>
5257
<?php endif; ?>
5358
</div><!-- .site-branding -->

src/wp-content/themes/twentyten/header.php

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,17 +74,21 @@
7474
$site_name = get_bloginfo( 'name' );
7575
$site_description = get_bloginfo( 'description' );
7676

77-
if ( $site_name ) : ?>
77+
if ( $site_name ) :
78+
?>
7879
<<?php echo $heading_tag; ?> id="site-title">
7980
<span>
8081
<a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home" <?php echo $is_front ? 'aria-current="page"' : ''; ?>><?php echo $site_name; ?></a>
8182
</span>
8283
</<?php echo $heading_tag; ?>>
83-
<?php endif;
84+
<?php
85+
endif;
8486

85-
if ( $site_description ) : ?>
87+
if ( $site_description ) :
88+
?>
8689
<div id="site-description"><?php echo $site_description; ?></div>
87-
<?php endif;
90+
<?php
91+
endif;
8892

8993
// Compatibility with versions of WordPress prior to 3.4.
9094
if ( function_exists( 'get_custom_header' ) ) {

src/wp-content/themes/twentythirteen/header.php

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -29,20 +29,20 @@
2929
?>
3030
</a>
3131
<header id="masthead" class="site-header">
32-
<?php
33-
$is_front = ! is_paged() && ( is_front_page() || ( is_home() && ( (int) get_option( 'page_for_posts' ) !== get_queried_object_id() ) ) );
34-
$site_name = get_bloginfo( 'name' );
35-
$site_description = get_bloginfo( 'description' );
32+
<?php
33+
$is_front = ! is_paged() && ( is_front_page() || ( is_home() && ( (int) get_option( 'page_for_posts' ) !== get_queried_object_id() ) ) );
34+
$site_name = get_bloginfo( 'name' );
35+
$site_description = get_bloginfo( 'description' );
3636

37-
?>
38-
<a class="home-link" href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home" <?php echo $is_front ? 'aria-current="page"' : ''; ?>>
39-
<?php if ( $site_name ) : ?>
40-
<h1 class="site-title"><?php echo $site_name; ?></h1>
41-
<?php endif; ?>
42-
<?php if ( $site_description ) : ?>
43-
<h2 class="site-description"><?php echo $site_description; ?></h2>
44-
<?php endif; ?>
45-
</a>
37+
?>
38+
<a class="home-link" href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home" <?php echo $is_front ? 'aria-current="page"' : ''; ?>>
39+
<?php if ( $site_name ) : ?>
40+
<h1 class="site-title"><?php echo $site_name; ?></h1>
41+
<?php endif; ?>
42+
<?php if ( $site_description ) : ?>
43+
<h2 class="site-description"><?php echo $site_description; ?></h2>
44+
<?php endif; ?>
45+
</a>
4646

4747
<div id="navbar" class="navbar">
4848
<nav id="site-navigation" class="navigation main-navigation">

src/wp-content/themes/twentytwelve/header.php

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -37,18 +37,21 @@
3737
<a class="screen-reader-text skip-link" href="#content"><?php _e( 'Skip to content', 'twentytwelve' ); ?></a>
3838
<header id="masthead" class="site-header">
3939
<hgroup>
40-
<?php
41-
$is_front = ! is_paged() && ( is_front_page() || ( is_home() && ( (int) get_option( 'page_for_posts' ) !== get_queried_object_id() ) ) );
42-
$site_name = get_bloginfo( 'name' );
43-
$site_description = get_bloginfo( 'description' );
44-
45-
if ( $site_name ) : ?>
46-
<h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home" <?php echo $is_front ? 'aria-current="page"' : ''; ?>><?php echo $site_name; ?></a></h1>
47-
<?php endif;
40+
<?php
41+
$is_front = ! is_paged() && ( is_front_page() || ( is_home() && ( (int) get_option( 'page_for_posts' ) !== get_queried_object_id() ) ) );
42+
$site_name = get_bloginfo( 'name' );
43+
$site_description = get_bloginfo( 'description' );
4844

49-
if ( $site_description ) : ?>
50-
<h2 class="site-description"><?php echo $site_description; ?></h2>
51-
<?php endif; ?>
45+
if ( $site_name ) :
46+
?>
47+
<h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home" <?php echo $is_front ? 'aria-current="page"' : ''; ?>><?php echo $site_name; ?></a></h1>
48+
<?php
49+
endif;
50+
51+
if ( $site_description ) :
52+
?>
53+
<h2 class="site-description"><?php echo $site_description; ?></h2>
54+
<?php endif; ?>
5255
</hgroup>
5356

5457
<nav id="site-navigation" class="main-navigation">

0 commit comments

Comments
 (0)