Completed
Push — master ( d99bf9...491baf )
by Stephen
13:47
created
src/wp-content/themes/twentyseventeen/template-parts/post/content-none.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -14,17 +14,17 @@
 block discarded – undo
14 14
 
15 15
 <section class="no-results not-found">
16 16
 	<header class="page-header">
17
-		<h1 class="page-title"><?php _e( 'Nothing Found', 'twentyseventeen' ); ?></h1>
17
+		<h1 class="page-title"><?php _e('Nothing Found', 'twentyseventeen'); ?></h1>
18 18
 	</header>
19 19
 	<div class="page-content">
20 20
 		<?php
21
-		if ( is_home() && current_user_can( 'publish_posts' ) ) : ?>
21
+		if (is_home() && current_user_can('publish_posts')) : ?>
22 22
 
23
-			<p><?php printf( __( 'Ready to publish your first post? <a href="%1$s">Get started here</a>.', 'twentyseventeen' ), esc_url( admin_url( 'post-new.php' ) ) ); ?></p>
23
+			<p><?php printf(__('Ready to publish your first post? <a href="%1$s">Get started here</a>.', 'twentyseventeen'), esc_url(admin_url('post-new.php'))); ?></p>
24 24
 
25 25
 		<?php else : ?>
26 26
 
27
-			<p><?php _e( 'It seems we can&rsquo;t find what you&rsquo;re looking for. Perhaps searching can help.', 'twentyseventeen' ); ?></p>
27
+			<p><?php _e('It seems we can&rsquo;t find what you&rsquo;re looking for. Perhaps searching can help.', 'twentyseventeen'); ?></p>
28 28
 			<?php
29 29
 				get_search_form();
30 30
 
Please login to merge, or discard this patch.
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -22,9 +22,12 @@
 block discarded – undo
22 22
 
23 23
 			<p><?php printf( __( 'Ready to publish your first post? <a href="%1$s">Get started here</a>.', 'twentyseventeen' ), esc_url( admin_url( 'post-new.php' ) ) ); ?></p>
24 24
 
25
-		<?php else : ?>
25
+		<?php else {
26
+	: ?>
26 27
 
27
-			<p><?php _e( 'It seems we can&rsquo;t find what you&rsquo;re looking for. Perhaps searching can help.', 'twentyseventeen' ); ?></p>
28
+			<p><?php _e( 'It seems we can&rsquo;t find what you&rsquo;re looking for. Perhaps searching can help.', 'twentyseventeen' );
29
+}
30
+?></p>
28 31
 			<?php
29 32
 				get_search_form();
30 33
 
Please login to merge, or discard this patch.
wp-content/themes/twentyseventeen/template-parts/header/header-image.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,6 +15,6 @@
 block discarded – undo
15 15
 			<?php the_custom_header_markup(); ?>
16 16
 		</div>
17 17
 
18
-	<?php get_template_part( 'template-parts/header/site', 'branding' ); ?>
18
+	<?php get_template_part('template-parts/header/site', 'branding'); ?>
19 19
 
20 20
 </div><!-- .custom-header -->
Please login to merge, or discard this patch.
wp-content/themes/twentyseventeen/template-parts/header/site-branding.php 2 patches
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -15,23 +15,23 @@
 block discarded – undo
15 15
 		<?php the_custom_logo(); ?>
16 16
 
17 17
 		<div class="site-branding-text">
18
-			<?php if ( is_front_page() ) : ?>
19
-				<h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1>
18
+			<?php if (is_front_page()) : ?>
19
+				<h1 class="site-title"><a href="<?php echo esc_url(home_url('/')); ?>" rel="home"><?php bloginfo('name'); ?></a></h1>
20 20
 			<?php else : ?>
21
-				<p class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></p>
21
+				<p class="site-title"><a href="<?php echo esc_url(home_url('/')); ?>" rel="home"><?php bloginfo('name'); ?></a></p>
22 22
 			<?php endif; ?>
23 23
 
24 24
 			<?php
25
-			$description = get_bloginfo( 'description', 'display' );
25
+			$description = get_bloginfo('description', 'display');
26 26
 
27
-			if ( $description || is_customize_preview() ) :
27
+			if ($description || is_customize_preview()) :
28 28
 			?>
29 29
 				<p class="site-description"><?php echo $description; ?></p>
30 30
 			<?php endif; ?>
31 31
 		</div><!-- .site-branding-text -->
32 32
 
33
-		<?php if ( ( twentyseventeen_is_frontpage() || ( is_home() && is_front_page() ) ) && ! has_nav_menu( 'top' ) ) : ?>
34
-		<a href="#content" class="menu-scroll-down"><?php echo twentyseventeen_get_svg( array( 'icon' => 'arrow-right' ) ); ?><span class="screen-reader-text"><?php _e( 'Scroll down to content', 'twentyseventeen' ); ?></span></a>
33
+		<?php if ((twentyseventeen_is_frontpage() || (is_home() && is_front_page())) && ! has_nav_menu('top')) : ?>
34
+		<a href="#content" class="menu-scroll-down"><?php echo twentyseventeen_get_svg(array('icon' => 'arrow-right')); ?><span class="screen-reader-text"><?php _e('Scroll down to content', 'twentyseventeen'); ?></span></a>
35 35
 	<?php endif; ?>
36 36
 
37 37
 	</div><!-- .wrap -->
Please login to merge, or discard this patch.
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -17,8 +17,11 @@
 block discarded – undo
17 17
 		<div class="site-branding-text">
18 18
 			<?php if ( is_front_page() ) : ?>
19 19
 				<h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1>
20
-			<?php else : ?>
21
-				<p class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></p>
20
+			<?php else {
21
+	: ?>
22
+				<p class="site-title"><a href="<?php echo esc_url( home_url( '/' ) );
23
+}
24
+?>" rel="home"><?php bloginfo( 'name' ); ?></a></p>
22 25
 			<?php endif; ?>
23 26
 
24 27
 			<?php
Please login to merge, or discard this patch.
themes/twentyseventeen/template-parts/page/content-front-page-panels.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -12,17 +12,17 @@  discard block
 block discarded – undo
12 12
 
13 13
 ?>
14 14
 
15
-<article id="panel<?php echo $twentyseventeencounter; ?>" <?php post_class( 'twentyseventeen-panel ' ); ?> >
15
+<article id="panel<?php echo $twentyseventeencounter; ?>" <?php post_class('twentyseventeen-panel '); ?> >
16 16
 
17
-	<?php if ( has_post_thumbnail() ) :
18
-		$thumbnail = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'twentyseventeen-featured-image' );
17
+	<?php if (has_post_thumbnail()) :
18
+		$thumbnail = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), 'twentyseventeen-featured-image');
19 19
 
20 20
 		// Calculate aspect ratio: h / w * 100%.
21 21
 		$ratio = $thumbnail[2] / $thumbnail[1] * 100;
22 22
 		?>
23 23
 
24
-		<div class="panel-image" style="background-image: url(<?php echo esc_url( $thumbnail[0] ); ?>);">
25
-			<div class="panel-image-prop" style="padding-top: <?php echo esc_attr( $ratio ); ?>%"></div>
24
+		<div class="panel-image" style="background-image: url(<?php echo esc_url($thumbnail[0]); ?>);">
25
+			<div class="panel-image-prop" style="padding-top: <?php echo esc_attr($ratio); ?>%"></div>
26 26
 		</div><!-- .panel-image -->
27 27
 
28 28
 	<?php endif; ?>
@@ -30,42 +30,42 @@  discard block
 block discarded – undo
30 30
 	<div class="panel-content">
31 31
 		<div class="wrap">
32 32
 			<header class="entry-header">
33
-				<?php the_title( '<h2 class="entry-title">', '</h2>' ); ?>
33
+				<?php the_title('<h2 class="entry-title">', '</h2>'); ?>
34 34
 
35
-				<?php twentyseventeen_edit_link( get_the_ID() ); ?>
35
+				<?php twentyseventeen_edit_link(get_the_ID()); ?>
36 36
 
37 37
 			</header><!-- .entry-header -->
38 38
 
39 39
 			<div class="entry-content">
40 40
 				<?php
41 41
 					/* translators: %s: Name of current post */
42
-					the_content( sprintf(
43
-						__( 'Continue reading<span class="screen-reader-text"> "%s"</span>', 'twentyseventeen' ),
42
+					the_content(sprintf(
43
+						__('Continue reading<span class="screen-reader-text"> "%s"</span>', 'twentyseventeen'),
44 44
 						get_the_title()
45
-					) );
45
+					));
46 46
 				?>
47 47
 			</div><!-- .entry-content -->
48 48
 
49 49
 			<?php
50 50
 			// Show recent blog posts if is blog posts page (Note that get_option returns a string, so we're casting the result as an int).
51
-			if ( get_the_ID() === (int) get_option( 'page_for_posts' )  ) : ?>
51
+			if (get_the_ID() === (int) get_option('page_for_posts')) : ?>
52 52
 
53 53
 				<?php // Show four most recent posts.
54
-				$recent_posts = new WP_Query( array(
54
+				$recent_posts = new WP_Query(array(
55 55
 					'posts_per_page'      => 3,
56 56
 					'post_status'         => 'publish',
57 57
 					'ignore_sticky_posts' => true,
58 58
 					'no_found_rows'       => true,
59
-				) );
59
+				));
60 60
 				?>
61 61
 
62
-		 		<?php if ( $recent_posts->have_posts() ) : ?>
62
+		 		<?php if ($recent_posts->have_posts()) : ?>
63 63
 
64 64
 					<div class="recent-posts">
65 65
 
66 66
 						<?php
67
-						while ( $recent_posts->have_posts() ) : $recent_posts->the_post();
68
-							get_template_part( 'template-parts/post/content', 'excerpt' );
67
+						while ($recent_posts->have_posts()) : $recent_posts->the_post();
68
+							get_template_part('template-parts/post/content', 'excerpt');
69 69
 						endwhile;
70 70
 						wp_reset_postdata();
71 71
 						?>
Please login to merge, or discard this patch.
src/wp-content/themes/twentyseventeen/template-parts/page/content-page.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -14,17 +14,17 @@
 block discarded – undo
14 14
 
15 15
 <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
16 16
 	<header class="entry-header">
17
-		<?php the_title( '<h1 class="entry-title">', '</h1>' ); ?>
18
-		<?php twentyseventeen_edit_link( get_the_ID() ); ?>
17
+		<?php the_title('<h1 class="entry-title">', '</h1>'); ?>
18
+		<?php twentyseventeen_edit_link(get_the_ID()); ?>
19 19
 	</header><!-- .entry-header -->
20 20
 	<div class="entry-content">
21 21
 		<?php
22 22
 			the_content();
23 23
 
24
-			wp_link_pages( array(
25
-				'before' => '<div class="page-links">' . __( 'Pages:', 'twentyseventeen' ),
24
+			wp_link_pages(array(
25
+				'before' => '<div class="page-links">'.__('Pages:', 'twentyseventeen'),
26 26
 				'after'  => '</div>',
27
-			) );
27
+			));
28 28
 		?>
29 29
 	</div><!-- .entry-content -->
30 30
 </article><!-- #post-## -->
Please login to merge, or discard this patch.
wp-content/themes/twentyseventeen/template-parts/footer/footer-widgets.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -11,20 +11,20 @@
 block discarded – undo
11 11
 ?>
12 12
 
13 13
 <?php
14
-if ( is_active_sidebar( 'sidebar-2' ) ||
15
-	 is_active_sidebar( 'sidebar-3' ) ) :
14
+if (is_active_sidebar('sidebar-2') ||
15
+	 is_active_sidebar('sidebar-3')) :
16 16
 ?>
17 17
 
18 18
 	<aside class="widget-area" role="complementary">
19 19
 		<?php
20
-		if ( is_active_sidebar( 'sidebar-2' ) ) { ?>
20
+		if (is_active_sidebar('sidebar-2')) { ?>
21 21
 			<div class="widget-column footer-widget-1">
22
-				<?php dynamic_sidebar( 'sidebar-2' ); ?>
22
+				<?php dynamic_sidebar('sidebar-2'); ?>
23 23
 			</div>
24 24
 		<?php }
25
-		if ( is_active_sidebar( 'sidebar-3' ) ) { ?>
25
+		if (is_active_sidebar('sidebar-3')) { ?>
26 26
 			<div class="widget-column footer-widget-2">
27
-				<?php dynamic_sidebar( 'sidebar-3' ); ?>
27
+				<?php dynamic_sidebar('sidebar-3'); ?>
28 28
 			</div>
29 29
 		<?php } ?>
30 30
 	</aside><!-- .widget-area -->
Please login to merge, or discard this patch.
src/wp-content/themes/twentyseventeen/template-parts/footer/site-info.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -10,5 +10,5 @@
 block discarded – undo
10 10
 
11 11
 ?>
12 12
 <div class="site-info">
13
-	<a href="<?php echo esc_url( __( 'https://wordpress.org/', 'twentyseventeen' ) ); ?>"><?php printf( __( 'Proudly powered by %s', 'twentyseventeen' ), 'WordPress' ); ?></a>
13
+	<a href="<?php echo esc_url(__('https://wordpress.org/', 'twentyseventeen')); ?>"><?php printf(__('Proudly powered by %s', 'twentyseventeen'), 'WordPress'); ?></a>
14 14
 </div><!-- .site-info -->
Please login to merge, or discard this patch.
src/wp-content/themes/twentyseventeen/page.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -22,12 +22,12 @@
 block discarded – undo
22 22
 		<main id="main" class="site-main" role="main">
23 23
 
24 24
 			<?php
25
-			while ( have_posts() ) : the_post();
25
+			while (have_posts()) : the_post();
26 26
 
27
-				get_template_part( 'template-parts/page/content', 'page' );
27
+				get_template_part('template-parts/page/content', 'page');
28 28
 
29 29
 				// If comments are open or we have at least one comment, load up the comment template.
30
-				if ( comments_open() || get_comments_number() ) :
30
+				if (comments_open() || get_comments_number()) :
31 31
 					comments_template();
32 32
 				endif;
33 33
 
Please login to merge, or discard this patch.
src/wp-content/themes/twentyseventeen/inc/custom-header.php 2 patches
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -33,26 +33,26 @@  discard block
 block discarded – undo
33 33
 	 *     @type string $flex-height     		Flex support for height of header.
34 34
 	 * }
35 35
 	 */
36
-	add_theme_support( 'custom-header', apply_filters( 'twentyseventeen_custom_header_args', array(
37
-		'default-image'      => get_parent_theme_file_uri( '/assets/images/header.jpg' ),
36
+	add_theme_support('custom-header', apply_filters('twentyseventeen_custom_header_args', array(
37
+		'default-image'      => get_parent_theme_file_uri('/assets/images/header.jpg'),
38 38
 		'width'              => 2000,
39 39
 		'height'             => 1200,
40 40
 		'flex-height'        => true,
41 41
 		'video'              => true,
42 42
 		'wp-head-callback'   => 'twentyseventeen_header_style',
43
-	) ) );
43
+	)));
44 44
 
45
-	register_default_headers( array(
45
+	register_default_headers(array(
46 46
 		'default-image' => array(
47 47
 			'url'           => '%s/assets/images/header.jpg',
48 48
 			'thumbnail_url' => '%s/assets/images/header.jpg',
49
-			'description'   => __( 'Default Header Image', 'twentyseventeen' ),
49
+			'description'   => __('Default Header Image', 'twentyseventeen'),
50 50
 		),
51
-	) );
51
+	));
52 52
 }
53
-add_action( 'after_setup_theme', 'twentyseventeen_custom_header_setup' );
53
+add_action('after_setup_theme', 'twentyseventeen_custom_header_setup');
54 54
 
55
-if ( ! function_exists( 'twentyseventeen_header_style' ) ) :
55
+if ( ! function_exists('twentyseventeen_header_style')) :
56 56
 /**
57 57
  * Styles the header image and text displayed on the blog.
58 58
  *
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
 
64 64
 	// If no custom options for text are set, let's bail.
65 65
 	// get_header_textcolor() options: add_theme_support( 'custom-header' ) is default, hide text (returns 'blank') or any hex value.
66
-	if ( get_theme_support( 'custom-header', 'default-text-color' ) === $header_text_color ) {
66
+	if (get_theme_support('custom-header', 'default-text-color') === $header_text_color) {
67 67
 		return;
68 68
 	}
69 69
 
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
 	<style id="twentyseventeen-custom-header-styles" type="text/css">
73 73
 	<?php
74 74
 		// Has the text been hidden?
75
-		if ( 'blank' === $header_text_color ) :
75
+		if ('blank' === $header_text_color) :
76 76
 	?>
77 77
 		.site-title,
78 78
 		.site-description {
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
 		body.has-header-video.colors-dark .site-description,
102 102
 		body.has-header-image.colors-custom .site-description,
103 103
 		body.has-header-video.colors-custom .site-description {
104
-			color: #<?php echo esc_attr( $header_text_color ); ?>;
104
+			color: #<?php echo esc_attr($header_text_color); ?>;
105 105
 		}
106 106
 	<?php endif; ?>
107 107
 	</style>
@@ -114,9 +114,9 @@  discard block
 block discarded – undo
114 114
  *
115 115
  * @param array $settings Video settings.
116 116
  */
117
-function twentyseventeen_video_controls( $settings ) {
118
-	$settings['l10n']['play'] = '<span class="screen-reader-text">' . __( 'Play background video', 'twentyseventeen' ) . '</span>' . twentyseventeen_get_svg( array( 'icon' => 'play' ) );
119
-	$settings['l10n']['pause'] = '<span class="screen-reader-text">' . __( 'Pause background video', 'twentyseventeen' ) . '</span>' . twentyseventeen_get_svg( array( 'icon' => 'pause' ) );
117
+function twentyseventeen_video_controls($settings) {
118
+	$settings['l10n']['play'] = '<span class="screen-reader-text">'.__('Play background video', 'twentyseventeen').'</span>'.twentyseventeen_get_svg(array('icon' => 'play'));
119
+	$settings['l10n']['pause'] = '<span class="screen-reader-text">'.__('Pause background video', 'twentyseventeen').'</span>'.twentyseventeen_get_svg(array('icon' => 'pause'));
120 120
 	return $settings;
121 121
 }
122
-add_filter( 'header_video_settings', 'twentyseventeen_video_controls' );
122
+add_filter('header_video_settings', 'twentyseventeen_video_controls');
Please login to merge, or discard this patch.
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -81,7 +81,8 @@  discard block
 block discarded – undo
81 81
 		}
82 82
 	<?php
83 83
 		// If the user has set a custom color for the text use that.
84
-		else :
84
+		else {
85
+			:
85 86
 	?>
86 87
 		.site-title a,
87 88
 		.colors-dark .site-title a,
@@ -101,7 +102,9 @@  discard block
 block discarded – undo
101 102
 		body.has-header-video.colors-dark .site-description,
102 103
 		body.has-header-image.colors-custom .site-description,
103 104
 		body.has-header-video.colors-custom .site-description {
104
-			color: #<?php echo esc_attr( $header_text_color ); ?>;
105
+			color: #<?php echo esc_attr( $header_text_color );
106
+		}
107
+		?>;
105 108
 		}
106 109
 	<?php endif; ?>
107 110
 	</style>
Please login to merge, or discard this patch.