Completed
Push — master ( c0c536...fdb3a7 )
by Stephen
20:33
created
src/wp-content/themes/twentytwelve/image.php 3 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -75,7 +75,7 @@
 block discarded – undo
75 75
 ?>
76 76
 								<a href="<?php echo esc_url( $next_attachment_url ); ?>" title="<?php the_title_attribute(); ?>" rel="attachment"><?php
77 77
 								/**
78
- 								 * Filter the image attachment size to use.
78
+								 * Filter the image attachment size to use.
79 79
 								 *
80 80
 								 * @since Twenty Twelve 1.0
81 81
 								 *
Please login to merge, or discard this patch.
Spacing   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -14,32 +14,32 @@  discard block
 block discarded – undo
14 14
 	<div id="primary" class="site-content">
15 15
 		<div id="content" role="main">
16 16
 
17
-		<?php while ( have_posts() ) : the_post(); ?>
17
+		<?php while (have_posts()) : the_post(); ?>
18 18
 
19
-				<article id="post-<?php the_ID(); ?>" <?php post_class( 'image-attachment' ); ?>>
19
+				<article id="post-<?php the_ID(); ?>" <?php post_class('image-attachment'); ?>>
20 20
 					<header class="entry-header">
21 21
 						<h1 class="entry-title"><?php the_title(); ?></h1>
22 22
 
23 23
 						<footer class="entry-meta">
24 24
 							<?php
25 25
 								$metadata = wp_get_attachment_metadata();
26
-								printf( __( '<span class="meta-prep meta-prep-entry-date">Published </span> <span class="entry-date"><time class="entry-date" datetime="%1$s">%2$s</time></span> at <a href="%3$s" title="Link to full-size image">%4$s &times; %5$s</a> in <a href="%6$s" title="Return to %7$s" rel="gallery">%8$s</a>.', 'twentytwelve' ),
27
-									esc_attr( get_the_date( 'c' ) ),
28
-									esc_html( get_the_date() ),
29
-									esc_url( wp_get_attachment_url() ),
26
+								printf(__('<span class="meta-prep meta-prep-entry-date">Published </span> <span class="entry-date"><time class="entry-date" datetime="%1$s">%2$s</time></span> at <a href="%3$s" title="Link to full-size image">%4$s &times; %5$s</a> in <a href="%6$s" title="Return to %7$s" rel="gallery">%8$s</a>.', 'twentytwelve'),
27
+									esc_attr(get_the_date('c')),
28
+									esc_html(get_the_date()),
29
+									esc_url(wp_get_attachment_url()),
30 30
 									$metadata['width'],
31 31
 									$metadata['height'],
32
-									esc_url( get_permalink( $post->post_parent ) ),
33
-									esc_attr( strip_tags( get_the_title( $post->post_parent ) ) ),
34
-									get_the_title( $post->post_parent )
32
+									esc_url(get_permalink($post->post_parent)),
33
+									esc_attr(strip_tags(get_the_title($post->post_parent))),
34
+									get_the_title($post->post_parent)
35 35
 								);
36 36
 							?>
37
-							<?php edit_post_link( __( 'Edit', 'twentytwelve' ), '<span class="edit-link">', '</span>' ); ?>
37
+							<?php edit_post_link(__('Edit', 'twentytwelve'), '<span class="edit-link">', '</span>'); ?>
38 38
 						</footer><!-- .entry-meta -->
39 39
 
40 40
 						<nav id="image-navigation" class="navigation" role="navigation">
41
-							<span class="previous-image"><?php previous_image_link( false, __( '&larr; Previous', 'twentytwelve' ) ); ?></span>
42
-							<span class="next-image"><?php next_image_link( false, __( 'Next &rarr;', 'twentytwelve' ) ); ?></span>
41
+							<span class="previous-image"><?php previous_image_link(false, __('&larr; Previous', 'twentytwelve')); ?></span>
42
+							<span class="next-image"><?php next_image_link(false, __('Next &rarr;', 'twentytwelve')); ?></span>
43 43
 						</nav><!-- #image-navigation -->
44 44
 					</header><!-- .entry-header -->
45 45
 
@@ -52,28 +52,28 @@  discard block
 block discarded – undo
52 52
  * Grab the IDs of all the image attachments in a gallery so we can get the URL of the next adjacent image in a gallery,
53 53
  * or the first image (if we're looking at the last image in a gallery), or, in a gallery of one, just the link to that image file
54 54
  */
55
-$attachments = array_values( get_children( array( 'post_parent' => $post->post_parent, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => 'ASC', 'orderby' => 'menu_order ID' ) ) );
56
-foreach ( $attachments as $k => $attachment ) :
57
-	if ( $attachment->ID == $post->ID )
55
+$attachments = array_values(get_children(array('post_parent' => $post->post_parent, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => 'ASC', 'orderby' => 'menu_order ID')));
56
+foreach ($attachments as $k => $attachment) :
57
+	if ($attachment->ID == $post->ID)
58 58
 		break;
59 59
 endforeach;
60 60
 
61 61
 // If there is more than 1 attachment in a gallery
62
-if ( count( $attachments ) > 1 ) :
62
+if (count($attachments) > 1) :
63 63
 	$k++;
64
-	if ( isset( $attachments[ $k ] ) ) :
64
+	if (isset($attachments[$k])) :
65 65
 		// get the URL of the next image attachment
66
-		$next_attachment_url = get_attachment_link( $attachments[ $k ]->ID );
66
+		$next_attachment_url = get_attachment_link($attachments[$k]->ID);
67 67
 	else :
68 68
 		// or get the URL of the first image attachment
69
-		$next_attachment_url = get_attachment_link( $attachments[0]->ID );
69
+		$next_attachment_url = get_attachment_link($attachments[0]->ID);
70 70
 	endif;
71 71
 else :
72 72
 	// or, if there's only 1 image, get the URL of the image
73 73
 	$next_attachment_url = wp_get_attachment_url();
74 74
 endif;
75 75
 ?>
76
-								<a href="<?php echo esc_url( $next_attachment_url ); ?>" title="<?php the_title_attribute(); ?>" rel="attachment"><?php
76
+								<a href="<?php echo esc_url($next_attachment_url); ?>" title="<?php the_title_attribute(); ?>" rel="attachment"><?php
77 77
 								/**
78 78
  								 * Filter the image attachment size to use.
79 79
 								 *
@@ -84,11 +84,11 @@  discard block
 block discarded – undo
84 84
 								 *     @type int The attachment width in pixels.
85 85
 								 * }
86 86
 								 */
87
-								$attachment_size = apply_filters( 'twentytwelve_attachment_size', array( 960, 960 ) );
88
-								echo wp_get_attachment_image( $post->ID, $attachment_size );
87
+								$attachment_size = apply_filters('twentytwelve_attachment_size', array(960, 960));
88
+								echo wp_get_attachment_image($post->ID, $attachment_size);
89 89
 								?></a>
90 90
 
91
-								<?php if ( ! empty( $post->post_excerpt ) ) : ?>
91
+								<?php if ( ! empty($post->post_excerpt)) : ?>
92 92
 								<div class="entry-caption">
93 93
 									<?php the_excerpt(); ?>
94 94
 								</div>
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
 
100 100
 						<div class="entry-description">
101 101
 							<?php the_content(); ?>
102
-							<?php wp_link_pages( array( 'before' => '<div class="page-links">' . __( 'Pages:', 'twentytwelve' ), 'after' => '</div>' ) ); ?>
102
+							<?php wp_link_pages(array('before' => '<div class="page-links">'.__('Pages:', 'twentytwelve'), 'after' => '</div>')); ?>
103 103
 						</div><!-- .entry-description -->
104 104
 
105 105
 					</div><!-- .entry-content -->
Please login to merge, or discard this patch.
Braces   +10 added lines, -5 removed lines patch added patch discarded remove patch
@@ -54,9 +54,10 @@  discard block
 block discarded – undo
54 54
  */
55 55
 $attachments = array_values( get_children( array( 'post_parent' => $post->post_parent, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => 'ASC', 'orderby' => 'menu_order ID' ) ) );
56 56
 foreach ( $attachments as $k => $attachment ) :
57
-	if ( $attachment->ID == $post->ID )
58
-		break;
59
-endforeach;
57
+	if ( $attachment->ID == $post->ID ) {
58
+			break;
59
+	}
60
+	endforeach;
60 61
 
61 62
 // If there is more than 1 attachment in a gallery
62 63
 if ( count( $attachments ) > 1 ) :
@@ -64,13 +65,17 @@  discard block
 block discarded – undo
64 65
 	if ( isset( $attachments[ $k ] ) ) :
65 66
 		// get the URL of the next image attachment
66 67
 		$next_attachment_url = get_attachment_link( $attachments[ $k ]->ID );
67
-	else :
68
+	else {
69
+		:
68 70
 		// or get the URL of the first image attachment
69 71
 		$next_attachment_url = get_attachment_link( $attachments[0]->ID );
72
+	}
70 73
 	endif;
71
-else :
74
+else {
75
+	:
72 76
 	// or, if there's only 1 image, get the URL of the image
73 77
 	$next_attachment_url = wp_get_attachment_url();
78
+}
74 79
 endif;
75 80
 ?>
76 81
 								<a href="<?php echo esc_url( $next_attachment_url ); ?>" title="<?php the_title_attribute(); ?>" rel="attachment"><?php
Please login to merge, or discard this patch.
src/wp-content/themes/twentytwelve/sidebar-front.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -15,21 +15,21 @@
 block discarded – undo
15 15
  *
16 16
  * If none of the sidebars have widgets, then let's bail early.
17 17
  */
18
-if ( ! is_active_sidebar( 'sidebar-2' ) && ! is_active_sidebar( 'sidebar-3' ) )
18
+if ( ! is_active_sidebar('sidebar-2') && ! is_active_sidebar('sidebar-3'))
19 19
 	return;
20 20
 
21 21
 // If we get this far, we have widgets. Let do this.
22 22
 ?>
23 23
 <div id="secondary" class="widget-area" role="complementary">
24
-	<?php if ( is_active_sidebar( 'sidebar-2' ) ) : ?>
24
+	<?php if (is_active_sidebar('sidebar-2')) : ?>
25 25
 	<div class="first front-widgets">
26
-		<?php dynamic_sidebar( 'sidebar-2' ); ?>
26
+		<?php dynamic_sidebar('sidebar-2'); ?>
27 27
 	</div><!-- .first -->
28 28
 	<?php endif; ?>
29 29
 
30
-	<?php if ( is_active_sidebar( 'sidebar-3' ) ) : ?>
30
+	<?php if (is_active_sidebar('sidebar-3')) : ?>
31 31
 	<div class="second front-widgets">
32
-		<?php dynamic_sidebar( 'sidebar-3' ); ?>
32
+		<?php dynamic_sidebar('sidebar-3'); ?>
33 33
 	</div><!-- .second -->
34 34
 	<?php endif; ?>
35 35
 </div><!-- #secondary -->
36 36
\ No newline at end of file
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,8 +15,9 @@
 block discarded – undo
15 15
  *
16 16
  * If none of the sidebars have widgets, then let's bail early.
17 17
  */
18
-if ( ! is_active_sidebar( 'sidebar-2' ) && ! is_active_sidebar( 'sidebar-3' ) )
18
+if ( ! is_active_sidebar( 'sidebar-2' ) && ! is_active_sidebar( 'sidebar-3' ) ) {
19 19
 	return;
20
+}
20 21
 
21 22
 // If we get this far, we have widgets. Let do this.
22 23
 ?>
Please login to merge, or discard this patch.
src/wp-content/themes/twentytwelve/header.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -19,11 +19,11 @@  discard block
 block discarded – undo
19 19
 <html <?php language_attributes(); ?>>
20 20
 <!--<![endif]-->
21 21
 <head>
22
-<meta charset="<?php bloginfo( 'charset' ); ?>" />
22
+<meta charset="<?php bloginfo('charset'); ?>" />
23 23
 <meta name="viewport" content="width=device-width" />
24
-<title><?php wp_title( '|', true, 'right' ); ?></title>
24
+<title><?php wp_title('|', true, 'right'); ?></title>
25 25
 <link rel="profile" href="http://gmpg.org/xfn/11" />
26
-<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
26
+<link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
27 27
 <?php // Loads HTML5 JavaScript file to add support for HTML5 elements in older IE versions. ?>
28 28
 <!--[if lt IE 9]>
29 29
 <script src="<?php echo get_template_directory_uri(); ?>/js/html5.js" type="text/javascript"></script>
@@ -35,18 +35,18 @@  discard block
 block discarded – undo
35 35
 <div id="page" class="hfeed site">
36 36
 	<header id="masthead" class="site-header" role="banner">
37 37
 		<hgroup>
38
-			<h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1>
39
-			<h2 class="site-description"><?php bloginfo( 'description' ); ?></h2>
38
+			<h1 class="site-title"><a href="<?php echo esc_url(home_url('/')); ?>" title="<?php echo esc_attr(get_bloginfo('name', 'display')); ?>" rel="home"><?php bloginfo('name'); ?></a></h1>
39
+			<h2 class="site-description"><?php bloginfo('description'); ?></h2>
40 40
 		</hgroup>
41 41
 
42 42
 		<nav id="site-navigation" class="main-navigation" role="navigation">
43
-			<button class="menu-toggle"><?php _e( 'Menu', 'twentytwelve' ); ?></button>
44
-			<a class="assistive-text" href="#content" title="<?php esc_attr_e( 'Skip to content', 'twentytwelve' ); ?>"><?php _e( 'Skip to content', 'twentytwelve' ); ?></a>
45
-			<?php wp_nav_menu( array( 'theme_location' => 'primary', 'menu_class' => 'nav-menu' ) ); ?>
43
+			<button class="menu-toggle"><?php _e('Menu', 'twentytwelve'); ?></button>
44
+			<a class="assistive-text" href="#content" title="<?php esc_attr_e('Skip to content', 'twentytwelve'); ?>"><?php _e('Skip to content', 'twentytwelve'); ?></a>
45
+			<?php wp_nav_menu(array('theme_location' => 'primary', 'menu_class' => 'nav-menu')); ?>
46 46
 		</nav><!-- #site-navigation -->
47 47
 
48
-		<?php if ( get_header_image() ) : ?>
49
-		<a href="<?php echo esc_url( home_url( '/' ) ); ?>"><img src="<?php header_image(); ?>" class="header-image" width="<?php echo esc_attr( get_custom_header()->width ); ?>" height="<?php echo esc_attr( get_custom_header()->height ); ?>" alt="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" /></a>
48
+		<?php if (get_header_image()) : ?>
49
+		<a href="<?php echo esc_url(home_url('/')); ?>"><img src="<?php header_image(); ?>" class="header-image" width="<?php echo esc_attr(get_custom_header()->width); ?>" height="<?php echo esc_attr(get_custom_header()->height); ?>" alt="<?php echo esc_attr(get_bloginfo('name', 'display')); ?>" /></a>
50 50
 		<?php endif; ?>
51 51
 	</header><!-- #masthead -->
52 52
 
Please login to merge, or discard this patch.
src/wp-content/themes/twentytwelve/page-templates/front-page.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -17,19 +17,19 @@
 block discarded – undo
17 17
 	<div id="primary" class="site-content">
18 18
 		<div id="content" role="main">
19 19
 
20
-			<?php while ( have_posts() ) : the_post(); ?>
21
-				<?php if ( has_post_thumbnail() ) : ?>
20
+			<?php while (have_posts()) : the_post(); ?>
21
+				<?php if (has_post_thumbnail()) : ?>
22 22
 					<div class="entry-page-image">
23 23
 						<?php the_post_thumbnail(); ?>
24 24
 					</div><!-- .entry-page-image -->
25 25
 				<?php endif; ?>
26 26
 
27
-				<?php get_template_part( 'content', 'page' ); ?>
27
+				<?php get_template_part('content', 'page'); ?>
28 28
 
29 29
 			<?php endwhile; // end of the loop. ?>
30 30
 
31 31
 		</div><!-- #content -->
32 32
 	</div><!-- #primary -->
33 33
 
34
-<?php get_sidebar( 'front' ); ?>
34
+<?php get_sidebar('front'); ?>
35 35
 <?php get_footer(); ?>
36 36
\ No newline at end of file
Please login to merge, or discard this patch.
src/wp-content/themes/twentytwelve/sidebar.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -10,8 +10,8 @@
 block discarded – undo
10 10
  */
11 11
 ?>
12 12
 
13
-	<?php if ( is_active_sidebar( 'sidebar-1' ) ) : ?>
13
+	<?php if (is_active_sidebar('sidebar-1')) : ?>
14 14
 		<div id="secondary" class="widget-area" role="complementary">
15
-			<?php dynamic_sidebar( 'sidebar-1' ); ?>
15
+			<?php dynamic_sidebar('sidebar-1'); ?>
16 16
 		</div><!-- #secondary -->
17 17
 	<?php endif; ?>
18 18
\ No newline at end of file
Please login to merge, or discard this patch.
src/wp-content/themes/twentytwelve/index.php 2 patches
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -18,39 +18,39 @@
 block discarded – undo
18 18
 
19 19
 	<div id="primary" class="site-content">
20 20
 		<div id="content" role="main">
21
-		<?php if ( have_posts() ) : ?>
21
+		<?php if (have_posts()) : ?>
22 22
 
23 23
 			<?php /* Start the Loop */ ?>
24
-			<?php while ( have_posts() ) : the_post(); ?>
25
-				<?php get_template_part( 'content', get_post_format() ); ?>
24
+			<?php while (have_posts()) : the_post(); ?>
25
+				<?php get_template_part('content', get_post_format()); ?>
26 26
 			<?php endwhile; ?>
27 27
 
28
-			<?php twentytwelve_content_nav( 'nav-below' ); ?>
28
+			<?php twentytwelve_content_nav('nav-below'); ?>
29 29
 
30 30
 		<?php else : ?>
31 31
 
32 32
 			<article id="post-0" class="post no-results not-found">
33 33
 
34
-			<?php if ( current_user_can( 'edit_posts' ) ) :
34
+			<?php if (current_user_can('edit_posts')) :
35 35
 				// Show a different message to a logged-in user who can add posts.
36 36
 			?>
37 37
 				<header class="entry-header">
38
-					<h1 class="entry-title"><?php _e( 'No posts to display', 'twentytwelve' ); ?></h1>
38
+					<h1 class="entry-title"><?php _e('No posts to display', 'twentytwelve'); ?></h1>
39 39
 				</header>
40 40
 
41 41
 				<div class="entry-content">
42
-					<p><?php printf( __( 'Ready to publish your first post? <a href="%s">Get started here</a>.', 'twentytwelve' ), admin_url( 'post-new.php' ) ); ?></p>
42
+					<p><?php printf(__('Ready to publish your first post? <a href="%s">Get started here</a>.', 'twentytwelve'), admin_url('post-new.php')); ?></p>
43 43
 				</div><!-- .entry-content -->
44 44
 
45 45
 			<?php else :
46 46
 				// Show the default message to everyone else.
47 47
 			?>
48 48
 				<header class="entry-header">
49
-					<h1 class="entry-title"><?php _e( 'Nothing Found', 'twentytwelve' ); ?></h1>
49
+					<h1 class="entry-title"><?php _e('Nothing Found', 'twentytwelve'); ?></h1>
50 50
 				</header>
51 51
 
52 52
 				<div class="entry-content">
53
-					<p><?php _e( 'Apologies, but no results were found. Perhaps searching will help find a related post.', 'twentytwelve' ); ?></p>
53
+					<p><?php _e('Apologies, but no results were found. Perhaps searching will help find a related post.', 'twentytwelve'); ?></p>
54 54
 					<?php get_search_form(); ?>
55 55
 				</div><!-- .entry-content -->
56 56
 			<?php endif; // end current_user_can() check ?>
Please login to merge, or discard this patch.
Braces   +10 added lines, -4 removed lines patch added patch discarded remove patch
@@ -27,7 +27,8 @@  discard block
 block discarded – undo
27 27
 
28 28
 			<?php twentytwelve_content_nav( 'nav-below' ); ?>
29 29
 
30
-		<?php else : ?>
30
+		<?php else {
31
+	: ?>
31 32
 
32 33
 			<article id="post-0" class="post no-results not-found">
33 34
 
@@ -35,18 +36,23 @@  discard block
 block discarded – undo
35 36
 				// Show a different message to a logged-in user who can add posts.
36 37
 			?>
37 38
 				<header class="entry-header">
38
-					<h1 class="entry-title"><?php _e( 'No posts to display', 'twentytwelve' ); ?></h1>
39
+					<h1 class="entry-title"><?php _e( 'No posts to display', 'twentytwelve' );
40
+}
41
+?></h1>
39 42
 				</header>
40 43
 
41 44
 				<div class="entry-content">
42 45
 					<p><?php printf( __( 'Ready to publish your first post? <a href="%s">Get started here</a>.', 'twentytwelve' ), admin_url( 'post-new.php' ) ); ?></p>
43 46
 				</div><!-- .entry-content -->
44 47
 
45
-			<?php else :
48
+			<?php else {
49
+	:
46 50
 				// Show the default message to everyone else.
47 51
 			?>
48 52
 				<header class="entry-header">
49
-					<h1 class="entry-title"><?php _e( 'Nothing Found', 'twentytwelve' ); ?></h1>
53
+					<h1 class="entry-title"><?php _e( 'Nothing Found', 'twentytwelve' );
54
+}
55
+?></h1>
50 56
 				</header>
51 57
 
52 58
 				<div class="entry-content">
Please login to merge, or discard this patch.
src/wp-content/themes/twentytwelve/functions.php 2 patches
Braces   +53 added lines, -37 removed lines patch added patch discarded remove patch
@@ -23,8 +23,9 @@  discard block
 block discarded – undo
23 23
  */
24 24
 
25 25
 // Set up the content width value based on the theme's design and stylesheet.
26
-if ( ! isset( $content_width ) )
26
+if ( ! isset( $content_width ) ) {
27 27
 	$content_width = 625;
28
+}
28 29
 
29 30
 /**
30 31
  * Twenty Twelve setup.
@@ -106,12 +107,13 @@  discard block
 block discarded – undo
106 107
 		 */
107 108
 		$subset = _x( 'no-subset', 'Open Sans font: add new subset (greek, cyrillic, vietnamese)', 'twentytwelve' );
108 109
 
109
-		if ( 'cyrillic' == $subset )
110
-			$subsets .= ',cyrillic,cyrillic-ext';
111
-		elseif ( 'greek' == $subset )
112
-			$subsets .= ',greek,greek-ext';
113
-		elseif ( 'vietnamese' == $subset )
114
-			$subsets .= ',vietnamese';
110
+		if ( 'cyrillic' == $subset ) {
111
+					$subsets .= ',cyrillic,cyrillic-ext';
112
+		} elseif ( 'greek' == $subset ) {
113
+					$subsets .= ',greek,greek-ext';
114
+		} elseif ( 'vietnamese' == $subset ) {
115
+					$subsets .= ',vietnamese';
116
+		}
115 117
 
116 118
 		$query_args = array(
117 119
 			'family' => 'Open+Sans:400italic,700italic,400,700',
@@ -135,15 +137,17 @@  discard block
 block discarded – undo
135 137
 	 * Adds JavaScript to pages with the comment form to support
136 138
 	 * sites with threaded comments (when in use).
137 139
 	 */
138
-	if ( is_singular() && comments_open() && get_option( 'thread_comments' ) )
139
-		wp_enqueue_script( 'comment-reply' );
140
+	if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
141
+			wp_enqueue_script( 'comment-reply' );
142
+	}
140 143
 
141 144
 	// Adds JavaScript for handling the navigation menu hide-and-show behavior.
142 145
 	wp_enqueue_script( 'twentytwelve-navigation', get_template_directory_uri() . '/js/navigation.js', array( 'jquery' ), '20140711', true );
143 146
 
144 147
 	$font_url = twentytwelve_get_font_url();
145
-	if ( ! empty( $font_url ) )
146
-		wp_enqueue_style( 'twentytwelve-fonts', esc_url_raw( $font_url ), array(), null );
148
+	if ( ! empty( $font_url ) ) {
149
+			wp_enqueue_style( 'twentytwelve-fonts', esc_url_raw( $font_url ), array(), null );
150
+	}
147 151
 
148 152
 	// Loads our main stylesheet.
149 153
 	wp_enqueue_style( 'twentytwelve-style', get_stylesheet_uri() );
@@ -169,11 +173,13 @@  discard block
 block discarded – undo
169 173
 function twentytwelve_mce_css( $mce_css ) {
170 174
 	$font_url = twentytwelve_get_font_url();
171 175
 
172
-	if ( empty( $font_url ) )
173
-		return $mce_css;
176
+	if ( empty( $font_url ) ) {
177
+			return $mce_css;
178
+	}
174 179
 
175
-	if ( ! empty( $mce_css ) )
176
-		$mce_css .= ',';
180
+	if ( ! empty( $mce_css ) ) {
181
+			$mce_css .= ',';
182
+	}
177 183
 
178 184
 	$mce_css .= esc_url_raw( str_replace( ',', '%2C', $font_url ) );
179 185
 
@@ -196,20 +202,23 @@  discard block
 block discarded – undo
196 202
 function twentytwelve_wp_title( $title, $sep ) {
197 203
 	global $paged, $page;
198 204
 
199
-	if ( is_feed() )
200
-		return $title;
205
+	if ( is_feed() ) {
206
+			return $title;
207
+	}
201 208
 
202 209
 	// Add the site name.
203 210
 	$title .= get_bloginfo( 'name', 'display' );
204 211
 
205 212
 	// Add the site description for the home/front page.
206 213
 	$site_description = get_bloginfo( 'description', 'display' );
207
-	if ( $site_description && ( is_home() || is_front_page() ) )
208
-		$title = "$title $sep $site_description";
214
+	if ( $site_description && ( is_home() || is_front_page() ) ) {
215
+			$title = "$title $sep $site_description";
216
+	}
209 217
 
210 218
 	// Add a page number if necessary.
211
-	if ( ( $paged >= 2 || $page >= 2 ) && ! is_404() )
212
-		$title = "$title $sep " . sprintf( __( 'Page %s', 'twentytwelve' ), max( $paged, $page ) );
219
+	if ( ( $paged >= 2 || $page >= 2 ) && ! is_404() ) {
220
+			$title = "$title $sep " . sprintf( __( 'Page %s', 'twentytwelve' ), max( $paged, $page ) );
221
+	}
213 222
 
214 223
 	return $title;
215 224
 }
@@ -223,8 +232,9 @@  discard block
 block discarded – undo
223 232
  * @since Twenty Twelve 1.0
224 233
  */
225 234
 function twentytwelve_page_menu_args( $args ) {
226
-	if ( ! isset( $args['show_home'] ) )
227
-		$args['show_home'] = true;
235
+	if ( ! isset( $args['show_home'] ) ) {
236
+			$args['show_home'] = true;
237
+	}
228 238
 	return $args;
229 239
 }
230 240
 add_filter( 'wp_page_menu_args', 'twentytwelve_page_menu_args' );
@@ -422,30 +432,36 @@  discard block
 block discarded – undo
422 432
 	$background_color = get_background_color();
423 433
 	$background_image = get_background_image();
424 434
 
425
-	if ( ! is_active_sidebar( 'sidebar-1' ) || is_page_template( 'page-templates/full-width.php' ) )
426
-		$classes[] = 'full-width';
435
+	if ( ! is_active_sidebar( 'sidebar-1' ) || is_page_template( 'page-templates/full-width.php' ) ) {
436
+			$classes[] = 'full-width';
437
+	}
427 438
 
428 439
 	if ( is_page_template( 'page-templates/front-page.php' ) ) {
429 440
 		$classes[] = 'template-front-page';
430
-		if ( has_post_thumbnail() )
431
-			$classes[] = 'has-post-thumbnail';
432
-		if ( is_active_sidebar( 'sidebar-2' ) && is_active_sidebar( 'sidebar-3' ) )
433
-			$classes[] = 'two-sidebars';
441
+		if ( has_post_thumbnail() ) {
442
+					$classes[] = 'has-post-thumbnail';
443
+		}
444
+		if ( is_active_sidebar( 'sidebar-2' ) && is_active_sidebar( 'sidebar-3' ) ) {
445
+					$classes[] = 'two-sidebars';
446
+		}
434 447
 	}
435 448
 
436 449
 	if ( empty( $background_image ) ) {
437
-		if ( empty( $background_color ) )
438
-			$classes[] = 'custom-background-empty';
439
-		elseif ( in_array( $background_color, array( 'fff', 'ffffff' ) ) )
440
-			$classes[] = 'custom-background-white';
450
+		if ( empty( $background_color ) ) {
451
+					$classes[] = 'custom-background-empty';
452
+		} elseif ( in_array( $background_color, array( 'fff', 'ffffff' ) ) ) {
453
+					$classes[] = 'custom-background-white';
454
+		}
441 455
 	}
442 456
 
443 457
 	// Enable custom font class only if the font CSS is queued to load.
444
-	if ( wp_style_is( 'twentytwelve-fonts', 'queue' ) )
445
-		$classes[] = 'custom-font-enabled';
458
+	if ( wp_style_is( 'twentytwelve-fonts', 'queue' ) ) {
459
+			$classes[] = 'custom-font-enabled';
460
+	}
446 461
 
447
-	if ( ! is_multi_author() )
448
-		$classes[] = 'single-author';
462
+	if ( ! is_multi_author() ) {
463
+			$classes[] = 'single-author';
464
+	}
449 465
 
450 466
 	return $classes;
451 467
 }
Please login to merge, or discard this patch.
Spacing   +121 added lines, -121 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
  */
24 24
 
25 25
 // Set up the content width value based on the theme's design and stylesheet.
26
-if ( ! isset( $content_width ) )
26
+if ( ! isset($content_width))
27 27
 	$content_width = 625;
28 28
 
29 29
 /**
@@ -49,41 +49,41 @@  discard block
 block discarded – undo
49 49
 	 * If you're building a theme based on Twenty Twelve, use a find and replace
50 50
 	 * to change 'twentytwelve' to the name of your theme in all the template files.
51 51
 	 */
52
-	load_theme_textdomain( 'twentytwelve', get_template_directory() . '/languages' );
52
+	load_theme_textdomain('twentytwelve', get_template_directory().'/languages');
53 53
 
54 54
 	// This theme styles the visual editor with editor-style.css to match the theme style.
55 55
 	add_editor_style();
56 56
 
57 57
 	// Adds RSS feed links to <head> for posts and comments.
58
-	add_theme_support( 'automatic-feed-links' );
58
+	add_theme_support('automatic-feed-links');
59 59
 
60 60
 	// This theme supports a variety of post formats.
61
-	add_theme_support( 'post-formats', array( 'aside', 'image', 'link', 'quote', 'status' ) );
61
+	add_theme_support('post-formats', array('aside', 'image', 'link', 'quote', 'status'));
62 62
 
63 63
 	// This theme uses wp_nav_menu() in one location.
64
-	register_nav_menu( 'primary', __( 'Primary Menu', 'twentytwelve' ) );
64
+	register_nav_menu('primary', __('Primary Menu', 'twentytwelve'));
65 65
 
66 66
 	/*
67 67
 	 * This theme supports custom background color and image,
68 68
 	 * and here we also set up the default background color.
69 69
 	 */
70
-	add_theme_support( 'custom-background', array(
70
+	add_theme_support('custom-background', array(
71 71
 		'default-color' => 'e6e6e6',
72
-	) );
72
+	));
73 73
 
74 74
 	// This theme uses a custom image size for featured images, displayed on "standard" posts.
75
-	add_theme_support( 'post-thumbnails' );
76
-	set_post_thumbnail_size( 624, 9999 ); // Unlimited height, soft crop
75
+	add_theme_support('post-thumbnails');
76
+	set_post_thumbnail_size(624, 9999); // Unlimited height, soft crop
77 77
 
78 78
 	// Indicate widget sidebars can use selective refresh in the Customizer.
79
-	add_theme_support( 'customize-selective-refresh-widgets' );
79
+	add_theme_support('customize-selective-refresh-widgets');
80 80
 }
81
-add_action( 'after_setup_theme', 'twentytwelve_setup' );
81
+add_action('after_setup_theme', 'twentytwelve_setup');
82 82
 
83 83
 /**
84 84
  * Add support for a custom header image.
85 85
  */
86
-require( get_template_directory() . '/inc/custom-header.php' );
86
+require(get_template_directory().'/inc/custom-header.php');
87 87
 
88 88
 /**
89 89
  * Return the Google font stylesheet URL if available.
@@ -101,26 +101,26 @@  discard block
 block discarded – undo
101 101
 	/* translators: If there are characters in your language that are not supported
102 102
 	 * by Open Sans, translate this to 'off'. Do not translate into your own language.
103 103
 	 */
104
-	if ( 'off' !== _x( 'on', 'Open Sans font: on or off', 'twentytwelve' ) ) {
104
+	if ('off' !== _x('on', 'Open Sans font: on or off', 'twentytwelve')) {
105 105
 		$subsets = 'latin,latin-ext';
106 106
 
107 107
 		/* translators: To add an additional Open Sans character subset specific to your language,
108 108
 		 * translate this to 'greek', 'cyrillic' or 'vietnamese'. Do not translate into your own language.
109 109
 		 */
110
-		$subset = _x( 'no-subset', 'Open Sans font: add new subset (greek, cyrillic, vietnamese)', 'twentytwelve' );
110
+		$subset = _x('no-subset', 'Open Sans font: add new subset (greek, cyrillic, vietnamese)', 'twentytwelve');
111 111
 
112
-		if ( 'cyrillic' == $subset )
112
+		if ('cyrillic' == $subset)
113 113
 			$subsets .= ',cyrillic,cyrillic-ext';
114
-		elseif ( 'greek' == $subset )
114
+		elseif ('greek' == $subset)
115 115
 			$subsets .= ',greek,greek-ext';
116
-		elseif ( 'vietnamese' == $subset )
116
+		elseif ('vietnamese' == $subset)
117 117
 			$subsets .= ',vietnamese';
118 118
 
119 119
 		$query_args = array(
120 120
 			'family' => 'Open+Sans:400italic,700italic,400,700',
121 121
 			'subset' => $subsets,
122 122
 		);
123
-		$font_url = add_query_arg( $query_args, 'https://fonts.googleapis.com/css' );
123
+		$font_url = add_query_arg($query_args, 'https://fonts.googleapis.com/css');
124 124
 	}
125 125
 
126 126
 	return $font_url;
@@ -138,24 +138,24 @@  discard block
 block discarded – undo
138 138
 	 * Adds JavaScript to pages with the comment form to support
139 139
 	 * sites with threaded comments (when in use).
140 140
 	 */
141
-	if ( is_singular() && comments_open() && get_option( 'thread_comments' ) )
142
-		wp_enqueue_script( 'comment-reply' );
141
+	if (is_singular() && comments_open() && get_option('thread_comments'))
142
+		wp_enqueue_script('comment-reply');
143 143
 
144 144
 	// Adds JavaScript for handling the navigation menu hide-and-show behavior.
145
-	wp_enqueue_script( 'twentytwelve-navigation', get_template_directory_uri() . '/js/navigation.js', array( 'jquery' ), '20140711', true );
145
+	wp_enqueue_script('twentytwelve-navigation', get_template_directory_uri().'/js/navigation.js', array('jquery'), '20140711', true);
146 146
 
147 147
 	$font_url = twentytwelve_get_font_url();
148
-	if ( ! empty( $font_url ) )
149
-		wp_enqueue_style( 'twentytwelve-fonts', esc_url_raw( $font_url ), array(), null );
148
+	if ( ! empty($font_url))
149
+		wp_enqueue_style('twentytwelve-fonts', esc_url_raw($font_url), array(), null);
150 150
 
151 151
 	// Loads our main stylesheet.
152
-	wp_enqueue_style( 'twentytwelve-style', get_stylesheet_uri() );
152
+	wp_enqueue_style('twentytwelve-style', get_stylesheet_uri());
153 153
 
154 154
 	// Loads the Internet Explorer specific stylesheet.
155
-	wp_enqueue_style( 'twentytwelve-ie', get_template_directory_uri() . '/css/ie.css', array( 'twentytwelve-style' ), '20121010' );
156
-	$wp_styles->add_data( 'twentytwelve-ie', 'conditional', 'lt IE 9' );
155
+	wp_enqueue_style('twentytwelve-ie', get_template_directory_uri().'/css/ie.css', array('twentytwelve-style'), '20121010');
156
+	$wp_styles->add_data('twentytwelve-ie', 'conditional', 'lt IE 9');
157 157
 }
158
-add_action( 'wp_enqueue_scripts', 'twentytwelve_scripts_styles' );
158
+add_action('wp_enqueue_scripts', 'twentytwelve_scripts_styles');
159 159
 
160 160
 /**
161 161
  * Filter TinyMCE CSS path to include Google Fonts.
@@ -169,20 +169,20 @@  discard block
 block discarded – undo
169 169
  * @param string $mce_css CSS path to load in TinyMCE.
170 170
  * @return string Filtered CSS path.
171 171
  */
172
-function twentytwelve_mce_css( $mce_css ) {
172
+function twentytwelve_mce_css($mce_css) {
173 173
 	$font_url = twentytwelve_get_font_url();
174 174
 
175
-	if ( empty( $font_url ) )
175
+	if (empty($font_url))
176 176
 		return $mce_css;
177 177
 
178
-	if ( ! empty( $mce_css ) )
178
+	if ( ! empty($mce_css))
179 179
 		$mce_css .= ',';
180 180
 
181
-	$mce_css .= esc_url_raw( str_replace( ',', '%2C', $font_url ) );
181
+	$mce_css .= esc_url_raw(str_replace(',', '%2C', $font_url));
182 182
 
183 183
 	return $mce_css;
184 184
 }
185
-add_filter( 'mce_css', 'twentytwelve_mce_css' );
185
+add_filter('mce_css', 'twentytwelve_mce_css');
186 186
 
187 187
 /**
188 188
  * Filter the page title.
@@ -196,27 +196,27 @@  discard block
 block discarded – undo
196 196
  * @param string $sep Optional separator.
197 197
  * @return string Filtered title.
198 198
  */
199
-function twentytwelve_wp_title( $title, $sep ) {
199
+function twentytwelve_wp_title($title, $sep) {
200 200
 	global $paged, $page;
201 201
 
202
-	if ( is_feed() )
202
+	if (is_feed())
203 203
 		return $title;
204 204
 
205 205
 	// Add the site name.
206
-	$title .= get_bloginfo( 'name', 'display' );
206
+	$title .= get_bloginfo('name', 'display');
207 207
 
208 208
 	// Add the site description for the home/front page.
209
-	$site_description = get_bloginfo( 'description', 'display' );
210
-	if ( $site_description && ( is_home() || is_front_page() ) )
209
+	$site_description = get_bloginfo('description', 'display');
210
+	if ($site_description && (is_home() || is_front_page()))
211 211
 		$title = "$title $sep $site_description";
212 212
 
213 213
 	// Add a page number if necessary.
214
-	if ( ( $paged >= 2 || $page >= 2 ) && ! is_404() )
215
-		$title = "$title $sep " . sprintf( __( 'Page %s', 'twentytwelve' ), max( $paged, $page ) );
214
+	if (($paged >= 2 || $page >= 2) && ! is_404())
215
+		$title = "$title $sep ".sprintf(__('Page %s', 'twentytwelve'), max($paged, $page));
216 216
 
217 217
 	return $title;
218 218
 }
219
-add_filter( 'wp_title', 'twentytwelve_wp_title', 10, 2 );
219
+add_filter('wp_title', 'twentytwelve_wp_title', 10, 2);
220 220
 
221 221
 /**
222 222
  * Filter the page menu arguments.
@@ -225,12 +225,12 @@  discard block
 block discarded – undo
225 225
  *
226 226
  * @since Twenty Twelve 1.0
227 227
  */
228
-function twentytwelve_page_menu_args( $args ) {
229
-	if ( ! isset( $args['show_home'] ) )
228
+function twentytwelve_page_menu_args($args) {
229
+	if ( ! isset($args['show_home']))
230 230
 		$args['show_home'] = true;
231 231
 	return $args;
232 232
 }
233
-add_filter( 'wp_page_menu_args', 'twentytwelve_page_menu_args' );
233
+add_filter('wp_page_menu_args', 'twentytwelve_page_menu_args');
234 234
 
235 235
 /**
236 236
  * Register sidebars.
@@ -240,58 +240,58 @@  discard block
 block discarded – undo
240 240
  * @since Twenty Twelve 1.0
241 241
  */
242 242
 function twentytwelve_widgets_init() {
243
-	register_sidebar( array(
244
-		'name' => __( 'Main Sidebar', 'twentytwelve' ),
243
+	register_sidebar(array(
244
+		'name' => __('Main Sidebar', 'twentytwelve'),
245 245
 		'id' => 'sidebar-1',
246
-		'description' => __( 'Appears on posts and pages except the optional Front Page template, which has its own widgets', 'twentytwelve' ),
246
+		'description' => __('Appears on posts and pages except the optional Front Page template, which has its own widgets', 'twentytwelve'),
247 247
 		'before_widget' => '<aside id="%1$s" class="widget %2$s">',
248 248
 		'after_widget' => '</aside>',
249 249
 		'before_title' => '<h3 class="widget-title">',
250 250
 		'after_title' => '</h3>',
251
-	) );
251
+	));
252 252
 
253
-	register_sidebar( array(
254
-		'name' => __( 'First Front Page Widget Area', 'twentytwelve' ),
253
+	register_sidebar(array(
254
+		'name' => __('First Front Page Widget Area', 'twentytwelve'),
255 255
 		'id' => 'sidebar-2',
256
-		'description' => __( 'Appears when using the optional Front Page template with a page set as Static Front Page', 'twentytwelve' ),
256
+		'description' => __('Appears when using the optional Front Page template with a page set as Static Front Page', 'twentytwelve'),
257 257
 		'before_widget' => '<aside id="%1$s" class="widget %2$s">',
258 258
 		'after_widget' => '</aside>',
259 259
 		'before_title' => '<h3 class="widget-title">',
260 260
 		'after_title' => '</h3>',
261
-	) );
261
+	));
262 262
 
263
-	register_sidebar( array(
264
-		'name' => __( 'Second Front Page Widget Area', 'twentytwelve' ),
263
+	register_sidebar(array(
264
+		'name' => __('Second Front Page Widget Area', 'twentytwelve'),
265 265
 		'id' => 'sidebar-3',
266
-		'description' => __( 'Appears when using the optional Front Page template with a page set as Static Front Page', 'twentytwelve' ),
266
+		'description' => __('Appears when using the optional Front Page template with a page set as Static Front Page', 'twentytwelve'),
267 267
 		'before_widget' => '<aside id="%1$s" class="widget %2$s">',
268 268
 		'after_widget' => '</aside>',
269 269
 		'before_title' => '<h3 class="widget-title">',
270 270
 		'after_title' => '</h3>',
271
-	) );
271
+	));
272 272
 }
273
-add_action( 'widgets_init', 'twentytwelve_widgets_init' );
273
+add_action('widgets_init', 'twentytwelve_widgets_init');
274 274
 
275
-if ( ! function_exists( 'twentytwelve_content_nav' ) ) :
275
+if ( ! function_exists('twentytwelve_content_nav')) :
276 276
 /**
277 277
  * Displays navigation to next/previous pages when applicable.
278 278
  *
279 279
  * @since Twenty Twelve 1.0
280 280
  */
281
-function twentytwelve_content_nav( $html_id ) {
281
+function twentytwelve_content_nav($html_id) {
282 282
 	global $wp_query;
283 283
 
284
-	if ( $wp_query->max_num_pages > 1 ) : ?>
285
-		<nav id="<?php echo esc_attr( $html_id ); ?>" class="navigation" role="navigation">
286
-			<h3 class="assistive-text"><?php _e( 'Post navigation', 'twentytwelve' ); ?></h3>
287
-			<div class="nav-previous"><?php next_posts_link( __( '<span class="meta-nav">&larr;</span> Older posts', 'twentytwelve' ) ); ?></div>
288
-			<div class="nav-next"><?php previous_posts_link( __( 'Newer posts <span class="meta-nav">&rarr;</span>', 'twentytwelve' ) ); ?></div>
284
+	if ($wp_query->max_num_pages > 1) : ?>
285
+		<nav id="<?php echo esc_attr($html_id); ?>" class="navigation" role="navigation">
286
+			<h3 class="assistive-text"><?php _e('Post navigation', 'twentytwelve'); ?></h3>
287
+			<div class="nav-previous"><?php next_posts_link(__('<span class="meta-nav">&larr;</span> Older posts', 'twentytwelve')); ?></div>
288
+			<div class="nav-next"><?php previous_posts_link(__('Newer posts <span class="meta-nav">&rarr;</span>', 'twentytwelve')); ?></div>
289 289
 		</nav><!-- .navigation -->
290 290
 	<?php endif;
291 291
 }
292 292
 endif;
293 293
 
294
-if ( ! function_exists( 'twentytwelve_comment' ) ) :
294
+if ( ! function_exists('twentytwelve_comment')) :
295 295
 /**
296 296
  * Template for comments and pingbacks.
297 297
  *
@@ -302,15 +302,15 @@  discard block
 block discarded – undo
302 302
  *
303 303
  * @since Twenty Twelve 1.0
304 304
  */
305
-function twentytwelve_comment( $comment, $args, $depth ) {
305
+function twentytwelve_comment($comment, $args, $depth) {
306 306
 	$GLOBALS['comment'] = $comment;
307
-	switch ( $comment->comment_type ) :
307
+	switch ($comment->comment_type) :
308 308
 		case 'pingback' :
309 309
 		case 'trackback' :
310 310
 		// Display trackbacks differently than normal comments.
311 311
 	?>
312 312
 	<li <?php comment_class(); ?> id="comment-<?php comment_ID(); ?>">
313
-		<p><?php _e( 'Pingback:', 'twentytwelve' ); ?> <?php comment_author_link(); ?> <?php edit_comment_link( __( '(Edit)', 'twentytwelve' ), '<span class="edit-link">', '</span>' ); ?></p>
313
+		<p><?php _e('Pingback:', 'twentytwelve'); ?> <?php comment_author_link(); ?> <?php edit_comment_link(__('(Edit)', 'twentytwelve'), '<span class="edit-link">', '</span>'); ?></p>
314 314
 	<?php
315 315
 			break;
316 316
 		default :
@@ -321,32 +321,32 @@  discard block
 block discarded – undo
321 321
 		<article id="comment-<?php comment_ID(); ?>" class="comment">
322 322
 			<header class="comment-meta comment-author vcard">
323 323
 				<?php
324
-					echo get_avatar( $comment, 44 );
325
-					printf( '<cite><b class="fn">%1$s</b> %2$s</cite>',
324
+					echo get_avatar($comment, 44);
325
+					printf('<cite><b class="fn">%1$s</b> %2$s</cite>',
326 326
 						get_comment_author_link(),
327 327
 						// If current post author is also comment author, make it known visually.
328
-						( $comment->user_id === $post->post_author ) ? '<span>' . __( 'Post author', 'twentytwelve' ) . '</span>' : ''
328
+						($comment->user_id === $post->post_author) ? '<span>'.__('Post author', 'twentytwelve').'</span>' : ''
329 329
 					);
330
-					printf( '<a href="%1$s"><time datetime="%2$s">%3$s</time></a>',
331
-						esc_url( get_comment_link( $comment->comment_ID ) ),
332
-						get_comment_time( 'c' ),
330
+					printf('<a href="%1$s"><time datetime="%2$s">%3$s</time></a>',
331
+						esc_url(get_comment_link($comment->comment_ID)),
332
+						get_comment_time('c'),
333 333
 						/* translators: 1: date, 2: time */
334
-						sprintf( __( '%1$s at %2$s', 'twentytwelve' ), get_comment_date(), get_comment_time() )
334
+						sprintf(__('%1$s at %2$s', 'twentytwelve'), get_comment_date(), get_comment_time())
335 335
 					);
336 336
 				?>
337 337
 			</header><!-- .comment-meta -->
338 338
 
339
-			<?php if ( '0' == $comment->comment_approved ) : ?>
340
-				<p class="comment-awaiting-moderation"><?php _e( 'Your comment is awaiting moderation.', 'twentytwelve' ); ?></p>
339
+			<?php if ('0' == $comment->comment_approved) : ?>
340
+				<p class="comment-awaiting-moderation"><?php _e('Your comment is awaiting moderation.', 'twentytwelve'); ?></p>
341 341
 			<?php endif; ?>
342 342
 
343 343
 			<section class="comment-content comment">
344 344
 				<?php comment_text(); ?>
345
-				<?php edit_comment_link( __( 'Edit', 'twentytwelve' ), '<p class="edit-link">', '</p>' ); ?>
345
+				<?php edit_comment_link(__('Edit', 'twentytwelve'), '<p class="edit-link">', '</p>'); ?>
346 346
 			</section><!-- .comment-content -->
347 347
 
348 348
 			<div class="reply">
349
-				<?php comment_reply_link( array_merge( $args, array( 'reply_text' => __( 'Reply', 'twentytwelve' ), 'after' => ' <span>&darr;</span>', 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>
349
+				<?php comment_reply_link(array_merge($args, array('reply_text' => __('Reply', 'twentytwelve'), 'after' => ' <span>&darr;</span>', 'depth' => $depth, 'max_depth' => $args['max_depth']))); ?>
350 350
 			</div><!-- .reply -->
351 351
 		</article><!-- #comment-## -->
352 352
 	<?php
@@ -355,7 +355,7 @@  discard block
 block discarded – undo
355 355
 }
356 356
 endif;
357 357
 
358
-if ( ! function_exists( 'twentytwelve_entry_meta' ) ) :
358
+if ( ! function_exists('twentytwelve_entry_meta')) :
359 359
 /**
360 360
  * Set up post entry meta.
361 361
  *
@@ -367,31 +367,31 @@  discard block
 block discarded – undo
367 367
  */
368 368
 function twentytwelve_entry_meta() {
369 369
 	// Translators: used between list items, there is a space after the comma.
370
-	$categories_list = get_the_category_list( __( ', ', 'twentytwelve' ) );
370
+	$categories_list = get_the_category_list(__(', ', 'twentytwelve'));
371 371
 
372 372
 	// Translators: used between list items, there is a space after the comma.
373
-	$tag_list = get_the_tag_list( '', __( ', ', 'twentytwelve' ) );
373
+	$tag_list = get_the_tag_list('', __(', ', 'twentytwelve'));
374 374
 
375
-	$date = sprintf( '<a href="%1$s" title="%2$s" rel="bookmark"><time class="entry-date" datetime="%3$s">%4$s</time></a>',
376
-		esc_url( get_permalink() ),
377
-		esc_attr( get_the_time() ),
378
-		esc_attr( get_the_date( 'c' ) ),
379
-		esc_html( get_the_date() )
375
+	$date = sprintf('<a href="%1$s" title="%2$s" rel="bookmark"><time class="entry-date" datetime="%3$s">%4$s</time></a>',
376
+		esc_url(get_permalink()),
377
+		esc_attr(get_the_time()),
378
+		esc_attr(get_the_date('c')),
379
+		esc_html(get_the_date())
380 380
 	);
381 381
 
382
-	$author = sprintf( '<span class="author vcard"><a class="url fn n" href="%1$s" title="%2$s" rel="author">%3$s</a></span>',
383
-		esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),
384
-		esc_attr( sprintf( __( 'View all posts by %s', 'twentytwelve' ), get_the_author() ) ),
382
+	$author = sprintf('<span class="author vcard"><a class="url fn n" href="%1$s" title="%2$s" rel="author">%3$s</a></span>',
383
+		esc_url(get_author_posts_url(get_the_author_meta('ID'))),
384
+		esc_attr(sprintf(__('View all posts by %s', 'twentytwelve'), get_the_author())),
385 385
 		get_the_author()
386 386
 	);
387 387
 
388 388
 	// Translators: 1 is category, 2 is tag, 3 is the date and 4 is the author's name.
389
-	if ( $tag_list ) {
390
-		$utility_text = __( 'This entry was posted in %1$s and tagged %2$s on %3$s<span class="by-author"> by %4$s</span>.', 'twentytwelve' );
391
-	} elseif ( $categories_list ) {
392
-		$utility_text = __( 'This entry was posted in %1$s on %3$s<span class="by-author"> by %4$s</span>.', 'twentytwelve' );
389
+	if ($tag_list) {
390
+		$utility_text = __('This entry was posted in %1$s and tagged %2$s on %3$s<span class="by-author"> by %4$s</span>.', 'twentytwelve');
391
+	} elseif ($categories_list) {
392
+		$utility_text = __('This entry was posted in %1$s on %3$s<span class="by-author"> by %4$s</span>.', 'twentytwelve');
393 393
 	} else {
394
-		$utility_text = __( 'This entry was posted on %3$s<span class="by-author"> by %4$s</span>.', 'twentytwelve' );
394
+		$utility_text = __('This entry was posted on %3$s<span class="by-author"> by %4$s</span>.', 'twentytwelve');
395 395
 	}
396 396
 
397 397
 	printf(
@@ -421,38 +421,38 @@  discard block
 block discarded – undo
421 421
  * @param array $classes Existing class values.
422 422
  * @return array Filtered class values.
423 423
  */
424
-function twentytwelve_body_class( $classes ) {
424
+function twentytwelve_body_class($classes) {
425 425
 	$background_color = get_background_color();
426 426
 	$background_image = get_background_image();
427 427
 
428
-	if ( ! is_active_sidebar( 'sidebar-1' ) || is_page_template( 'page-templates/full-width.php' ) )
428
+	if ( ! is_active_sidebar('sidebar-1') || is_page_template('page-templates/full-width.php'))
429 429
 		$classes[] = 'full-width';
430 430
 
431
-	if ( is_page_template( 'page-templates/front-page.php' ) ) {
431
+	if (is_page_template('page-templates/front-page.php')) {
432 432
 		$classes[] = 'template-front-page';
433
-		if ( has_post_thumbnail() )
433
+		if (has_post_thumbnail())
434 434
 			$classes[] = 'has-post-thumbnail';
435
-		if ( is_active_sidebar( 'sidebar-2' ) && is_active_sidebar( 'sidebar-3' ) )
435
+		if (is_active_sidebar('sidebar-2') && is_active_sidebar('sidebar-3'))
436 436
 			$classes[] = 'two-sidebars';
437 437
 	}
438 438
 
439
-	if ( empty( $background_image ) ) {
440
-		if ( empty( $background_color ) )
439
+	if (empty($background_image)) {
440
+		if (empty($background_color))
441 441
 			$classes[] = 'custom-background-empty';
442
-		elseif ( in_array( $background_color, array( 'fff', 'ffffff' ) ) )
442
+		elseif (in_array($background_color, array('fff', 'ffffff')))
443 443
 			$classes[] = 'custom-background-white';
444 444
 	}
445 445
 
446 446
 	// Enable custom font class only if the font CSS is queued to load.
447
-	if ( wp_style_is( 'twentytwelve-fonts', 'queue' ) )
447
+	if (wp_style_is('twentytwelve-fonts', 'queue'))
448 448
 		$classes[] = 'custom-font-enabled';
449 449
 
450
-	if ( ! is_multi_author() )
450
+	if ( ! is_multi_author())
451 451
 		$classes[] = 'single-author';
452 452
 
453 453
 	return $classes;
454 454
 }
455
-add_filter( 'body_class', 'twentytwelve_body_class' );
455
+add_filter('body_class', 'twentytwelve_body_class');
456 456
 
457 457
 /**
458 458
  * Adjust content width in certain contexts.
@@ -463,12 +463,12 @@  discard block
 block discarded – undo
463 463
  * @since Twenty Twelve 1.0
464 464
  */
465 465
 function twentytwelve_content_width() {
466
-	if ( is_page_template( 'page-templates/full-width.php' ) || is_attachment() || ! is_active_sidebar( 'sidebar-1' ) ) {
466
+	if (is_page_template('page-templates/full-width.php') || is_attachment() || ! is_active_sidebar('sidebar-1')) {
467 467
 		global $content_width;
468 468
 		$content_width = 960;
469 469
 	}
470 470
 }
471
-add_action( 'template_redirect', 'twentytwelve_content_width' );
471
+add_action('template_redirect', 'twentytwelve_content_width');
472 472
 
473 473
 /**
474 474
  * Register postMessage support.
@@ -479,25 +479,25 @@  discard block
 block discarded – undo
479 479
  *
480 480
  * @param WP_Customize_Manager $wp_customize Customizer object.
481 481
  */
482
-function twentytwelve_customize_register( $wp_customize ) {
483
-	$wp_customize->get_setting( 'blogname' )->transport         = 'postMessage';
484
-	$wp_customize->get_setting( 'blogdescription' )->transport  = 'postMessage';
485
-	$wp_customize->get_setting( 'header_textcolor' )->transport = 'postMessage';
482
+function twentytwelve_customize_register($wp_customize) {
483
+	$wp_customize->get_setting('blogname')->transport         = 'postMessage';
484
+	$wp_customize->get_setting('blogdescription')->transport  = 'postMessage';
485
+	$wp_customize->get_setting('header_textcolor')->transport = 'postMessage';
486 486
 
487
-	if ( isset( $wp_customize->selective_refresh ) ) {
488
-		$wp_customize->selective_refresh->add_partial( 'blogname', array(
487
+	if (isset($wp_customize->selective_refresh)) {
488
+		$wp_customize->selective_refresh->add_partial('blogname', array(
489 489
 			'selector' => '.site-title > a',
490 490
 			'container_inclusive' => false,
491 491
 			'render_callback' => 'twentytwelve_customize_partial_blogname',
492
-		) );
493
-		$wp_customize->selective_refresh->add_partial( 'blogdescription', array(
492
+		));
493
+		$wp_customize->selective_refresh->add_partial('blogdescription', array(
494 494
 			'selector' => '.site-description',
495 495
 			'container_inclusive' => false,
496 496
 			'render_callback' => 'twentytwelve_customize_partial_blogdescription',
497
-		) );
497
+		));
498 498
 	}
499 499
 }
500
-add_action( 'customize_register', 'twentytwelve_customize_register' );
500
+add_action('customize_register', 'twentytwelve_customize_register');
501 501
 
502 502
 /**
503 503
  * Render the site title for the selective refresh partial.
@@ -508,7 +508,7 @@  discard block
 block discarded – undo
508 508
  * @return void
509 509
  */
510 510
 function twentytwelve_customize_partial_blogname() {
511
-	bloginfo( 'name' );
511
+	bloginfo('name');
512 512
 }
513 513
 
514 514
 /**
@@ -520,7 +520,7 @@  discard block
 block discarded – undo
520 520
  * @return void
521 521
  */
522 522
 function twentytwelve_customize_partial_blogdescription() {
523
-	bloginfo( 'description' );
523
+	bloginfo('description');
524 524
 }
525 525
 
526 526
 /**
@@ -531,6 +531,6 @@  discard block
 block discarded – undo
531 531
  * @since Twenty Twelve 1.0
532 532
  */
533 533
 function twentytwelve_customize_preview_js() {
534
-	wp_enqueue_script( 'twentytwelve-customizer', get_template_directory_uri() . '/js/theme-customizer.js', array( 'customize-preview' ), '20141120', true );
534
+	wp_enqueue_script('twentytwelve-customizer', get_template_directory_uri().'/js/theme-customizer.js', array('customize-preview'), '20141120', true);
535 535
 }
536
-add_action( 'customize_preview_init', 'twentytwelve_customize_preview_js' );
536
+add_action('customize_preview_init', 'twentytwelve_customize_preview_js');
Please login to merge, or discard this patch.
src/wp-content/themes/twentytwelve/content-aside.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -12,17 +12,17 @@
 block discarded – undo
12 12
 		<div class="aside">
13 13
 			<h1 class="entry-title"><a href="<?php the_permalink(); ?>" rel="bookmark"><?php the_title(); ?></a></h1>
14 14
 			<div class="entry-content">
15
-				<?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentytwelve' ) ); ?>
15
+				<?php the_content(__('Continue reading <span class="meta-nav">&rarr;</span>', 'twentytwelve')); ?>
16 16
 			</div><!-- .entry-content -->
17 17
 		</div><!-- .aside -->
18 18
 
19 19
 		<footer class="entry-meta">
20
-			<a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( sprintf( __( 'Permalink to %s', 'twentytwelve' ), the_title_attribute( 'echo=0' ) ) ); ?>" rel="bookmark"><?php echo get_the_date(); ?></a>
21
-			<?php if ( comments_open() ) : ?>
20
+			<a href="<?php the_permalink(); ?>" title="<?php echo esc_attr(sprintf(__('Permalink to %s', 'twentytwelve'), the_title_attribute('echo=0'))); ?>" rel="bookmark"><?php echo get_the_date(); ?></a>
21
+			<?php if (comments_open()) : ?>
22 22
 			<div class="comments-link">
23
-				<?php comments_popup_link( '<span class="leave-reply">' . __( 'Leave a reply', 'twentytwelve' ) . '</span>', __( '1 Reply', 'twentytwelve' ), __( '% Replies', 'twentytwelve' ) ); ?>
23
+				<?php comments_popup_link('<span class="leave-reply">'.__('Leave a reply', 'twentytwelve').'</span>', __('1 Reply', 'twentytwelve'), __('% Replies', 'twentytwelve')); ?>
24 24
 			</div><!-- .comments-link -->
25 25
 			<?php endif; // comments_open() ?>
26
-			<?php edit_post_link( __( 'Edit', 'twentytwelve' ), '<span class="edit-link">', '</span>' ); ?>
26
+			<?php edit_post_link(__('Edit', 'twentytwelve'), '<span class="edit-link">', '</span>'); ?>
27 27
 		</footer><!-- .entry-meta -->
28 28
 	</article><!-- #post -->
Please login to merge, or discard this patch.
src/wp-content/themes/twentytwelve/category.php 2 patches
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -16,32 +16,32 @@
 block discarded – undo
16 16
 	<section id="primary" class="site-content">
17 17
 		<div id="content" role="main">
18 18
 
19
-		<?php if ( have_posts() ) : ?>
19
+		<?php if (have_posts()) : ?>
20 20
 			<header class="archive-header">
21
-				<h1 class="archive-title"><?php printf( __( 'Category Archives: %s', 'twentytwelve' ), '<span>' . single_cat_title( '', false ) . '</span>' ); ?></h1>
21
+				<h1 class="archive-title"><?php printf(__('Category Archives: %s', 'twentytwelve'), '<span>'.single_cat_title('', false).'</span>'); ?></h1>
22 22
 
23
-			<?php if ( category_description() ) : // Show an optional category description ?>
23
+			<?php if (category_description()) : // Show an optional category description ?>
24 24
 				<div class="archive-meta"><?php echo category_description(); ?></div>
25 25
 			<?php endif; ?>
26 26
 			</header><!-- .archive-header -->
27 27
 
28 28
 			<?php
29 29
 			/* Start the Loop */
30
-			while ( have_posts() ) : the_post();
30
+			while (have_posts()) : the_post();
31 31
 
32 32
 				/* Include the post format-specific template for the content. If you want to
33 33
 				 * this in a child theme then include a file called called content-___.php
34 34
 				 * (where ___ is the post format) and that will be used instead.
35 35
 				 */
36
-				get_template_part( 'content', get_post_format() );
36
+				get_template_part('content', get_post_format());
37 37
 
38 38
 			endwhile;
39 39
 
40
-			twentytwelve_content_nav( 'nav-below' );
40
+			twentytwelve_content_nav('nav-below');
41 41
 			?>
42 42
 
43 43
 		<?php else : ?>
44
-			<?php get_template_part( 'content', 'none' ); ?>
44
+			<?php get_template_part('content', 'none'); ?>
45 45
 		<?php endif; ?>
46 46
 
47 47
 		</div><!-- #content -->
Please login to merge, or discard this patch.
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -51,8 +51,11 @@
 block discarded – undo
51 51
 
52 52
 			<?php twentythirteen_paging_nav(); ?>
53 53
 
54
-		<?php else : ?>
55
-			<?php get_template_part( 'content', 'none' ); ?>
54
+		<?php else {
55
+	: ?>
56
+			<?php get_template_part( 'content', 'none' );
57
+}
58
+?>
56 59
 		<?php endif; ?>
57 60
 
58 61
 		</div><!-- #content -->
Please login to merge, or discard this patch.