Completed
Push — master ( d99bf9...491baf )
by Stephen
13:47
created
src/wp-content/themes/twentyfifteen/index.php 2 patches
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/content-link.php 2 patches
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -15,10 +15,10 @@  discard block
 block discarded – undo
15 15
 
16 16
 	<header class="entry-header">
17 17
 		<?php
18
-			if ( is_single() ) :
19
-				the_title( sprintf( '<h1 class="entry-title"><a href="%s">', esc_url( twentyfifteen_get_link_url() ) ), '</a></h1>' );
18
+			if (is_single()) :
19
+				the_title(sprintf('<h1 class="entry-title"><a href="%s">', esc_url(twentyfifteen_get_link_url())), '</a></h1>');
20 20
 			else :
21
-				the_title( sprintf( '<h2 class="entry-title"><a href="%s">', esc_url( twentyfifteen_get_link_url() ) ), '</a></h2>' );
21
+				the_title(sprintf('<h2 class="entry-title"><a href="%s">', esc_url(twentyfifteen_get_link_url())), '</a></h2>');
22 22
 			endif;
23 23
 		?>
24 24
 	</header>
@@ -27,33 +27,33 @@  discard block
 block discarded – undo
27 27
 	<div class="entry-content">
28 28
 		<?php
29 29
 			/* translators: %s: Name of current post */
30
-			the_content( sprintf(
31
-				__( 'Continue reading %s', 'twentyfifteen' ),
32
-				the_title( '<span class="screen-reader-text">', '</span>', false )
33
-			) );
30
+			the_content(sprintf(
31
+				__('Continue reading %s', 'twentyfifteen'),
32
+				the_title('<span class="screen-reader-text">', '</span>', false)
33
+			));
34 34
 
35
-			wp_link_pages( array(
36
-				'before'      => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentyfifteen' ) . '</span>',
35
+			wp_link_pages(array(
36
+				'before'      => '<div class="page-links"><span class="page-links-title">'.__('Pages:', 'twentyfifteen').'</span>',
37 37
 				'after'       => '</div>',
38 38
 				'link_before' => '<span>',
39 39
 				'link_after'  => '</span>',
40
-				'pagelink'    => '<span class="screen-reader-text">' . __( 'Page', 'twentyfifteen' ) . ' </span>%',
40
+				'pagelink'    => '<span class="screen-reader-text">'.__('Page', 'twentyfifteen').' </span>%',
41 41
 				'separator'   => '<span class="screen-reader-text">, </span>',
42
-			) );
42
+			));
43 43
 		?>
44 44
 	</div>
45 45
 	<!-- .entry-content -->
46 46
 
47 47
 	<?php
48 48
 		// Author bio.
49
-		if ( is_single() && get_the_author_meta( 'description' ) ) :
50
-			get_template_part( 'author-bio' );
49
+		if (is_single() && get_the_author_meta('description')) :
50
+			get_template_part('author-bio');
51 51
 		endif;
52 52
 	?>
53 53
 
54 54
 	<footer class="entry-footer">
55 55
 		<?php twentyfifteen_entry_meta(); ?>
56
-		<?php edit_post_link( __( 'Edit', 'twentyfifteen' ), '<span class="edit-link">', '</span>' ); ?>
56
+		<?php edit_post_link(__('Edit', 'twentyfifteen'), '<span class="edit-link">', '</span>'); ?>
57 57
 	</footer>
58 58
 	<!-- .entry-footer -->
59 59
 
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,8 +17,10 @@
 block discarded – undo
17 17
 		<?php
18 18
 			if ( is_single() ) :
19 19
 				the_title( sprintf( '<h1 class="entry-title"><a href="%s">', esc_url( twentyfifteen_get_link_url() ) ), '</a></h1>' );
20
-			else :
20
+			else {
21
+				:
21 22
 				the_title( sprintf( '<h2 class="entry-title"><a href="%s">', esc_url( twentyfifteen_get_link_url() ) ), '</a></h2>' );
23
+			}
22 24
 			endif;
23 25
 		?>
24 26
 	</header>
Please login to merge, or discard this patch.
src/wp-content/themes/twentyfifteen/page.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -18,13 +18,13 @@
 block discarded – undo
18 18
 
19 19
 		<?php
20 20
 		// Start the loop.
21
-		while ( have_posts() ) : the_post();
21
+		while (have_posts()) : the_post();
22 22
 
23 23
 			// Include the page content template.
24
-			get_template_part( 'content', 'page' );
24
+			get_template_part('content', 'page');
25 25
 
26 26
 			// If comments are open or we have at least one comment, load up the comment template.
27
-			if ( comments_open() || get_comments_number() ) :
27
+			if (comments_open() || get_comments_number()) :
28 28
 				comments_template();
29 29
 			endif;
30 30
 
Please login to merge, or discard this patch.
src/wp-content/themes/twentyfifteen/search.php 2 patches
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -12,15 +12,15 @@  discard block
 block discarded – undo
12 12
 	<section id="primary" class="content-area">
13 13
 		<main id="main" class="site-main" role="main">
14 14
 
15
-		<?php if ( have_posts() ) : ?>
15
+		<?php if (have_posts()) : ?>
16 16
 
17 17
 			<header class="page-header">
18
-				<h1 class="page-title"><?php printf( __( 'Search Results for: %s', 'twentyfifteen' ), get_search_query() ); ?></h1>
18
+				<h1 class="page-title"><?php printf(__('Search Results for: %s', 'twentyfifteen'), get_search_query()); ?></h1>
19 19
 			</header><!-- .page-header -->
20 20
 
21 21
 			<?php
22 22
 			// Start the loop.
23
-			while ( have_posts() ) : the_post(); ?>
23
+			while (have_posts()) : the_post(); ?>
24 24
 
25 25
 				<?php
26 26
 				/*
@@ -28,21 +28,21 @@  discard block
 block discarded – undo
28 28
 				 * If you want to overload this in a child theme then include a file
29 29
 				 * called content-search.php and that will be used instead.
30 30
 				 */
31
-				get_template_part( 'content', 'search' );
31
+				get_template_part('content', 'search');
32 32
 
33 33
 			// End the loop.
34 34
 			endwhile;
35 35
 
36 36
 			// Previous/next page navigation.
37
-			the_posts_pagination( array(
38
-				'prev_text'          => __( 'Previous page', 'twentyfifteen' ),
39
-				'next_text'          => __( 'Next page', 'twentyfifteen' ),
40
-				'before_page_number' => '<span class="meta-nav screen-reader-text">' . __( 'Page', 'twentyfifteen' ) . ' </span>',
41
-			) );
37
+			the_posts_pagination(array(
38
+				'prev_text'          => __('Previous page', 'twentyfifteen'),
39
+				'next_text'          => __('Next page', 'twentyfifteen'),
40
+				'before_page_number' => '<span class="meta-nav screen-reader-text">'.__('Page', 'twentyfifteen').' </span>',
41
+			));
42 42
 
43 43
 		// If no content, include the "No posts found" template.
44 44
 		else :
45
-			get_template_part( 'content', 'none' );
45
+			get_template_part('content', 'none');
46 46
 
47 47
 		endif;
48 48
 		?>
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/inc/back-compat.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -19,11 +19,11 @@  discard block
 block discarded – undo
19 19
  * @since Twenty Fifteen 1.0
20 20
  */
21 21
 function twentyfifteen_switch_theme() {
22
-	switch_theme( WP_DEFAULT_THEME, WP_DEFAULT_THEME );
23
-	unset( $_GET['activated'] );
24
-	add_action( 'admin_notices', 'twentyfifteen_upgrade_notice' );
22
+	switch_theme(WP_DEFAULT_THEME, WP_DEFAULT_THEME);
23
+	unset($_GET['activated']);
24
+	add_action('admin_notices', 'twentyfifteen_upgrade_notice');
25 25
 }
26
-add_action( 'after_switch_theme', 'twentyfifteen_switch_theme' );
26
+add_action('after_switch_theme', 'twentyfifteen_switch_theme');
27 27
 
28 28
 /**
29 29
  * Add message for unsuccessful theme switch.
@@ -34,8 +34,8 @@  discard block
 block discarded – undo
34 34
  * @since Twenty Fifteen 1.0
35 35
  */
36 36
 function twentyfifteen_upgrade_notice() {
37
-	$message = sprintf( __( 'Twenty Fifteen requires at least WordPress version 4.1. You are running version %s. Please upgrade and try again.', 'twentyfifteen' ), $GLOBALS['wp_version'] );
38
-	printf( '<div class="error"><p>%s</p></div>', $message );
37
+	$message = sprintf(__('Twenty Fifteen requires at least WordPress version 4.1. You are running version %s. Please upgrade and try again.', 'twentyfifteen'), $GLOBALS['wp_version']);
38
+	printf('<div class="error"><p>%s</p></div>', $message);
39 39
 }
40 40
 
41 41
 /**
@@ -44,11 +44,11 @@  discard block
 block discarded – undo
44 44
  * @since Twenty Fifteen 1.0
45 45
  */
46 46
 function twentyfifteen_customize() {
47
-	wp_die( sprintf( __( 'Twenty Fifteen requires at least WordPress version 4.1. You are running version %s. Please upgrade and try again.', 'twentyfifteen' ), $GLOBALS['wp_version'] ), '', array(
47
+	wp_die(sprintf(__('Twenty Fifteen requires at least WordPress version 4.1. You are running version %s. Please upgrade and try again.', 'twentyfifteen'), $GLOBALS['wp_version']), '', array(
48 48
 		'back_link' => true,
49
-	) );
49
+	));
50 50
 }
51
-add_action( 'load-customize.php', 'twentyfifteen_customize' );
51
+add_action('load-customize.php', 'twentyfifteen_customize');
52 52
 
53 53
 /**
54 54
  * Prevent the Theme Preview from being loaded on WordPress versions prior to 4.1.
@@ -56,8 +56,8 @@  discard block
 block discarded – undo
56 56
  * @since Twenty Fifteen 1.0
57 57
  */
58 58
 function twentyfifteen_preview() {
59
-	if ( isset( $_GET['preview'] ) ) {
60
-		wp_die( sprintf( __( 'Twenty Fifteen requires at least WordPress version 4.1. You are running version %s. Please upgrade and try again.', 'twentyfifteen' ), $GLOBALS['wp_version'] ) );
59
+	if (isset($_GET['preview'])) {
60
+		wp_die(sprintf(__('Twenty Fifteen requires at least WordPress version 4.1. You are running version %s. Please upgrade and try again.', 'twentyfifteen'), $GLOBALS['wp_version']));
61 61
 	}
62 62
 }
63
-add_action( 'template_redirect', 'twentyfifteen_preview' );
63
+add_action('template_redirect', 'twentyfifteen_preview');
Please login to merge, or discard this patch.
src/wp-content/themes/twentyfifteen/inc/custom-header.php 1 patch
Spacing   +33 added lines, -33 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
  */
15 15
 function twentyfifteen_custom_header_setup() {
16 16
 	$color_scheme        = twentyfifteen_get_color_scheme();
17
-	$default_text_color  = trim( $color_scheme[4], '#' );
17
+	$default_text_color  = trim($color_scheme[4], '#');
18 18
 
19 19
 	/**
20 20
 	 * Filter Twenty Fifteen custom-header support arguments.
@@ -31,14 +31,14 @@  discard block
 block discarded – undo
31 31
 	 *                                          displayed on the blog.
32 32
 	 * }
33 33
 	 */
34
-	add_theme_support( 'custom-header', apply_filters( 'twentyfifteen_custom_header_args', array(
34
+	add_theme_support('custom-header', apply_filters('twentyfifteen_custom_header_args', array(
35 35
 		'default-text-color'     => $default_text_color,
36 36
 		'width'                  => 954,
37 37
 		'height'                 => 1300,
38 38
 		'wp-head-callback'       => 'twentyfifteen_header_style',
39
-	) ) );
39
+	)));
40 40
 }
41
-add_action( 'after_setup_theme', 'twentyfifteen_custom_header_setup' );
41
+add_action('after_setup_theme', 'twentyfifteen_custom_header_setup');
42 42
 
43 43
 /**
44 44
  * Convert HEX to RGB.
@@ -49,25 +49,25 @@  discard block
 block discarded – undo
49 49
  * @return array Array containing RGB (red, green, and blue) values for the given
50 50
  *               HEX code, empty array otherwise.
51 51
  */
52
-function twentyfifteen_hex2rgb( $color ) {
53
-	$color = trim( $color, '#' );
54
-
55
-	if ( strlen( $color ) == 3 ) {
56
-		$r = hexdec( substr( $color, 0, 1 ).substr( $color, 0, 1 ) );
57
-		$g = hexdec( substr( $color, 1, 1 ).substr( $color, 1, 1 ) );
58
-		$b = hexdec( substr( $color, 2, 1 ).substr( $color, 2, 1 ) );
59
-	} else if ( strlen( $color ) == 6 ) {
60
-		$r = hexdec( substr( $color, 0, 2 ) );
61
-		$g = hexdec( substr( $color, 2, 2 ) );
62
-		$b = hexdec( substr( $color, 4, 2 ) );
52
+function twentyfifteen_hex2rgb($color) {
53
+	$color = trim($color, '#');
54
+
55
+	if (strlen($color) == 3) {
56
+		$r = hexdec(substr($color, 0, 1).substr($color, 0, 1));
57
+		$g = hexdec(substr($color, 1, 1).substr($color, 1, 1));
58
+		$b = hexdec(substr($color, 2, 1).substr($color, 2, 1));
59
+	} else if (strlen($color) == 6) {
60
+		$r = hexdec(substr($color, 0, 2));
61
+		$g = hexdec(substr($color, 2, 2));
62
+		$b = hexdec(substr($color, 4, 2));
63 63
 	} else {
64 64
 		return array();
65 65
 	}
66 66
 
67
-	return array( 'red' => $r, 'green' => $g, 'blue' => $b );
67
+	return array('red' => $r, 'green' => $g, 'blue' => $b);
68 68
 }
69 69
 
70
-if ( ! function_exists( 'twentyfifteen_header_style' ) ) :
70
+if ( ! function_exists('twentyfifteen_header_style')) :
71 71
 /**
72 72
  * Styles the header image and text displayed on the blog.
73 73
  *
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
 	$header_image = get_header_image();
80 80
 
81 81
 	// If no custom options for text are set, let's bail.
82
-	if ( empty( $header_image ) && display_header_text() ) {
82
+	if (empty($header_image) && display_header_text()) {
83 83
 		return;
84 84
 	}
85 85
 
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
 	<style type="text/css" id="twentyfifteen-header-css">
89 89
 	<?php
90 90
 		// Short header for when there is no Custom Header and Header Text is hidden.
91
-		if ( empty( $header_image ) && ! display_header_text() ) :
91
+		if (empty($header_image) && ! display_header_text()) :
92 92
 	?>
93 93
 		.site-header {
94 94
 			padding-top: 14px;
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
 		endif;
131 131
 
132 132
 		// Has a Custom Header been added?
133
-		if ( ! empty( $header_image ) ) :
133
+		if ( ! empty($header_image)) :
134 134
 	?>
135 135
 		.site-header {
136 136
 
@@ -172,7 +172,7 @@  discard block
 block discarded – undo
172 172
 		endif;
173 173
 
174 174
 		// Has the text been hidden?
175
-		if ( ! display_header_text() ) :
175
+		if ( ! display_header_text()) :
176 176
 	?>
177 177
 		.site-title,
178 178
 		.site-description {
@@ -195,10 +195,10 @@  discard block
 block discarded – undo
195 195
 function twentyfifteen_header_background_color_css() {
196 196
 	$color_scheme            = twentyfifteen_get_color_scheme();
197 197
 	$default_color           = $color_scheme[1];
198
-	$header_background_color = get_theme_mod( 'header_background_color', $default_color );
198
+	$header_background_color = get_theme_mod('header_background_color', $default_color);
199 199
 
200 200
 	// Don't do anything if the current color is the default.
201
-	if ( $header_background_color === $default_color ) {
201
+	if ($header_background_color === $default_color) {
202 202
 		return;
203 203
 	}
204 204
 
@@ -227,9 +227,9 @@  discard block
 block discarded – undo
227 227
 		}
228 228
 	';
229 229
 
230
-	wp_add_inline_style( 'twentyfifteen-style', sprintf( $css, $header_background_color ) );
230
+	wp_add_inline_style('twentyfifteen-style', sprintf($css, $header_background_color));
231 231
 }
232
-add_action( 'wp_enqueue_scripts', 'twentyfifteen_header_background_color_css', 11 );
232
+add_action('wp_enqueue_scripts', 'twentyfifteen_header_background_color_css', 11);
233 233
 
234 234
 /**
235 235
  * Enqueues front-end CSS for the sidebar text color.
@@ -239,18 +239,18 @@  discard block
 block discarded – undo
239 239
 function twentyfifteen_sidebar_text_color_css() {
240 240
 	$color_scheme       = twentyfifteen_get_color_scheme();
241 241
 	$default_color      = $color_scheme[4];
242
-	$sidebar_link_color = get_theme_mod( 'sidebar_textcolor', $default_color );
242
+	$sidebar_link_color = get_theme_mod('sidebar_textcolor', $default_color);
243 243
 
244 244
 	// Don't do anything if the current color is the default.
245
-	if ( $sidebar_link_color === $default_color ) {
245
+	if ($sidebar_link_color === $default_color) {
246 246
 		return;
247 247
 	}
248 248
 
249 249
 	// If we get this far, we have custom styles. Let's do this.
250
-	$sidebar_link_color_rgb     = twentyfifteen_hex2rgb( $sidebar_link_color );
251
-	$sidebar_text_color         = vsprintf( 'rgba( %1$s, %2$s, %3$s, 0.7)', $sidebar_link_color_rgb );
252
-	$sidebar_border_color       = vsprintf( 'rgba( %1$s, %2$s, %3$s, 0.1)', $sidebar_link_color_rgb );
253
-	$sidebar_border_focus_color = vsprintf( 'rgba( %1$s, %2$s, %3$s, 0.3)', $sidebar_link_color_rgb );
250
+	$sidebar_link_color_rgb     = twentyfifteen_hex2rgb($sidebar_link_color);
251
+	$sidebar_text_color         = vsprintf('rgba( %1$s, %2$s, %3$s, 0.7)', $sidebar_link_color_rgb);
252
+	$sidebar_border_color       = vsprintf('rgba( %1$s, %2$s, %3$s, 0.1)', $sidebar_link_color_rgb);
253
+	$sidebar_border_focus_color = vsprintf('rgba( %1$s, %2$s, %3$s, 0.3)', $sidebar_link_color_rgb);
254 254
 
255 255
 	$css = '
256 256
 		/* Custom Sidebar Text Color */
@@ -365,6 +365,6 @@  discard block
 block discarded – undo
365 365
 		}
366 366
 	';
367 367
 
368
-	wp_add_inline_style( 'twentyfifteen-style', sprintf( $css, $sidebar_link_color, $sidebar_text_color, $sidebar_border_color, $sidebar_border_focus_color ) );
368
+	wp_add_inline_style('twentyfifteen-style', sprintf($css, $sidebar_link_color, $sidebar_text_color, $sidebar_border_color, $sidebar_border_focus_color));
369 369
 }
370
-add_action( 'wp_enqueue_scripts', 'twentyfifteen_sidebar_text_color_css', 11 );
370
+add_action('wp_enqueue_scripts', 'twentyfifteen_sidebar_text_color_css', 11);
Please login to merge, or discard this patch.
src/wp-content/themes/twentyfifteen/inc/template-tags.php 2 patches
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -192,9 +192,12 @@
 block discarded – undo
192 192
 		<?php the_post_thumbnail(); ?>
193 193
 	</div><!-- .post-thumbnail -->
194 194
 
195
-	<?php else : ?>
195
+	<?php else {
196
+	: ?>
196 197
 
197
-	<a class="post-thumbnail" href="<?php the_permalink(); ?>" aria-hidden="true">
198
+	<a class="post-thumbnail" href="<?php the_permalink();
199
+}
200
+?>" aria-hidden="true">
198 201
 		<?php
199 202
 			the_post_thumbnail( 'post-thumbnail', array( 'alt' => get_the_title() ) );
200 203
 		?>
Please login to merge, or discard this patch.
Spacing   +67 added lines, -67 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
  * @since Twenty Fifteen 1.0
10 10
  */
11 11
 
12
-if ( ! function_exists( 'twentyfifteen_comment_nav' ) ) :
12
+if ( ! function_exists('twentyfifteen_comment_nav')) :
13 13
 /**
14 14
  * Display navigation to next/previous comments when applicable.
15 15
  *
@@ -17,18 +17,18 @@  discard block
 block discarded – undo
17 17
  */
18 18
 function twentyfifteen_comment_nav() {
19 19
 	// Are there comments to navigate through?
20
-	if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) :
20
+	if (get_comment_pages_count() > 1 && get_option('page_comments')) :
21 21
 	?>
22 22
 	<nav class="navigation comment-navigation" role="navigation">
23
-		<h2 class="screen-reader-text"><?php _e( 'Comment navigation', 'twentyfifteen' ); ?></h2>
23
+		<h2 class="screen-reader-text"><?php _e('Comment navigation', 'twentyfifteen'); ?></h2>
24 24
 		<div class="nav-links">
25 25
 			<?php
26
-				if ( $prev_link = get_previous_comments_link( __( 'Older Comments', 'twentyfifteen' ) ) ) :
27
-					printf( '<div class="nav-previous">%s</div>', $prev_link );
26
+				if ($prev_link = get_previous_comments_link(__('Older Comments', 'twentyfifteen'))) :
27
+					printf('<div class="nav-previous">%s</div>', $prev_link);
28 28
 				endif;
29 29
 
30
-				if ( $next_link = get_next_comments_link( __( 'Newer Comments', 'twentyfifteen' ) ) ) :
31
-					printf( '<div class="nav-next">%s</div>', $next_link );
30
+				if ($next_link = get_next_comments_link(__('Newer Comments', 'twentyfifteen'))) :
31
+					printf('<div class="nav-next">%s</div>', $next_link);
32 32
 				endif;
33 33
 			?>
34 34
 		</div><!-- .nav-links -->
@@ -38,89 +38,89 @@  discard block
 block discarded – undo
38 38
 }
39 39
 endif;
40 40
 
41
-if ( ! function_exists( 'twentyfifteen_entry_meta' ) ) :
41
+if ( ! function_exists('twentyfifteen_entry_meta')) :
42 42
 /**
43 43
  * Prints HTML with meta information for the categories, tags.
44 44
  *
45 45
  * @since Twenty Fifteen 1.0
46 46
  */
47 47
 function twentyfifteen_entry_meta() {
48
-	if ( is_sticky() && is_home() && ! is_paged() ) {
49
-		printf( '<span class="sticky-post">%s</span>', __( 'Featured', 'twentyfifteen' ) );
48
+	if (is_sticky() && is_home() && ! is_paged()) {
49
+		printf('<span class="sticky-post">%s</span>', __('Featured', 'twentyfifteen'));
50 50
 	}
51 51
 
52 52
 	$format = get_post_format();
53
-	if ( current_theme_supports( 'post-formats', $format ) ) {
54
-		printf( '<span class="entry-format">%1$s<a href="%2$s">%3$s</a></span>',
55
-			sprintf( '<span class="screen-reader-text">%s </span>', _x( 'Format', 'Used before post format.', 'twentyfifteen' ) ),
56
-			esc_url( get_post_format_link( $format ) ),
57
-			get_post_format_string( $format )
53
+	if (current_theme_supports('post-formats', $format)) {
54
+		printf('<span class="entry-format">%1$s<a href="%2$s">%3$s</a></span>',
55
+			sprintf('<span class="screen-reader-text">%s </span>', _x('Format', 'Used before post format.', 'twentyfifteen')),
56
+			esc_url(get_post_format_link($format)),
57
+			get_post_format_string($format)
58 58
 		);
59 59
 	}
60 60
 
61
-	if ( in_array( get_post_type(), array( 'post', 'attachment' ) ) ) {
61
+	if (in_array(get_post_type(), array('post', 'attachment'))) {
62 62
 		$time_string = '<time class="entry-date published updated" datetime="%1$s">%2$s</time>';
63 63
 
64
-		if ( get_the_time( 'U' ) !== get_the_modified_time( 'U' ) ) {
64
+		if (get_the_time('U') !== get_the_modified_time('U')) {
65 65
 			$time_string = '<time class="entry-date published" datetime="%1$s">%2$s</time><time class="updated" datetime="%3$s">%4$s</time>';
66 66
 		}
67 67
 
68
-		$time_string = sprintf( $time_string,
69
-			esc_attr( get_the_date( 'c' ) ),
68
+		$time_string = sprintf($time_string,
69
+			esc_attr(get_the_date('c')),
70 70
 			get_the_date(),
71
-			esc_attr( get_the_modified_date( 'c' ) ),
71
+			esc_attr(get_the_modified_date('c')),
72 72
 			get_the_modified_date()
73 73
 		);
74 74
 
75
-		printf( '<span class="posted-on"><span class="screen-reader-text">%1$s </span><a href="%2$s" rel="bookmark">%3$s</a></span>',
76
-			_x( 'Posted on', 'Used before publish date.', 'twentyfifteen' ),
77
-			esc_url( get_permalink() ),
75
+		printf('<span class="posted-on"><span class="screen-reader-text">%1$s </span><a href="%2$s" rel="bookmark">%3$s</a></span>',
76
+			_x('Posted on', 'Used before publish date.', 'twentyfifteen'),
77
+			esc_url(get_permalink()),
78 78
 			$time_string
79 79
 		);
80 80
 	}
81 81
 
82
-	if ( 'post' == get_post_type() ) {
83
-		if ( is_singular() || is_multi_author() ) {
84
-			printf( '<span class="byline"><span class="author vcard"><span class="screen-reader-text">%1$s </span><a class="url fn n" href="%2$s">%3$s</a></span></span>',
85
-				_x( 'Author', 'Used before post author name.', 'twentyfifteen' ),
86
-				esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),
82
+	if ('post' == get_post_type()) {
83
+		if (is_singular() || is_multi_author()) {
84
+			printf('<span class="byline"><span class="author vcard"><span class="screen-reader-text">%1$s </span><a class="url fn n" href="%2$s">%3$s</a></span></span>',
85
+				_x('Author', 'Used before post author name.', 'twentyfifteen'),
86
+				esc_url(get_author_posts_url(get_the_author_meta('ID'))),
87 87
 				get_the_author()
88 88
 			);
89 89
 		}
90 90
 
91
-		$categories_list = get_the_category_list( _x( ', ', 'Used between list items, there is a space after the comma.', 'twentyfifteen' ) );
92
-		if ( $categories_list && twentyfifteen_categorized_blog() ) {
93
-			printf( '<span class="cat-links"><span class="screen-reader-text">%1$s </span>%2$s</span>',
94
-				_x( 'Categories', 'Used before category names.', 'twentyfifteen' ),
91
+		$categories_list = get_the_category_list(_x(', ', 'Used between list items, there is a space after the comma.', 'twentyfifteen'));
92
+		if ($categories_list && twentyfifteen_categorized_blog()) {
93
+			printf('<span class="cat-links"><span class="screen-reader-text">%1$s </span>%2$s</span>',
94
+				_x('Categories', 'Used before category names.', 'twentyfifteen'),
95 95
 				$categories_list
96 96
 			);
97 97
 		}
98 98
 
99
-		$tags_list = get_the_tag_list( '', _x( ', ', 'Used between list items, there is a space after the comma.', 'twentyfifteen' ) );
100
-		if ( $tags_list ) {
101
-			printf( '<span class="tags-links"><span class="screen-reader-text">%1$s </span>%2$s</span>',
102
-				_x( 'Tags', 'Used before tag names.', 'twentyfifteen' ),
99
+		$tags_list = get_the_tag_list('', _x(', ', 'Used between list items, there is a space after the comma.', 'twentyfifteen'));
100
+		if ($tags_list) {
101
+			printf('<span class="tags-links"><span class="screen-reader-text">%1$s </span>%2$s</span>',
102
+				_x('Tags', 'Used before tag names.', 'twentyfifteen'),
103 103
 				$tags_list
104 104
 			);
105 105
 		}
106 106
 	}
107 107
 
108
-	if ( is_attachment() && wp_attachment_is_image() ) {
108
+	if (is_attachment() && wp_attachment_is_image()) {
109 109
 		// Retrieve attachment metadata.
110 110
 		$metadata = wp_get_attachment_metadata();
111 111
 
112
-		printf( '<span class="full-size-link"><span class="screen-reader-text">%1$s </span><a href="%2$s">%3$s &times; %4$s</a></span>',
113
-			_x( 'Full size', 'Used before full size attachment link.', 'twentyfifteen' ),
114
-			esc_url( wp_get_attachment_url() ),
112
+		printf('<span class="full-size-link"><span class="screen-reader-text">%1$s </span><a href="%2$s">%3$s &times; %4$s</a></span>',
113
+			_x('Full size', 'Used before full size attachment link.', 'twentyfifteen'),
114
+			esc_url(wp_get_attachment_url()),
115 115
 			$metadata['width'],
116 116
 			$metadata['height']
117 117
 		);
118 118
 	}
119 119
 
120
-	if ( ! is_single() && ! post_password_required() && ( comments_open() || get_comments_number() ) ) {
120
+	if ( ! is_single() && ! post_password_required() && (comments_open() || get_comments_number())) {
121 121
 		echo '<span class="comments-link">';
122 122
 		/* translators: %s: post title */
123
-		comments_popup_link( sprintf( __( 'Leave a comment<span class="screen-reader-text"> on %s</span>', 'twentyfifteen' ), get_the_title() ) );
123
+		comments_popup_link(sprintf(__('Leave a comment<span class="screen-reader-text"> on %s</span>', 'twentyfifteen'), get_the_title()));
124 124
 		echo '</span>';
125 125
 	}
126 126
 }
@@ -134,23 +134,23 @@  discard block
 block discarded – undo
134 134
  * @return bool True of there is more than one category, false otherwise.
135 135
  */
136 136
 function twentyfifteen_categorized_blog() {
137
-	if ( false === ( $all_the_cool_cats = get_transient( 'twentyfifteen_categories' ) ) ) {
137
+	if (false === ($all_the_cool_cats = get_transient('twentyfifteen_categories'))) {
138 138
 		// Create an array of all the categories that are attached to posts.
139
-		$all_the_cool_cats = get_categories( array(
139
+		$all_the_cool_cats = get_categories(array(
140 140
 			'fields'     => 'ids',
141 141
 			'hide_empty' => 1,
142 142
 
143 143
 			// We only need to know if there is more than one category.
144 144
 			'number'     => 2,
145
-		) );
145
+		));
146 146
 
147 147
 		// Count the number of categories that are attached to the posts.
148
-		$all_the_cool_cats = count( $all_the_cool_cats );
148
+		$all_the_cool_cats = count($all_the_cool_cats);
149 149
 
150
-		set_transient( 'twentyfifteen_categories', $all_the_cool_cats );
150
+		set_transient('twentyfifteen_categories', $all_the_cool_cats);
151 151
 	}
152 152
 
153
-	if ( $all_the_cool_cats > 1 || is_preview() ) {
153
+	if ($all_the_cool_cats > 1 || is_preview()) {
154 154
 		// This blog has more than 1 category so twentyfifteen_categorized_blog should return true.
155 155
 		return true;
156 156
 	} else {
@@ -166,12 +166,12 @@  discard block
 block discarded – undo
166 166
  */
167 167
 function twentyfifteen_category_transient_flusher() {
168 168
 	// Like, beat it. Dig?
169
-	delete_transient( 'twentyfifteen_categories' );
169
+	delete_transient('twentyfifteen_categories');
170 170
 }
171
-add_action( 'edit_category', 'twentyfifteen_category_transient_flusher' );
172
-add_action( 'save_post',     'twentyfifteen_category_transient_flusher' );
171
+add_action('edit_category', 'twentyfifteen_category_transient_flusher');
172
+add_action('save_post', 'twentyfifteen_category_transient_flusher');
173 173
 
174
-if ( ! function_exists( 'twentyfifteen_post_thumbnail' ) ) :
174
+if ( ! function_exists('twentyfifteen_post_thumbnail')) :
175 175
 /**
176 176
  * Display an optional post thumbnail.
177 177
  *
@@ -181,11 +181,11 @@  discard block
 block discarded – undo
181 181
  * @since Twenty Fifteen 1.0
182 182
  */
183 183
 function twentyfifteen_post_thumbnail() {
184
-	if ( post_password_required() || is_attachment() || ! has_post_thumbnail() ) {
184
+	if (post_password_required() || is_attachment() || ! has_post_thumbnail()) {
185 185
 		return;
186 186
 	}
187 187
 
188
-	if ( is_singular() ) :
188
+	if (is_singular()) :
189 189
 	?>
190 190
 
191 191
 	<div class="post-thumbnail">
@@ -196,7 +196,7 @@  discard block
 block discarded – undo
196 196
 
197 197
 	<a class="post-thumbnail" href="<?php the_permalink(); ?>" aria-hidden="true">
198 198
 		<?php
199
-			the_post_thumbnail( 'post-thumbnail', array( 'alt' => get_the_title() ) );
199
+			the_post_thumbnail('post-thumbnail', array('alt' => get_the_title()));
200 200
 		?>
201 201
 	</a>
202 202
 
@@ -204,7 +204,7 @@  discard block
 block discarded – undo
204 204
 }
205 205
 endif;
206 206
 
207
-if ( ! function_exists( 'twentyfifteen_get_link_url' ) ) :
207
+if ( ! function_exists('twentyfifteen_get_link_url')) :
208 208
 /**
209 209
  * Return the post URL.
210 210
  *
@@ -217,13 +217,13 @@  discard block
 block discarded – undo
217 217
  * @return string The Link format URL.
218 218
  */
219 219
 function twentyfifteen_get_link_url() {
220
-	$has_url = get_url_in_content( get_the_content() );
220
+	$has_url = get_url_in_content(get_the_content());
221 221
 
222
-	return $has_url ? $has_url : apply_filters( 'the_permalink', get_permalink() );
222
+	return $has_url ? $has_url : apply_filters('the_permalink', get_permalink());
223 223
 }
224 224
 endif;
225 225
 
226
-if ( ! function_exists( 'twentyfifteen_excerpt_more' ) && ! is_admin() ) :
226
+if ( ! function_exists('twentyfifteen_excerpt_more') && ! is_admin()) :
227 227
 /**
228 228
  * Replaces "[...]" (appended to automatically generated excerpts) with ... and a 'Continue reading' link.
229 229
  *
@@ -231,18 +231,18 @@  discard block
 block discarded – undo
231 231
  *
232 232
  * @return string 'Continue reading' link prepended with an ellipsis.
233 233
  */
234
-function twentyfifteen_excerpt_more( $more ) {
235
-	$link = sprintf( '<a href="%1$s" class="more-link">%2$s</a>',
236
-		esc_url( get_permalink( get_the_ID() ) ),
234
+function twentyfifteen_excerpt_more($more) {
235
+	$link = sprintf('<a href="%1$s" class="more-link">%2$s</a>',
236
+		esc_url(get_permalink(get_the_ID())),
237 237
 		/* translators: %s: Name of current post */
238
-		sprintf( __( 'Continue reading %s', 'twentyfifteen' ), '<span class="screen-reader-text">' . get_the_title( get_the_ID() ) . '</span>' )
238
+		sprintf(__('Continue reading %s', 'twentyfifteen'), '<span class="screen-reader-text">'.get_the_title(get_the_ID()).'</span>')
239 239
 		);
240
-	return ' &hellip; ' . $link;
240
+	return ' &hellip; '.$link;
241 241
 }
242
-add_filter( 'excerpt_more', 'twentyfifteen_excerpt_more' );
242
+add_filter('excerpt_more', 'twentyfifteen_excerpt_more');
243 243
 endif;
244 244
 
245
-if ( ! function_exists( 'twentyfifteen_the_custom_logo' ) ) :
245
+if ( ! function_exists('twentyfifteen_the_custom_logo')) :
246 246
 /**
247 247
  * Displays the optional custom logo.
248 248
  *
@@ -251,7 +251,7 @@  discard block
 block discarded – undo
251 251
  * @since Twenty Fifteen 1.5
252 252
  */
253 253
 function twentyfifteen_the_custom_logo() {
254
-	if ( function_exists( 'the_custom_logo' ) ) {
254
+	if (function_exists('the_custom_logo')) {
255 255
 		the_custom_logo();
256 256
 	}
257 257
 }
Please login to merge, or discard this patch.
src/wp-content/themes/twentyfifteen/archive.php 2 patches
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -21,39 +21,39 @@
 block discarded – undo
21 21
 	<section id="primary" class="content-area">
22 22
 		<main id="main" class="site-main" role="main">
23 23
 
24
-		<?php if ( have_posts() ) : ?>
24
+		<?php if (have_posts()) : ?>
25 25
 
26 26
 			<header class="page-header">
27 27
 				<?php
28
-					the_archive_title( '<h1 class="page-title">', '</h1>' );
29
-					the_archive_description( '<div class="taxonomy-description">', '</div>' );
28
+					the_archive_title('<h1 class="page-title">', '</h1>');
29
+					the_archive_description('<div class="taxonomy-description">', '</div>');
30 30
 				?>
31 31
 			</header><!-- .page-header -->
32 32
 
33 33
 			<?php
34 34
 			// Start the Loop.
35
-			while ( have_posts() ) : the_post();
35
+			while (have_posts()) : the_post();
36 36
 
37 37
 				/*
38 38
 				 * Include the Post-Format-specific template for the content.
39 39
 				 * If you want to override this in a child theme, then include a file
40 40
 				 * called content-___.php (where ___ is the Post Format name) and that will be used instead.
41 41
 				 */
42
-				get_template_part( 'content', get_post_format() );
42
+				get_template_part('content', get_post_format());
43 43
 
44 44
 			// End the loop.
45 45
 			endwhile;
46 46
 
47 47
 			// Previous/next page navigation.
48
-			the_posts_pagination( array(
49
-				'prev_text'          => __( 'Previous page', 'twentyfifteen' ),
50
-				'next_text'          => __( 'Next page', 'twentyfifteen' ),
51
-				'before_page_number' => '<span class="meta-nav screen-reader-text">' . __( 'Page', 'twentyfifteen' ) . ' </span>',
52
-			) );
48
+			the_posts_pagination(array(
49
+				'prev_text'          => __('Previous page', 'twentyfifteen'),
50
+				'next_text'          => __('Next page', 'twentyfifteen'),
51
+				'before_page_number' => '<span class="meta-nav screen-reader-text">'.__('Page', 'twentyfifteen').' </span>',
52
+			));
53 53
 
54 54
 		// If no content, include the "No posts found" template.
55 55
 		else :
56
-			get_template_part( 'content', 'none' );
56
+			get_template_part('content', 'none');
57 57
 
58 58
 		endif;
59 59
 		?>
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/single.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -14,29 +14,29 @@
 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
 			 * Include the post format-specific template for the content. If you want to
21 21
 			 * use this in a child theme, then include a file called called content-___.php
22 22
 			 * (where ___ is the post format) and that will be used instead.
23 23
 			 */
24
-			get_template_part( 'content', get_post_format() );
24
+			get_template_part('content', get_post_format());
25 25
 
26 26
 			// If comments are open or we have at least one comment, load up the comment template.
27
-			if ( comments_open() || get_comments_number() ) :
27
+			if (comments_open() || get_comments_number()) :
28 28
 				comments_template();
29 29
 			endif;
30 30
 
31 31
 			// Previous/next post navigation.
32
-			the_post_navigation( array(
33
-				'next_text' => '<span class="meta-nav" aria-hidden="true">' . __( 'Next', 'twentyfifteen' ) . '</span> ' .
34
-					'<span class="screen-reader-text">' . __( 'Next post:', 'twentyfifteen' ) . '</span> ' .
32
+			the_post_navigation(array(
33
+				'next_text' => '<span class="meta-nav" aria-hidden="true">'.__('Next', 'twentyfifteen').'</span> '.
34
+					'<span class="screen-reader-text">'.__('Next post:', 'twentyfifteen').'</span> '.
35 35
 					'<span class="post-title">%title</span>',
36
-				'prev_text' => '<span class="meta-nav" aria-hidden="true">' . __( 'Previous', 'twentyfifteen' ) . '</span> ' .
37
-					'<span class="screen-reader-text">' . __( 'Previous post:', 'twentyfifteen' ) . '</span> ' .
36
+				'prev_text' => '<span class="meta-nav" aria-hidden="true">'.__('Previous', 'twentyfifteen').'</span> '.
37
+					'<span class="screen-reader-text">'.__('Previous post:', 'twentyfifteen').'</span> '.
38 38
 					'<span class="post-title">%title</span>',
39
-			) );
39
+			));
40 40
 
41 41
 		// End the loop.
42 42
 		endwhile;
Please login to merge, or discard this patch.