Completed
Push — master ( d488ab...6453e7 )
by Stephen
53:31
created
src/wp-content/themes/twentytwelve/comments.php 3 patches
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -1,16 +1,16 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * The template for displaying Comments
4
- *
5
- * The area of the page that contains both current comments
6
- * and the comment form. The actual display of comments is
7
- * handled by a callback to twentytwelve_comment() which is
8
- * located in the functions.php file.
9
- *
10
- * @package WordPress
11
- * @subpackage Twenty_Twelve
12
- * @since Twenty Twelve 1.0
13
- */
3
+						 * The template for displaying Comments
4
+						 *
5
+						 * The area of the page that contains both current comments
6
+						 * and the comment form. The actual display of comments is
7
+						 * handled by a callback to twentytwelve_comment() which is
8
+						 * located in the functions.php file.
9
+						 *
10
+						 * @package WordPress
11
+						 * @subpackage Twenty_Twelve
12
+						 * @since Twenty Twelve 1.0
13
+						 */
14 14
 
15 15
 /*
16 16
  * If the current post is protected by a password and
Please login to merge, or discard this patch.
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
  * the visitor has not yet entered the password we will
18 18
  * return early without loading the comments.
19 19
  */
20
-if ( post_password_required() )
20
+if (post_password_required())
21 21
 	return;
22 22
 ?>
23 23
 
@@ -25,23 +25,23 @@  discard block
 block discarded – undo
25 25
 
26 26
 	<?php // You can start editing here -- including this comment! ?>
27 27
 
28
-	<?php if ( have_comments() ) : ?>
28
+	<?php if (have_comments()) : ?>
29 29
 		<h2 class="comments-title">
30 30
 			<?php
31
-				printf( _n( 'One thought on &ldquo;%2$s&rdquo;', '%1$s thoughts on &ldquo;%2$s&rdquo;', get_comments_number(), 'twentytwelve' ),
32
-					number_format_i18n( get_comments_number() ), '<span>' . get_the_title() . '</span>' );
31
+				printf(_n('One thought on &ldquo;%2$s&rdquo;', '%1$s thoughts on &ldquo;%2$s&rdquo;', get_comments_number(), 'twentytwelve'),
32
+					number_format_i18n(get_comments_number()), '<span>'.get_the_title().'</span>');
33 33
 			?>
34 34
 		</h2>
35 35
 
36 36
 		<ol class="commentlist">
37
-			<?php wp_list_comments( array( 'callback' => 'twentytwelve_comment', 'style' => 'ol' ) ); ?>
37
+			<?php wp_list_comments(array('callback' => 'twentytwelve_comment', 'style' => 'ol')); ?>
38 38
 		</ol><!-- .commentlist -->
39 39
 
40
-		<?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : // are there comments to navigate through ?>
40
+		<?php if (get_comment_pages_count() > 1 && get_option('page_comments')) : // are there comments to navigate through ?>
41 41
 		<nav id="comment-nav-below" class="navigation" role="navigation">
42
-			<h1 class="assistive-text section-heading"><?php _e( 'Comment navigation', 'twentytwelve' ); ?></h1>
43
-			<div class="nav-previous"><?php previous_comments_link( __( '&larr; Older Comments', 'twentytwelve' ) ); ?></div>
44
-			<div class="nav-next"><?php next_comments_link( __( 'Newer Comments &rarr;', 'twentytwelve' ) ); ?></div>
42
+			<h1 class="assistive-text section-heading"><?php _e('Comment navigation', 'twentytwelve'); ?></h1>
43
+			<div class="nav-previous"><?php previous_comments_link(__('&larr; Older Comments', 'twentytwelve')); ?></div>
44
+			<div class="nav-next"><?php next_comments_link(__('Newer Comments &rarr;', 'twentytwelve')); ?></div>
45 45
 		</nav>
46 46
 		<?php endif; // check for comment navigation ?>
47 47
 
@@ -49,8 +49,8 @@  discard block
 block discarded – undo
49 49
 		/* If there are no comments and comments are closed, let's leave a note.
50 50
 		 * But we only want the note on posts and pages that had comments in the first place.
51 51
 		 */
52
-		if ( ! comments_open() && get_comments_number() ) : ?>
53
-		<p class="nocomments"><?php _e( 'Comments are closed.' , 'twentytwelve' ); ?></p>
52
+		if ( ! comments_open() && get_comments_number()) : ?>
53
+		<p class="nocomments"><?php _e('Comments are closed.', 'twentytwelve'); ?></p>
54 54
 		<?php endif; ?>
55 55
 
56 56
 	<?php endif; // have_comments() ?>
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,8 +17,9 @@
 block discarded – undo
17 17
  * the visitor has not yet entered the password we will
18 18
  * return early without loading the comments.
19 19
  */
20
-if ( post_password_required() )
20
+if ( post_password_required() ) {
21 21
 	return;
22
+}
22 23
 ?>
23 24
 
24 25
 <div id="comments" class="comments-area">
Please login to merge, or discard this patch.
src/wp-content/themes/twentytwelve/content-none.php 2 patches
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,11 +1,11 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * The template for displaying a "No posts found" message
4
- *
5
- * @package WordPress
6
- * @subpackage Twenty_Twelve
7
- * @since Twenty Twelve 1.0
8
- */
3
+		 * The template for displaying a "No posts found" message
4
+		 *
5
+		 * @package WordPress
6
+		 * @subpackage Twenty_Twelve
7
+		 * @since Twenty Twelve 1.0
8
+		 */
9 9
 ?>
10 10
 
11 11
 	<article id="post-0" class="post no-results not-found">
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -10,11 +10,11 @@
 block discarded – undo
10 10
 
11 11
 	<article id="post-0" class="post no-results not-found">
12 12
 		<header class="entry-header">
13
-			<h1 class="entry-title"><?php _e( 'Nothing Found', 'twentytwelve' ); ?></h1>
13
+			<h1 class="entry-title"><?php _e('Nothing Found', 'twentytwelve'); ?></h1>
14 14
 		</header>
15 15
 
16 16
 		<div class="entry-content">
17
-			<p><?php _e( 'Apologies, but no results were found. Perhaps searching will help find a related post.', 'twentytwelve' ); ?></p>
17
+			<p><?php _e('Apologies, but no results were found. Perhaps searching will help find a related post.', 'twentytwelve'); ?></p>
18 18
 			<?php get_search_form(); ?>
19 19
 		</div><!-- .entry-content -->
20 20
 	</article><!-- #post-0 -->
Please login to merge, or discard this patch.
src/wp-content/themes/twentyfifteen/footer.php 2 patches
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -1,13 +1,13 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * The template for displaying the footer
4
- *
5
- * Contains the closing of the "site-content" div and all content after.
6
- *
7
- * @package WordPress
8
- * @subpackage Twenty_Fifteen
9
- * @since Twenty Fifteen 1.0
10
- */
3
+		 * The template for displaying the footer
4
+		 *
5
+		 * Contains the closing of the "site-content" div and all content after.
6
+		 *
7
+		 * @package WordPress
8
+		 * @subpackage Twenty_Fifteen
9
+		 * @since Twenty Fifteen 1.0
10
+		 */
11 11
 ?>
12 12
 
13 13
 	</div><!-- .site-content -->
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -20,9 +20,9 @@
 block discarded – undo
20 20
 				 *
21 21
 				 * @since Twenty Fifteen 1.0
22 22
 				 */
23
-				do_action( 'twentyfifteen_credits' );
23
+				do_action('twentyfifteen_credits');
24 24
 			?>
25
-			<a href="<?php echo esc_url( __( 'https://wordpress.org/', 'twentyfifteen' ) ); ?>"><?php printf( __( 'Proudly powered by %s', 'twentyfifteen' ), 'WordPress' ); ?></a>
25
+			<a href="<?php echo esc_url(__('https://wordpress.org/', 'twentyfifteen')); ?>"><?php printf(__('Proudly powered by %s', 'twentyfifteen'), 'WordPress'); ?></a>
26 26
 		</div><!-- .site-info -->
27 27
 	</footer><!-- .site-footer -->
28 28
 
Please login to merge, or discard this patch.
src/wp-content/themes/twentyfifteen/content-search.php 3 patches
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -1,13 +1,13 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * The template part for displaying results in search pages
4
- *
5
- * Learn more: {@link https://codex.wordpress.org/Template_Hierarchy}
6
- *
7
- * @package WordPress
8
- * @subpackage Twenty_Fifteen
9
- * @since Twenty Fifteen 1.0
10
- */
3
+			 * The template part for displaying results in search pages
4
+			 *
5
+			 * Learn more: {@link https://codex.wordpress.org/Template_Hierarchy}
6
+			 *
7
+			 * @package WordPress
8
+			 * @subpackage Twenty_Fifteen
9
+			 * @since Twenty Fifteen 1.0
10
+			 */
11 11
 ?>
12 12
 
13 13
 <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -14,23 +14,23 @@
 block discarded – undo
14 14
 	<?php twentyfifteen_post_thumbnail(); ?>
15 15
 
16 16
 	<header class="entry-header">
17
-		<?php the_title( sprintf( '<h2 class="entry-title"><a href="%s" rel="bookmark">', esc_url( get_permalink() ) ), '</a></h2>' ); ?>
17
+		<?php the_title(sprintf('<h2 class="entry-title"><a href="%s" rel="bookmark">', esc_url(get_permalink())), '</a></h2>'); ?>
18 18
 	</header><!-- .entry-header -->
19 19
 
20 20
 	<div class="entry-summary">
21 21
 		<?php the_excerpt(); ?>
22 22
 	</div><!-- .entry-summary -->
23 23
 
24
-	<?php if ( 'post' == get_post_type() ) : ?>
24
+	<?php if ('post' == get_post_type()) : ?>
25 25
 
26 26
 		<footer class="entry-footer">
27 27
 			<?php twentyfifteen_entry_meta(); ?>
28
-			<?php edit_post_link( __( 'Edit', 'twentyfifteen' ), '<span class="edit-link">', '</span>' ); ?>
28
+			<?php edit_post_link(__('Edit', 'twentyfifteen'), '<span class="edit-link">', '</span>'); ?>
29 29
 		</footer><!-- .entry-footer -->
30 30
 
31 31
 	<?php else : ?>
32 32
 
33
-		<?php edit_post_link( __( 'Edit', 'twentyfifteen' ), '<footer class="entry-footer"><span class="edit-link">', '</span></footer><!-- .entry-footer -->' ); ?>
33
+		<?php edit_post_link(__('Edit', 'twentyfifteen'), '<footer class="entry-footer"><span class="edit-link">', '</span></footer><!-- .entry-footer -->'); ?>
34 34
 
35 35
 	<?php endif; ?>
36 36
 
Please login to merge, or discard this patch.
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -28,9 +28,12 @@
 block discarded – undo
28 28
 			<?php edit_post_link( __( 'Edit', 'twentyfifteen' ), '<span class="edit-link">', '</span>' ); ?>
29 29
 		</footer><!-- .entry-footer -->
30 30
 
31
-	<?php else : ?>
31
+	<?php else {
32
+	: ?>
32 33
 
33
-		<?php edit_post_link( __( 'Edit', 'twentyfifteen' ), '<footer class="entry-footer"><span class="edit-link">', '</span></footer><!-- .entry-footer -->' ); ?>
34
+		<?php edit_post_link( __( 'Edit', 'twentyfifteen' ), '<footer class="entry-footer"><span class="edit-link">', '</span></footer><!-- .entry-footer -->' );
35
+}
36
+?>
34 37
 
35 38
 	<?php endif; ?>
36 39
 
Please login to merge, or discard this patch.
src/wp-content/themes/twentyfifteen/image.php 2 patches
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,11 +1,11 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * The template for displaying image attachments
4
- *
5
- * @package WordPress
6
- * @subpackage Twenty_Fifteen
7
- * @since Twenty Fifteen 1.0
8
- */
3
+			 * The template for displaying image attachments
4
+			 *
5
+			 * @package WordPress
6
+			 * @subpackage Twenty_Fifteen
7
+			 * @since Twenty Fifteen 1.0
8
+			 */
9 9
 
10 10
 get_header(); ?>
11 11
 
Please login to merge, or discard this patch.
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -14,19 +14,19 @@  discard block
 block discarded – undo
14 14
 
15 15
 			<?php
16 16
 				// Start the loop.
17
-				while ( have_posts() ) : the_post();
17
+				while (have_posts()) : the_post();
18 18
 			?>
19 19
 
20 20
 				<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
21 21
 
22 22
 					<nav id="image-navigation" class="navigation image-navigation">
23 23
 						<div class="nav-links">
24
-							<div class="nav-previous"><?php previous_image_link( false, __( 'Previous Image', 'twentyfifteen' ) ); ?></div><div class="nav-next"><?php next_image_link( false, __( 'Next Image', 'twentyfifteen' ) ); ?></div>
24
+							<div class="nav-previous"><?php previous_image_link(false, __('Previous Image', 'twentyfifteen')); ?></div><div class="nav-next"><?php next_image_link(false, __('Next Image', 'twentyfifteen')); ?></div>
25 25
 						</div><!-- .nav-links -->
26 26
 					</nav><!-- .image-navigation -->
27 27
 
28 28
 					<header class="entry-header">
29
-						<?php the_title( '<h1 class="entry-title">', '</h1>' ); ?>
29
+						<?php the_title('<h1 class="entry-title">', '</h1>'); ?>
30 30
 					</header><!-- .entry-header -->
31 31
 
32 32
 					<div class="entry-content">
@@ -40,12 +40,12 @@  discard block
 block discarded – undo
40 40
 								 *
41 41
 								 * @param string $image_size Image size. Default 'large'.
42 42
 								 */
43
-								$image_size = apply_filters( 'twentyfifteen_attachment_size', 'large' );
43
+								$image_size = apply_filters('twentyfifteen_attachment_size', 'large');
44 44
 
45
-								echo wp_get_attachment_image( get_the_ID(), $image_size );
45
+								echo wp_get_attachment_image(get_the_ID(), $image_size);
46 46
 							?>
47 47
 
48
-							<?php if ( has_excerpt() ) : ?>
48
+							<?php if (has_excerpt()) : ?>
49 49
 								<div class="entry-caption">
50 50
 									<?php the_excerpt(); ?>
51 51
 								</div><!-- .entry-caption -->
@@ -55,34 +55,34 @@  discard block
 block discarded – undo
55 55
 
56 56
 						<?php
57 57
 							the_content();
58
-							wp_link_pages( array(
59
-								'before'      => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentyfifteen' ) . '</span>',
58
+							wp_link_pages(array(
59
+								'before'      => '<div class="page-links"><span class="page-links-title">'.__('Pages:', 'twentyfifteen').'</span>',
60 60
 								'after'       => '</div>',
61 61
 								'link_before' => '<span>',
62 62
 								'link_after'  => '</span>',
63
-								'pagelink'    => '<span class="screen-reader-text">' . __( 'Page', 'twentyfifteen' ) . ' </span>%',
63
+								'pagelink'    => '<span class="screen-reader-text">'.__('Page', 'twentyfifteen').' </span>%',
64 64
 								'separator'   => '<span class="screen-reader-text">, </span>',
65
-							) );
65
+							));
66 66
 						?>
67 67
 					</div><!-- .entry-content -->
68 68
 
69 69
 					<footer class="entry-footer">
70 70
 						<?php twentyfifteen_entry_meta(); ?>
71
-						<?php edit_post_link( __( 'Edit', 'twentyfifteen' ), '<span class="edit-link">', '</span>' ); ?>
71
+						<?php edit_post_link(__('Edit', 'twentyfifteen'), '<span class="edit-link">', '</span>'); ?>
72 72
 					</footer><!-- .entry-footer -->
73 73
 
74 74
 				</article><!-- #post-## -->
75 75
 
76 76
 				<?php
77 77
 					// If comments are open or we have at least one comment, load up the comment template
78
-					if ( comments_open() || get_comments_number() ) :
78
+					if (comments_open() || get_comments_number()) :
79 79
 						comments_template();
80 80
 					endif;
81 81
 
82 82
 					// Previous/next post navigation.
83
-					the_post_navigation( array(
84
-						'prev_text' => _x( '<span class="meta-nav">Published in</span><span class="post-title">%title</span>', 'Parent post link', 'twentyfifteen' ),
85
-					) );
83
+					the_post_navigation(array(
84
+						'prev_text' => _x('<span class="meta-nav">Published in</span><span class="post-title">%title</span>', 'Parent post link', 'twentyfifteen'),
85
+					));
86 86
 
87 87
 				// End the loop.
88 88
 				endwhile;
Please login to merge, or discard this patch.
src/wp-content/themes/twentyfifteen/header.php 3 patches
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -1,13 +1,13 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * The template for displaying the header
4
- *
5
- * Displays all of the head element and everything up until the "site-content" div.
6
- *
7
- * @package WordPress
8
- * @subpackage Twenty_Fifteen
9
- * @since Twenty Fifteen 1.0
10
- */
3
+			 * The template for displaying the header
4
+			 *
5
+			 * Displays all of the head element and everything up until the "site-content" div.
6
+			 *
7
+			 * @package WordPress
8
+			 * @subpackage Twenty_Fifteen
9
+			 * @since Twenty Fifteen 1.0
10
+			 */
11 11
 ?><!DOCTYPE html>
12 12
 <html <?php language_attributes(); ?> class="no-js">
13 13
 <head>
Please login to merge, or discard this patch.
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -11,36 +11,36 @@
 block discarded – undo
11 11
 ?><!DOCTYPE html>
12 12
 <html <?php language_attributes(); ?> class="no-js">
13 13
 <head>
14
-	<meta charset="<?php bloginfo( 'charset' ); ?>">
14
+	<meta charset="<?php bloginfo('charset'); ?>">
15 15
 	<meta name="viewport" content="width=device-width">
16 16
 	<link rel="profile" href="http://gmpg.org/xfn/11">
17
-	<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>">
17
+	<link rel="pingback" href="<?php bloginfo('pingback_url'); ?>">
18 18
 	<!--[if lt IE 9]>
19
-	<script src="<?php echo esc_url( get_template_directory_uri() ); ?>/js/html5.js"></script>
19
+	<script src="<?php echo esc_url(get_template_directory_uri()); ?>/js/html5.js"></script>
20 20
 	<![endif]-->
21 21
 	<?php wp_head(); ?>
22 22
 </head>
23 23
 
24 24
 <body <?php body_class(); ?>>
25 25
 <div id="page" class="hfeed site">
26
-	<a class="skip-link screen-reader-text" href="#content"><?php _e( 'Skip to content', 'twentyfifteen' ); ?></a>
26
+	<a class="skip-link screen-reader-text" href="#content"><?php _e('Skip to content', 'twentyfifteen'); ?></a>
27 27
 
28 28
 	<div id="sidebar" class="sidebar">
29 29
 		<header id="masthead" class="site-header" role="banner">
30 30
 			<div class="site-branding">
31 31
 				<?php
32
-					if ( is_front_page() && is_home() ) : ?>
33
-						<h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1>
32
+					if (is_front_page() && is_home()) : ?>
33
+						<h1 class="site-title"><a href="<?php echo esc_url(home_url('/')); ?>" rel="home"><?php bloginfo('name'); ?></a></h1>
34 34
 					<?php else : ?>
35
-						<p class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></p>
35
+						<p class="site-title"><a href="<?php echo esc_url(home_url('/')); ?>" rel="home"><?php bloginfo('name'); ?></a></p>
36 36
 					<?php endif;
37 37
 
38
-					$description = get_bloginfo( 'description', 'display' );
39
-					if ( $description || is_customize_preview() ) : ?>
38
+					$description = get_bloginfo('description', 'display');
39
+					if ($description || is_customize_preview()) : ?>
40 40
 						<p class="site-description"><?php echo $description; ?></p>
41 41
 					<?php endif;
42 42
 				?>
43
-				<button class="secondary-toggle"><?php _e( 'Menu and widgets', 'twentyfifteen' ); ?></button>
43
+				<button class="secondary-toggle"><?php _e('Menu and widgets', 'twentyfifteen'); ?></button>
44 44
 			</div><!-- .site-branding -->
45 45
 		</header><!-- .site-header -->
46 46
 
Please login to merge, or discard this patch.
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -31,8 +31,11 @@
 block discarded – undo
31 31
 				<?php
32 32
 					if ( is_front_page() && is_home() ) : ?>
33 33
 						<h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1>
34
-					<?php else : ?>
35
-						<p class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></p>
34
+					<?php else {
35
+	: ?>
36
+						<p class="site-title"><a href="<?php echo esc_url( home_url( '/' ) );
37
+}
38
+?>" rel="home"><?php bloginfo( 'name' ); ?></a></p>
36 39
 					<?php endif;
37 40
 
38 41
 					$description = get_bloginfo( 'description', 'display' );
Please login to merge, or discard this patch.
src/wp-content/themes/twentyfifteen/sidebar.php 2 patches
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,11 +1,11 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * The sidebar containing the main widget area
4
- *
5
- * @package WordPress
6
- * @subpackage Twenty_Fifteen
7
- * @since Twenty Fifteen 1.0
8
- */
3
+				 * The sidebar containing the main widget area
4
+				 *
5
+				 * @package WordPress
6
+				 * @subpackage Twenty_Fifteen
7
+				 * @since Twenty Fifteen 1.0
8
+				 */
9 9
 
10 10
 if ( has_nav_menu( 'primary' ) || has_nav_menu( 'social' ) || is_active_sidebar( 'sidebar-1' )  ) : ?>
11 11
 	<div id="secondary" class="secondary">
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -7,38 +7,38 @@
 block discarded – undo
7 7
  * @since Twenty Fifteen 1.0
8 8
  */
9 9
 
10
-if ( has_nav_menu( 'primary' ) || has_nav_menu( 'social' ) || is_active_sidebar( 'sidebar-1' )  ) : ?>
10
+if (has_nav_menu('primary') || has_nav_menu('social') || is_active_sidebar('sidebar-1')) : ?>
11 11
 	<div id="secondary" class="secondary">
12 12
 
13
-		<?php if ( has_nav_menu( 'primary' ) ) : ?>
13
+		<?php if (has_nav_menu('primary')) : ?>
14 14
 			<nav id="site-navigation" class="main-navigation" role="navigation">
15 15
 				<?php
16 16
 					// Primary navigation menu.
17
-					wp_nav_menu( array(
17
+					wp_nav_menu(array(
18 18
 						'menu_class'     => 'nav-menu',
19 19
 						'theme_location' => 'primary',
20
-					) );
20
+					));
21 21
 				?>
22 22
 			</nav><!-- .main-navigation -->
23 23
 		<?php endif; ?>
24 24
 
25
-		<?php if ( has_nav_menu( 'social' ) ) : ?>
25
+		<?php if (has_nav_menu('social')) : ?>
26 26
 			<nav id="social-navigation" class="social-navigation" role="navigation">
27 27
 				<?php
28 28
 					// Social links navigation menu.
29
-					wp_nav_menu( array(
29
+					wp_nav_menu(array(
30 30
 						'theme_location' => 'social',
31 31
 						'depth'          => 1,
32 32
 						'link_before'    => '<span class="screen-reader-text">',
33 33
 						'link_after'     => '</span>',
34
-					) );
34
+					));
35 35
 				?>
36 36
 			</nav><!-- .social-navigation -->
37 37
 		<?php endif; ?>
38 38
 
39
-		<?php if ( is_active_sidebar( 'sidebar-1' ) ) : ?>
39
+		<?php if (is_active_sidebar('sidebar-1')) : ?>
40 40
 			<div id="widget-area" class="widget-area" role="complementary">
41
-				<?php dynamic_sidebar( 'sidebar-1' ); ?>
41
+				<?php dynamic_sidebar('sidebar-1'); ?>
42 42
 			</div><!-- .widget-area -->
43 43
 		<?php endif; ?>
44 44
 
Please login to merge, or discard this patch.
src/wp-content/themes/twentyfifteen/index.php 3 patches
Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -1,18 +1,18 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * The main template file
4
- *
5
- * This is the most generic template file in a WordPress theme
6
- * and one of the two required files for a theme (the other being style.css).
7
- * It is used to display a page when nothing more specific matches a query.
8
- * e.g., it puts together the home page when no home.php file exists.
9
- *
10
- * Learn more: {@link https://codex.wordpress.org/Template_Hierarchy}
11
- *
12
- * @package WordPress
13
- * @subpackage Twenty_Fifteen
14
- * @since Twenty Fifteen 1.0
15
- */
3
+				 * The main template file
4
+				 *
5
+				 * This is the most generic template file in a WordPress theme
6
+				 * and one of the two required files for a theme (the other being style.css).
7
+				 * It is used to display a page when nothing more specific matches a query.
8
+				 * e.g., it puts together the home page when no home.php file exists.
9
+				 *
10
+				 * Learn more: {@link https://codex.wordpress.org/Template_Hierarchy}
11
+				 *
12
+				 * @package WordPress
13
+				 * @subpackage Twenty_Fifteen
14
+				 * @since Twenty Fifteen 1.0
15
+				 */
16 16
 
17 17
 get_header(); ?>
18 18
 
Please login to merge, or discard this patch.
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -19,9 +19,9 @@  discard block
 block discarded – undo
19 19
 	<div id="primary" class="content-area">
20 20
 		<main id="main" class="site-main" role="main">
21 21
 
22
-		<?php if ( have_posts() ) : ?>
22
+		<?php if (have_posts()) : ?>
23 23
 
24
-			<?php if ( is_home() && ! is_front_page() ) : ?>
24
+			<?php if (is_home() && ! is_front_page()) : ?>
25 25
 				<header>
26 26
 					<h1 class="page-title screen-reader-text"><?php single_post_title(); ?></h1>
27 27
 				</header>
@@ -29,28 +29,28 @@  discard block
 block discarded – undo
29 29
 
30 30
 			<?php
31 31
 			// Start the loop.
32
-			while ( have_posts() ) : the_post();
32
+			while (have_posts()) : the_post();
33 33
 
34 34
 				/*
35 35
 				 * Include the Post-Format-specific template for the content.
36 36
 				 * If you want to override this in a child theme, then include a file
37 37
 				 * called content-___.php (where ___ is the Post Format name) and that will be used instead.
38 38
 				 */
39
-				get_template_part( 'content', get_post_format() );
39
+				get_template_part('content', get_post_format());
40 40
 
41 41
 			// End the loop.
42 42
 			endwhile;
43 43
 
44 44
 			// Previous/next page navigation.
45
-			the_posts_pagination( array(
46
-				'prev_text'          => __( 'Previous page', 'twentyfifteen' ),
47
-				'next_text'          => __( 'Next page', 'twentyfifteen' ),
48
-				'before_page_number' => '<span class="meta-nav screen-reader-text">' . __( 'Page', 'twentyfifteen' ) . ' </span>',
49
-			) );
45
+			the_posts_pagination(array(
46
+				'prev_text'          => __('Previous page', 'twentyfifteen'),
47
+				'next_text'          => __('Next page', 'twentyfifteen'),
48
+				'before_page_number' => '<span class="meta-nav screen-reader-text">'.__('Page', 'twentyfifteen').' </span>',
49
+			));
50 50
 
51 51
 		// If no content, include the "No posts found" template.
52 52
 		else :
53
-			get_template_part( 'content', 'none' );
53
+			get_template_part('content', 'none');
54 54
 
55 55
 		endif;
56 56
 		?>
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -49,8 +49,10 @@
 block discarded – undo
49 49
 			) );
50 50
 
51 51
 		// If no content, include the "No posts found" template.
52
-		else :
52
+		else {
53
+			:
53 54
 			get_template_part( 'content', 'none' );
55
+		}
54 56
 
55 57
 		endif;
56 58
 		?>
Please login to merge, or discard this patch.
src/wp-content/themes/twentyfifteen/functions.php 2 patches
Indentation   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -1,29 +1,29 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Twenty Fifteen functions and definitions
4
- *
5
- * Set up the theme and provides some helper functions, which are used in the
6
- * theme as custom template tags. Others are attached to action and filter
7
- * hooks in WordPress to change core functionality.
8
- *
9
- * When using a child theme you can override certain functions (those wrapped
10
- * in a function_exists() call) by defining them first in your child theme's
11
- * functions.php file. The child theme's functions.php file is included before
12
- * the parent theme's file, so the child theme functions would be used.
13
- *
14
- * @link https://codex.wordpress.org/Theme_Development
15
- * @link https://codex.wordpress.org/Child_Themes
16
- *
17
- * Functions that are not pluggable (not wrapped in function_exists()) are
18
- * instead attached to a filter or action hook.
19
- *
20
- * For more information on hooks, actions, and filters,
21
- * {@link https://codex.wordpress.org/Plugin_API}
22
- *
23
- * @package WordPress
24
- * @subpackage Twenty_Fifteen
25
- * @since Twenty Fifteen 1.0
26
- */
3
+		 * Twenty Fifteen functions and definitions
4
+		 *
5
+		 * Set up the theme and provides some helper functions, which are used in the
6
+		 * theme as custom template tags. Others are attached to action and filter
7
+		 * hooks in WordPress to change core functionality.
8
+		 *
9
+		 * When using a child theme you can override certain functions (those wrapped
10
+		 * in a function_exists() call) by defining them first in your child theme's
11
+		 * functions.php file. The child theme's functions.php file is included before
12
+		 * the parent theme's file, so the child theme functions would be used.
13
+		 *
14
+		 * @link https://codex.wordpress.org/Theme_Development
15
+		 * @link https://codex.wordpress.org/Child_Themes
16
+		 *
17
+		 * Functions that are not pluggable (not wrapped in function_exists()) are
18
+		 * instead attached to a filter or action hook.
19
+		 *
20
+		 * For more information on hooks, actions, and filters,
21
+		 * {@link https://codex.wordpress.org/Plugin_API}
22
+		 *
23
+		 * @package WordPress
24
+		 * @subpackage Twenty_Fifteen
25
+		 * @since Twenty Fifteen 1.0
26
+		 */
27 27
 
28 28
 /**
29 29
  * Set the content width based on the theme's design and stylesheet.
Please login to merge, or discard this patch.
Spacing   +82 added lines, -82 removed lines patch added patch discarded remove patch
@@ -30,18 +30,18 @@  discard block
 block discarded – undo
30 30
  *
31 31
  * @since Twenty Fifteen 1.0
32 32
  */
33
-if ( ! isset( $content_width ) ) {
33
+if ( ! isset($content_width)) {
34 34
 	$content_width = 660;
35 35
 }
36 36
 
37 37
 /**
38 38
  * Twenty Fifteen only works in WordPress 4.1 or later.
39 39
  */
40
-if ( version_compare( $GLOBALS['wp_version'], '4.1-alpha', '<' ) ) {
41
-	require get_template_directory() . '/inc/back-compat.php';
40
+if (version_compare($GLOBALS['wp_version'], '4.1-alpha', '<')) {
41
+	require get_template_directory().'/inc/back-compat.php';
42 42
 }
43 43
 
44
-if ( ! function_exists( 'twentyfifteen_setup' ) ) :
44
+if ( ! function_exists('twentyfifteen_setup')) :
45 45
 /**
46 46
  * Sets up theme defaults and registers support for various WordPress features.
47 47
  *
@@ -59,10 +59,10 @@  discard block
 block discarded – undo
59 59
 	 * If you're building a theme based on twentyfifteen, use a find and replace
60 60
 	 * to change 'twentyfifteen' to the name of your theme in all the template files
61 61
 	 */
62
-	load_theme_textdomain( 'twentyfifteen', get_template_directory() . '/languages' );
62
+	load_theme_textdomain('twentyfifteen', get_template_directory().'/languages');
63 63
 
64 64
 	// Add default posts and comments RSS feed links to head.
65
-	add_theme_support( 'automatic-feed-links' );
65
+	add_theme_support('automatic-feed-links');
66 66
 
67 67
 	/*
68 68
 	 * Let WordPress manage the document title.
@@ -70,56 +70,56 @@  discard block
 block discarded – undo
70 70
 	 * hard-coded <title> tag in the document head, and expect WordPress to
71 71
 	 * provide it for us.
72 72
 	 */
73
-	add_theme_support( 'title-tag' );
73
+	add_theme_support('title-tag');
74 74
 
75 75
 	/*
76 76
 	 * Enable support for Post Thumbnails on posts and pages.
77 77
 	 *
78 78
 	 * See: https://codex.wordpress.org/Function_Reference/add_theme_support#Post_Thumbnails
79 79
 	 */
80
-	add_theme_support( 'post-thumbnails' );
81
-	set_post_thumbnail_size( 825, 510, true );
80
+	add_theme_support('post-thumbnails');
81
+	set_post_thumbnail_size(825, 510, true);
82 82
 
83 83
 	// This theme uses wp_nav_menu() in two locations.
84
-	register_nav_menus( array(
85
-		'primary' => __( 'Primary Menu',      'twentyfifteen' ),
86
-		'social'  => __( 'Social Links Menu', 'twentyfifteen' ),
87
-	) );
84
+	register_nav_menus(array(
85
+		'primary' => __('Primary Menu', 'twentyfifteen'),
86
+		'social'  => __('Social Links Menu', 'twentyfifteen'),
87
+	));
88 88
 
89 89
 	/*
90 90
 	 * Switch default core markup for search form, comment form, and comments
91 91
 	 * to output valid HTML5.
92 92
 	 */
93
-	add_theme_support( 'html5', array(
93
+	add_theme_support('html5', array(
94 94
 		'search-form', 'comment-form', 'comment-list', 'gallery', 'caption'
95
-	) );
95
+	));
96 96
 
97 97
 	/*
98 98
 	 * Enable support for Post Formats.
99 99
 	 *
100 100
 	 * See: https://codex.wordpress.org/Post_Formats
101 101
 	 */
102
-	add_theme_support( 'post-formats', array(
102
+	add_theme_support('post-formats', array(
103 103
 		'aside', 'image', 'video', 'quote', 'link', 'gallery', 'status', 'audio', 'chat'
104
-	) );
104
+	));
105 105
 
106 106
 	$color_scheme  = twentyfifteen_get_color_scheme();
107
-	$default_color = trim( $color_scheme[0], '#' );
107
+	$default_color = trim($color_scheme[0], '#');
108 108
 
109 109
 	// Setup the WordPress core custom background feature.
110
-	add_theme_support( 'custom-background', apply_filters( 'twentyfifteen_custom_background_args', array(
110
+	add_theme_support('custom-background', apply_filters('twentyfifteen_custom_background_args', array(
111 111
 		'default-color'      => $default_color,
112 112
 		'default-attachment' => 'fixed',
113
-	) ) );
113
+	)));
114 114
 
115 115
 	/*
116 116
 	 * This theme styles the visual editor to resemble the theme style,
117 117
 	 * specifically font, colors, icons, and column width.
118 118
 	 */
119
-	add_editor_style( array( 'css/editor-style.css', 'genericons/genericons.css', twentyfifteen_fonts_url() ) );
119
+	add_editor_style(array('css/editor-style.css', 'genericons/genericons.css', twentyfifteen_fonts_url()));
120 120
 }
121 121
 endif; // twentyfifteen_setup
122
-add_action( 'after_setup_theme', 'twentyfifteen_setup' );
122
+add_action('after_setup_theme', 'twentyfifteen_setup');
123 123
 
124 124
 /**
125 125
  * Register widget area.
@@ -129,19 +129,19 @@  discard block
 block discarded – undo
129 129
  * @link https://codex.wordpress.org/Function_Reference/register_sidebar
130 130
  */
131 131
 function twentyfifteen_widgets_init() {
132
-	register_sidebar( array(
133
-		'name'          => __( 'Widget Area', 'twentyfifteen' ),
132
+	register_sidebar(array(
133
+		'name'          => __('Widget Area', 'twentyfifteen'),
134 134
 		'id'            => 'sidebar-1',
135
-		'description'   => __( 'Add widgets here to appear in your sidebar.', 'twentyfifteen' ),
135
+		'description'   => __('Add widgets here to appear in your sidebar.', 'twentyfifteen'),
136 136
 		'before_widget' => '<aside id="%1$s" class="widget %2$s">',
137 137
 		'after_widget'  => '</aside>',
138 138
 		'before_title'  => '<h2 class="widget-title">',
139 139
 		'after_title'   => '</h2>',
140
-	) );
140
+	));
141 141
 }
142
-add_action( 'widgets_init', 'twentyfifteen_widgets_init' );
142
+add_action('widgets_init', 'twentyfifteen_widgets_init');
143 143
 
144
-if ( ! function_exists( 'twentyfifteen_fonts_url' ) ) :
144
+if ( ! function_exists('twentyfifteen_fonts_url')) :
145 145
 /**
146 146
  * Register Google fonts for Twenty Fifteen.
147 147
  *
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
 	 * Translators: If there are characters in your language that are not supported
159 159
 	 * by Noto Sans, translate this to 'off'. Do not translate into your own language.
160 160
 	 */
161
-	if ( 'off' !== _x( 'on', 'Noto Sans font: on or off', 'twentyfifteen' ) ) {
161
+	if ('off' !== _x('on', 'Noto Sans font: on or off', 'twentyfifteen')) {
162 162
 		$fonts[] = 'Noto Sans:400italic,700italic,400,700';
163 163
 	}
164 164
 
@@ -166,7 +166,7 @@  discard block
 block discarded – undo
166 166
 	 * Translators: If there are characters in your language that are not supported
167 167
 	 * by Noto Serif, translate this to 'off'. Do not translate into your own language.
168 168
 	 */
169
-	if ( 'off' !== _x( 'on', 'Noto Serif font: on or off', 'twentyfifteen' ) ) {
169
+	if ('off' !== _x('on', 'Noto Serif font: on or off', 'twentyfifteen')) {
170 170
 		$fonts[] = 'Noto Serif:400italic,700italic,400,700';
171 171
 	}
172 172
 
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
174 174
 	 * Translators: If there are characters in your language that are not supported
175 175
 	 * by Inconsolata, translate this to 'off'. Do not translate into your own language.
176 176
 	 */
177
-	if ( 'off' !== _x( 'on', 'Inconsolata font: on or off', 'twentyfifteen' ) ) {
177
+	if ('off' !== _x('on', 'Inconsolata font: on or off', 'twentyfifteen')) {
178 178
 		$fonts[] = 'Inconsolata:400,700';
179 179
 	}
180 180
 
@@ -182,23 +182,23 @@  discard block
 block discarded – undo
182 182
 	 * Translators: To add an additional character subset specific to your language,
183 183
 	 * translate this to 'greek', 'cyrillic', 'devanagari' or 'vietnamese'. Do not translate into your own language.
184 184
 	 */
185
-	$subset = _x( 'no-subset', 'Add new subset (greek, cyrillic, devanagari, vietnamese)', 'twentyfifteen' );
185
+	$subset = _x('no-subset', 'Add new subset (greek, cyrillic, devanagari, vietnamese)', 'twentyfifteen');
186 186
 
187
-	if ( 'cyrillic' == $subset ) {
187
+	if ('cyrillic' == $subset) {
188 188
 		$subsets .= ',cyrillic,cyrillic-ext';
189
-	} elseif ( 'greek' == $subset ) {
189
+	} elseif ('greek' == $subset) {
190 190
 		$subsets .= ',greek,greek-ext';
191
-	} elseif ( 'devanagari' == $subset ) {
191
+	} elseif ('devanagari' == $subset) {
192 192
 		$subsets .= ',devanagari';
193
-	} elseif ( 'vietnamese' == $subset ) {
193
+	} elseif ('vietnamese' == $subset) {
194 194
 		$subsets .= ',vietnamese';
195 195
 	}
196 196
 
197
-	if ( $fonts ) {
198
-		$fonts_url = add_query_arg( array(
199
-			'family' => urlencode( implode( '|', $fonts ) ),
200
-			'subset' => urlencode( $subsets ),
201
-		), 'https://fonts.googleapis.com/css' );
197
+	if ($fonts) {
198
+		$fonts_url = add_query_arg(array(
199
+			'family' => urlencode(implode('|', $fonts)),
200
+			'subset' => urlencode($subsets),
201
+		), 'https://fonts.googleapis.com/css');
202 202
 	}
203 203
 
204 204
 	return $fonts_url;
@@ -215,7 +215,7 @@  discard block
 block discarded – undo
215 215
 function twentyfifteen_javascript_detection() {
216 216
 	echo "<script>(function(html){html.className = html.className.replace(/\bno-js\b/,'js')})(document.documentElement);</script>\n";
217 217
 }
218
-add_action( 'wp_head', 'twentyfifteen_javascript_detection', 0 );
218
+add_action('wp_head', 'twentyfifteen_javascript_detection', 0);
219 219
 
220 220
 /**
221 221
  * Enqueue scripts and styles.
@@ -224,39 +224,39 @@  discard block
 block discarded – undo
224 224
  */
225 225
 function twentyfifteen_scripts() {
226 226
 	// Add custom fonts, used in the main stylesheet.
227
-	wp_enqueue_style( 'twentyfifteen-fonts', twentyfifteen_fonts_url(), array(), null );
227
+	wp_enqueue_style('twentyfifteen-fonts', twentyfifteen_fonts_url(), array(), null);
228 228
 
229 229
 	// Add Genericons, used in the main stylesheet.
230
-	wp_enqueue_style( 'genericons', get_template_directory_uri() . '/genericons/genericons.css', array(), '3.2' );
230
+	wp_enqueue_style('genericons', get_template_directory_uri().'/genericons/genericons.css', array(), '3.2');
231 231
 
232 232
 	// Load our main stylesheet.
233
-	wp_enqueue_style( 'twentyfifteen-style', get_stylesheet_uri() );
233
+	wp_enqueue_style('twentyfifteen-style', get_stylesheet_uri());
234 234
 
235 235
 	// Load the Internet Explorer specific stylesheet.
236
-	wp_enqueue_style( 'twentyfifteen-ie', get_template_directory_uri() . '/css/ie.css', array( 'twentyfifteen-style' ), '20141010' );
237
-	wp_style_add_data( 'twentyfifteen-ie', 'conditional', 'lt IE 9' );
236
+	wp_enqueue_style('twentyfifteen-ie', get_template_directory_uri().'/css/ie.css', array('twentyfifteen-style'), '20141010');
237
+	wp_style_add_data('twentyfifteen-ie', 'conditional', 'lt IE 9');
238 238
 
239 239
 	// Load the Internet Explorer 7 specific stylesheet.
240
-	wp_enqueue_style( 'twentyfifteen-ie7', get_template_directory_uri() . '/css/ie7.css', array( 'twentyfifteen-style' ), '20141010' );
241
-	wp_style_add_data( 'twentyfifteen-ie7', 'conditional', 'lt IE 8' );
240
+	wp_enqueue_style('twentyfifteen-ie7', get_template_directory_uri().'/css/ie7.css', array('twentyfifteen-style'), '20141010');
241
+	wp_style_add_data('twentyfifteen-ie7', 'conditional', 'lt IE 8');
242 242
 
243
-	wp_enqueue_script( 'twentyfifteen-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), '20141010', true );
243
+	wp_enqueue_script('twentyfifteen-skip-link-focus-fix', get_template_directory_uri().'/js/skip-link-focus-fix.js', array(), '20141010', true);
244 244
 
245
-	if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
246
-		wp_enqueue_script( 'comment-reply' );
245
+	if (is_singular() && comments_open() && get_option('thread_comments')) {
246
+		wp_enqueue_script('comment-reply');
247 247
 	}
248 248
 
249
-	if ( is_singular() && wp_attachment_is_image() ) {
250
-		wp_enqueue_script( 'twentyfifteen-keyboard-image-navigation', get_template_directory_uri() . '/js/keyboard-image-navigation.js', array( 'jquery' ), '20141010' );
249
+	if (is_singular() && wp_attachment_is_image()) {
250
+		wp_enqueue_script('twentyfifteen-keyboard-image-navigation', get_template_directory_uri().'/js/keyboard-image-navigation.js', array('jquery'), '20141010');
251 251
 	}
252 252
 
253
-	wp_enqueue_script( 'twentyfifteen-script', get_template_directory_uri() . '/js/functions.js', array( 'jquery' ), '20150330', true );
254
-	wp_localize_script( 'twentyfifteen-script', 'screenReaderText', array(
255
-		'expand'   => '<span class="screen-reader-text">' . __( 'expand child menu', 'twentyfifteen' ) . '</span>',
256
-		'collapse' => '<span class="screen-reader-text">' . __( 'collapse child menu', 'twentyfifteen' ) . '</span>',
257
-	) );
253
+	wp_enqueue_script('twentyfifteen-script', get_template_directory_uri().'/js/functions.js', array('jquery'), '20150330', true);
254
+	wp_localize_script('twentyfifteen-script', 'screenReaderText', array(
255
+		'expand'   => '<span class="screen-reader-text">'.__('expand child menu', 'twentyfifteen').'</span>',
256
+		'collapse' => '<span class="screen-reader-text">'.__('collapse child menu', 'twentyfifteen').'</span>',
257
+	));
258 258
 }
259
-add_action( 'wp_enqueue_scripts', 'twentyfifteen_scripts' );
259
+add_action('wp_enqueue_scripts', 'twentyfifteen_scripts');
260 260
 
261 261
 /**
262 262
  * Add featured image as background image to post navigation elements.
@@ -266,39 +266,39 @@  discard block
 block discarded – undo
266 266
  * @see wp_add_inline_style()
267 267
  */
268 268
 function twentyfifteen_post_nav_background() {
269
-	if ( ! is_single() ) {
269
+	if ( ! is_single()) {
270 270
 		return;
271 271
 	}
272 272
 
273
-	$previous = ( is_attachment() ) ? get_post( get_post()->post_parent ) : get_adjacent_post( false, '', true );
274
-	$next     = get_adjacent_post( false, '', false );
273
+	$previous = (is_attachment()) ? get_post(get_post()->post_parent) : get_adjacent_post(false, '', true);
274
+	$next     = get_adjacent_post(false, '', false);
275 275
 	$css      = '';
276 276
 
277
-	if ( is_attachment() && 'attachment' == $previous->post_type ) {
277
+	if (is_attachment() && 'attachment' == $previous->post_type) {
278 278
 		return;
279 279
 	}
280 280
 
281
-	if ( $previous &&  has_post_thumbnail( $previous->ID ) ) {
282
-		$prevthumb = wp_get_attachment_image_src( get_post_thumbnail_id( $previous->ID ), 'post-thumbnail' );
281
+	if ($previous && has_post_thumbnail($previous->ID)) {
282
+		$prevthumb = wp_get_attachment_image_src(get_post_thumbnail_id($previous->ID), 'post-thumbnail');
283 283
 		$css .= '
284
-			.post-navigation .nav-previous { background-image: url(' . esc_url( $prevthumb[0] ) . '); }
284
+			.post-navigation .nav-previous { background-image: url(' . esc_url($prevthumb[0]).'); }
285 285
 			.post-navigation .nav-previous .post-title, .post-navigation .nav-previous a:hover .post-title, .post-navigation .nav-previous .meta-nav { color: #fff; }
286 286
 			.post-navigation .nav-previous a:before { background-color: rgba(0, 0, 0, 0.4); }
287 287
 		';
288 288
 	}
289 289
 
290
-	if ( $next && has_post_thumbnail( $next->ID ) ) {
291
-		$nextthumb = wp_get_attachment_image_src( get_post_thumbnail_id( $next->ID ), 'post-thumbnail' );
290
+	if ($next && has_post_thumbnail($next->ID)) {
291
+		$nextthumb = wp_get_attachment_image_src(get_post_thumbnail_id($next->ID), 'post-thumbnail');
292 292
 		$css .= '
293
-			.post-navigation .nav-next { background-image: url(' . esc_url( $nextthumb[0] ) . '); border-top: 0; }
293
+			.post-navigation .nav-next { background-image: url(' . esc_url($nextthumb[0]).'); border-top: 0; }
294 294
 			.post-navigation .nav-next .post-title, .post-navigation .nav-next a:hover .post-title, .post-navigation .nav-next .meta-nav { color: #fff; }
295 295
 			.post-navigation .nav-next a:before { background-color: rgba(0, 0, 0, 0.4); }
296 296
 		';
297 297
 	}
298 298
 
299
-	wp_add_inline_style( 'twentyfifteen-style', $css );
299
+	wp_add_inline_style('twentyfifteen-style', $css);
300 300
 }
301
-add_action( 'wp_enqueue_scripts', 'twentyfifteen_post_nav_background' );
301
+add_action('wp_enqueue_scripts', 'twentyfifteen_post_nav_background');
302 302
 
303 303
 /**
304 304
  * Display descriptions in main navigation.
@@ -311,14 +311,14 @@  discard block
 block discarded – undo
311 311
  * @param array   $args        wp_nav_menu() arguments.
312 312
  * @return string Menu item with possible description.
313 313
  */
314
-function twentyfifteen_nav_description( $item_output, $item, $depth, $args ) {
315
-	if ( 'primary' == $args->theme_location && $item->description ) {
316
-		$item_output = str_replace( $args->link_after . '</a>', '<div class="menu-item-description">' . $item->description . '</div>' . $args->link_after . '</a>', $item_output );
314
+function twentyfifteen_nav_description($item_output, $item, $depth, $args) {
315
+	if ('primary' == $args->theme_location && $item->description) {
316
+		$item_output = str_replace($args->link_after.'</a>', '<div class="menu-item-description">'.$item->description.'</div>'.$args->link_after.'</a>', $item_output);
317 317
 	}
318 318
 
319 319
 	return $item_output;
320 320
 }
321
-add_filter( 'walker_nav_menu_start_el', 'twentyfifteen_nav_description', 10, 4 );
321
+add_filter('walker_nav_menu_start_el', 'twentyfifteen_nav_description', 10, 4);
322 322
 
323 323
 /**
324 324
  * Add a `screen-reader-text` class to the search form's submit button.
@@ -328,28 +328,28 @@  discard block
 block discarded – undo
328 328
  * @param string $html Search form HTML.
329 329
  * @return string Modified search form HTML.
330 330
  */
331
-function twentyfifteen_search_form_modify( $html ) {
332
-	return str_replace( 'class="search-submit"', 'class="search-submit screen-reader-text"', $html );
331
+function twentyfifteen_search_form_modify($html) {
332
+	return str_replace('class="search-submit"', 'class="search-submit screen-reader-text"', $html);
333 333
 }
334
-add_filter( 'get_search_form', 'twentyfifteen_search_form_modify' );
334
+add_filter('get_search_form', 'twentyfifteen_search_form_modify');
335 335
 
336 336
 /**
337 337
  * Implement the Custom Header feature.
338 338
  *
339 339
  * @since Twenty Fifteen 1.0
340 340
  */
341
-require get_template_directory() . '/inc/custom-header.php';
341
+require get_template_directory().'/inc/custom-header.php';
342 342
 
343 343
 /**
344 344
  * Custom template tags for this theme.
345 345
  *
346 346
  * @since Twenty Fifteen 1.0
347 347
  */
348
-require get_template_directory() . '/inc/template-tags.php';
348
+require get_template_directory().'/inc/template-tags.php';
349 349
 
350 350
 /**
351 351
  * Customizer additions.
352 352
  *
353 353
  * @since Twenty Fifteen 1.0
354 354
  */
355
-require get_template_directory() . '/inc/customizer.php';
355
+require get_template_directory().'/inc/customizer.php';
Please login to merge, or discard this patch.