Completed
Push — master ( d99bf9...491baf )
by Stephen
13:47
created
src/wp-content/themes/twentyeleven/content-image.php 1 patch
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -11,34 +11,34 @@  discard block
 block discarded – undo
11 11
  * @since Twenty Eleven 1.0
12 12
  */
13 13
 ?>
14
-	<article id="post-<?php the_ID(); ?>" <?php post_class( 'indexed' ); ?>>
14
+	<article id="post-<?php the_ID(); ?>" <?php post_class('indexed'); ?>>
15 15
 		<header class="entry-header">
16 16
 			<hgroup>
17 17
 				<h2 class="entry-title"><a href="<?php the_permalink(); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
18
-				<h3 class="entry-format"><?php _e( 'Image', 'twentyeleven' ); ?></h3>
18
+				<h3 class="entry-format"><?php _e('Image', 'twentyeleven'); ?></h3>
19 19
 			</hgroup>
20 20
 
21
-			<?php if ( comments_open() && ! post_password_required() ) : ?>
21
+			<?php if (comments_open() && ! post_password_required()) : ?>
22 22
 			<div class="comments-link">
23
-				<?php comments_popup_link( '<span class="leave-reply">' . __( 'Reply', 'twentyeleven' ) . '</span>', _x( '1', 'comments number', 'twentyeleven' ), _x( '%', 'comments number', 'twentyeleven' ) ); ?>
23
+				<?php comments_popup_link('<span class="leave-reply">'.__('Reply', 'twentyeleven').'</span>', _x('1', 'comments number', 'twentyeleven'), _x('%', 'comments number', 'twentyeleven')); ?>
24 24
 			</div>
25 25
 			<?php endif; ?>
26 26
 		</header><!-- .entry-header -->
27 27
 
28 28
 		<div class="entry-content">
29
-			<?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentyeleven' ) ); ?>
30
-			<?php wp_link_pages( array( 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'twentyeleven' ) . '</span>', 'after' => '</div>' ) ); ?>
29
+			<?php the_content(__('Continue reading <span class="meta-nav">&rarr;</span>', 'twentyeleven')); ?>
30
+			<?php wp_link_pages(array('before' => '<div class="page-link"><span>'.__('Pages:', 'twentyeleven').'</span>', 'after' => '</div>')); ?>
31 31
 		</div><!-- .entry-content -->
32 32
 
33 33
 		<footer class="entry-meta">
34 34
 			<div class="entry-meta">
35 35
 				<?php
36
-					printf( __( '<a href="%1$s" rel="bookmark"><time class="entry-date" datetime="%2$s">%3$s</time></a><span class="by-author"> <span class="sep"> by </span> <span class="author vcard"><a class="url fn n" href="%4$s" title="%5$s" rel="author">%6$s</a></span></span>', 'twentyeleven' ),
37
-						esc_url( get_permalink() ),
38
-						get_the_date( 'c' ),
36
+					printf(__('<a href="%1$s" rel="bookmark"><time class="entry-date" datetime="%2$s">%3$s</time></a><span class="by-author"> <span class="sep"> by </span> <span class="author vcard"><a class="url fn n" href="%4$s" title="%5$s" rel="author">%6$s</a></span></span>', 'twentyeleven'),
37
+						esc_url(get_permalink()),
38
+						get_the_date('c'),
39 39
 						get_the_date(),
40
-						esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),
41
-						esc_attr( sprintf( __( 'View all posts by %s', 'twentyeleven' ), get_the_author() ) ),
40
+						esc_url(get_author_posts_url(get_the_author_meta('ID'))),
41
+						esc_attr(sprintf(__('View all posts by %s', 'twentyeleven'), get_the_author())),
42 42
 						get_the_author()
43 43
 					);
44 44
 				?>
@@ -46,27 +46,27 @@  discard block
 block discarded – undo
46 46
 			<div class="entry-meta">
47 47
 				<?php
48 48
 					/* translators: used between list items, there is a space after the comma */
49
-					$categories_list = get_the_category_list( __( ', ', 'twentyeleven' ) );
50
-					if ( $categories_list ):
49
+					$categories_list = get_the_category_list(__(', ', 'twentyeleven'));
50
+					if ($categories_list):
51 51
 				?>
52 52
 				<span class="cat-links">
53
-					<?php printf( __( '<span class="%1$s">Posted in</span> %2$s', 'twentyeleven' ), 'entry-utility-prep entry-utility-prep-cat-links', $categories_list ); ?>
53
+					<?php printf(__('<span class="%1$s">Posted in</span> %2$s', 'twentyeleven'), 'entry-utility-prep entry-utility-prep-cat-links', $categories_list); ?>
54 54
 				</span>
55 55
 				<?php endif; // End if categories ?>
56 56
 				<?php
57 57
 					/* translators: used between list items, there is a space after the comma */
58
-					$tags_list = get_the_tag_list( '', __( ', ', 'twentyeleven' ) );
59
-					if ( $tags_list ): ?>
58
+					$tags_list = get_the_tag_list('', __(', ', 'twentyeleven'));
59
+					if ($tags_list): ?>
60 60
 				<span class="tag-links">
61
-					<?php printf( __( '<span class="%1$s">Tagged</span> %2$s', 'twentyeleven' ), 'entry-utility-prep entry-utility-prep-tag-links', $tags_list ); ?>
61
+					<?php printf(__('<span class="%1$s">Tagged</span> %2$s', 'twentyeleven'), 'entry-utility-prep entry-utility-prep-tag-links', $tags_list); ?>
62 62
 				</span>
63 63
 				<?php endif; // End if $tags_list ?>
64 64
 
65
-				<?php if ( comments_open() ) : ?>
66
-				<span class="comments-link"><?php comments_popup_link( '<span class="leave-reply">' . __( 'Leave a reply', 'twentyeleven' ) . '</span>', __( '<b>1</b> Reply', 'twentyeleven' ), __( '<b>%</b> Replies', 'twentyeleven' ) ); ?></span>
65
+				<?php if (comments_open()) : ?>
66
+				<span class="comments-link"><?php comments_popup_link('<span class="leave-reply">'.__('Leave a reply', 'twentyeleven').'</span>', __('<b>1</b> Reply', 'twentyeleven'), __('<b>%</b> Replies', 'twentyeleven')); ?></span>
67 67
 				<?php endif; // End if comments_open() ?>
68 68
 			</div><!-- .entry-meta -->
69 69
 
70
-			<?php edit_post_link( __( 'Edit', 'twentyeleven' ), '<span class="edit-link">', '</span>' ); ?>
70
+			<?php edit_post_link(__('Edit', 'twentyeleven'), '<span class="edit-link">', '</span>'); ?>
71 71
 		</footer><!-- .entry-meta -->
72 72
 	</article><!-- #post-<?php the_ID(); ?> -->
Please login to merge, or discard this patch.
src/wp-content/themes/twentyeleven/search.php 2 patches
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -12,16 +12,16 @@  discard block
 block discarded – undo
12 12
 		<section id="primary">
13 13
 			<div id="content" 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', 'twentyeleven' ), '<span>' . get_search_query() . '</span>' ); ?></h1>
18
+					<h1 class="page-title"><?php printf(__('Search Results for: %s', 'twentyeleven'), '<span>'.get_search_query().'</span>'); ?></h1>
19 19
 				</header>
20 20
 
21
-				<?php twentyeleven_content_nav( 'nav-above' ); ?>
21
+				<?php twentyeleven_content_nav('nav-above'); ?>
22 22
 
23 23
 				<?php /* Start the Loop */ ?>
24
-				<?php while ( have_posts() ) : the_post(); ?>
24
+				<?php while (have_posts()) : the_post(); ?>
25 25
 
26 26
 					<?php
27 27
 						/*
@@ -30,22 +30,22 @@  discard block
 block discarded – undo
30 30
 						 * called content-___.php (where ___ is the Post Format name) and that
31 31
 						 * will be used instead.
32 32
 						 */
33
-						get_template_part( 'content', get_post_format() );
33
+						get_template_part('content', get_post_format());
34 34
 					?>
35 35
 
36 36
 				<?php endwhile; ?>
37 37
 
38
-				<?php twentyeleven_content_nav( 'nav-below' ); ?>
38
+				<?php twentyeleven_content_nav('nav-below'); ?>
39 39
 
40 40
 			<?php else : ?>
41 41
 
42 42
 				<article id="post-0" class="post no-results not-found">
43 43
 					<header class="entry-header">
44
-						<h1 class="entry-title"><?php _e( 'Nothing Found', 'twentyeleven' ); ?></h1>
44
+						<h1 class="entry-title"><?php _e('Nothing Found', 'twentyeleven'); ?></h1>
45 45
 					</header><!-- .entry-header -->
46 46
 
47 47
 					<div class="entry-content">
48
-						<p><?php _e( 'Sorry, but nothing matched your search criteria. Please try again with some different keywords.', 'twentyeleven' ); ?></p>
48
+						<p><?php _e('Sorry, but nothing matched your search criteria. Please try again with some different keywords.', 'twentyeleven'); ?></p>
49 49
 						<?php get_search_form(); ?>
50 50
 					</div><!-- .entry-content -->
51 51
 				</article><!-- #post-0 -->
Please login to merge, or discard this patch.
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -30,11 +30,14 @@
 block discarded – undo
30 30
 
31 31
 				<?php twentyeleven_content_nav( 'nav-below' ); ?>
32 32
 
33
-			<?php else : ?>
33
+			<?php else {
34
+	: ?>
34 35
 
35 36
 				<article id="post-0" class="post no-results not-found">
36 37
 					<header class="entry-header">
37
-						<h1 class="entry-title"><?php _e( 'Nothing Found', 'twentyeleven' ); ?></h1>
38
+						<h1 class="entry-title"><?php _e( 'Nothing Found', 'twentyeleven' );
39
+}
40
+?></h1>
38 41
 					</header><!-- .entry-header -->
39 42
 
40 43
 					<div class="entry-content">
Please login to merge, or discard this patch.
src/wp-content/themes/twentyeleven/sidebar-footer.php 2 patches
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -15,29 +15,29 @@
 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-3'  )
19
-		&& ! is_active_sidebar( 'sidebar-4' )
20
-		&& ! is_active_sidebar( 'sidebar-5'  )
18
+	if ( ! is_active_sidebar('sidebar-3')
19
+		&& ! is_active_sidebar('sidebar-4')
20
+		&& ! is_active_sidebar('sidebar-5')
21 21
 	)
22 22
 		return;
23 23
 	// If we get this far, we have widgets. Let do this.
24 24
 ?>
25 25
 <div id="supplementary" <?php twentyeleven_footer_sidebar_class(); ?>>
26
-	<?php if ( is_active_sidebar( 'sidebar-3' ) ) : ?>
26
+	<?php if (is_active_sidebar('sidebar-3')) : ?>
27 27
 	<div id="first" class="widget-area" role="complementary">
28
-		<?php dynamic_sidebar( 'sidebar-3' ); ?>
28
+		<?php dynamic_sidebar('sidebar-3'); ?>
29 29
 	</div><!-- #first .widget-area -->
30 30
 	<?php endif; ?>
31 31
 
32
-	<?php if ( is_active_sidebar( 'sidebar-4' ) ) : ?>
32
+	<?php if (is_active_sidebar('sidebar-4')) : ?>
33 33
 	<div id="second" class="widget-area" role="complementary">
34
-		<?php dynamic_sidebar( 'sidebar-4' ); ?>
34
+		<?php dynamic_sidebar('sidebar-4'); ?>
35 35
 	</div><!-- #second .widget-area -->
36 36
 	<?php endif; ?>
37 37
 
38
-	<?php if ( is_active_sidebar( 'sidebar-5' ) ) : ?>
38
+	<?php if (is_active_sidebar('sidebar-5')) : ?>
39 39
 	<div id="third" class="widget-area" role="complementary">
40
-		<?php dynamic_sidebar( 'sidebar-5' ); ?>
40
+		<?php dynamic_sidebar('sidebar-5'); ?>
41 41
 	</div><!-- #third .widget-area -->
42 42
 	<?php endif; ?>
43 43
 </div><!-- #supplementary -->
44 44
\ No newline at end of file
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -18,8 +18,9 @@
 block discarded – undo
18 18
 	if (   ! is_active_sidebar( 'sidebar-3'  )
19 19
 		&& ! is_active_sidebar( 'sidebar-4' )
20 20
 		&& ! is_active_sidebar( 'sidebar-5'  )
21
-	)
22
-		return;
21
+	) {
22
+			return;
23
+	}
23 24
 	// If we get this far, we have widgets. Let do this.
24 25
 ?>
25 26
 <div id="supplementary" <?php twentyeleven_footer_sidebar_class(); ?>>
Please login to merge, or discard this patch.
src/wp-content/themes/twentyeleven/tag.php 2 patches
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -12,16 +12,16 @@  discard block
 block discarded – undo
12 12
 		<section id="primary">
13 13
 			<div id="content" role="main">
14 14
 
15
-			<?php if ( have_posts() ) : ?>
15
+			<?php if (have_posts()) : ?>
16 16
 
17 17
 				<header class="page-header">
18 18
 					<h1 class="page-title"><?php
19
-						printf( __( 'Tag Archives: %s', 'twentyeleven' ), '<span>' . single_tag_title( '', false ) . '</span>' );
19
+						printf(__('Tag Archives: %s', 'twentyeleven'), '<span>'.single_tag_title('', false).'</span>');
20 20
 					?></h1>
21 21
 
22 22
 					<?php
23 23
 						$tag_description = tag_description();
24
-						if ( ! empty( $tag_description ) ) {
24
+						if ( ! empty($tag_description)) {
25 25
 							/**
26 26
 							 * Filter the default Twenty Eleven tag description.
27 27
 							 *
@@ -29,15 +29,15 @@  discard block
 block discarded – undo
29 29
 							 *
30 30
 							 * @param string The default tag description.
31 31
 							 */
32
-							echo apply_filters( 'tag_archive_meta', '<div class="tag-archive-meta">' . $tag_description . '</div>' );
32
+							echo apply_filters('tag_archive_meta', '<div class="tag-archive-meta">'.$tag_description.'</div>');
33 33
 						}
34 34
 					?>
35 35
 				</header>
36 36
 
37
-				<?php twentyeleven_content_nav( 'nav-above' ); ?>
37
+				<?php twentyeleven_content_nav('nav-above'); ?>
38 38
 
39 39
 				<?php /* Start the Loop */ ?>
40
-				<?php while ( have_posts() ) : the_post(); ?>
40
+				<?php while (have_posts()) : the_post(); ?>
41 41
 
42 42
 					<?php
43 43
 						/*
@@ -46,22 +46,22 @@  discard block
 block discarded – undo
46 46
 						 * called content-___.php (where ___ is the Post Format name) and that
47 47
 						 * will be used instead.
48 48
 						 */
49
-						get_template_part( 'content', get_post_format() );
49
+						get_template_part('content', get_post_format());
50 50
 					?>
51 51
 
52 52
 				<?php endwhile; ?>
53 53
 
54
-				<?php twentyeleven_content_nav( 'nav-below' ); ?>
54
+				<?php twentyeleven_content_nav('nav-below'); ?>
55 55
 
56 56
 			<?php else : ?>
57 57
 
58 58
 				<article id="post-0" class="post no-results not-found">
59 59
 					<header class="entry-header">
60
-						<h1 class="entry-title"><?php _e( 'Nothing Found', 'twentyeleven' ); ?></h1>
60
+						<h1 class="entry-title"><?php _e('Nothing Found', 'twentyeleven'); ?></h1>
61 61
 					</header><!-- .entry-header -->
62 62
 
63 63
 					<div class="entry-content">
64
-						<p><?php _e( 'Apologies, but no results were found for the requested archive. Perhaps searching will help find a related post.', 'twentyeleven' ); ?></p>
64
+						<p><?php _e('Apologies, but no results were found for the requested archive. Perhaps searching will help find a related post.', 'twentyeleven'); ?></p>
65 65
 						<?php get_search_form(); ?>
66 66
 					</div><!-- .entry-content -->
67 67
 				</article><!-- #post-0 -->
Please login to merge, or discard this patch.
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -30,11 +30,14 @@
 block discarded – undo
30 30
 
31 31
 				<?php twentyeleven_content_nav( 'nav-below' ); ?>
32 32
 
33
-			<?php else : ?>
33
+			<?php else {
34
+	: ?>
34 35
 
35 36
 				<article id="post-0" class="post no-results not-found">
36 37
 					<header class="entry-header">
37
-						<h1 class="entry-title"><?php _e( 'Nothing Found', 'twentyeleven' ); ?></h1>
38
+						<h1 class="entry-title"><?php _e( 'Nothing Found', 'twentyeleven' );
39
+}
40
+?></h1>
38 41
 					</header><!-- .entry-header -->
39 42
 
40 43
 					<div class="entry-content">
Please login to merge, or discard this patch.
src/wp-content/themes/twentyeleven/content-single.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
12 12
 	<header class="entry-header">
13 13
 		<h1 class="entry-title"><?php the_title(); ?></h1>
14 14
 
15
-		<?php if ( 'post' == get_post_type() ) : ?>
15
+		<?php if ('post' == get_post_type()) : ?>
16 16
 		<div class="entry-meta">
17 17
 			<?php twentyeleven_posted_on(); ?>
18 18
 		</div><!-- .entry-meta -->
@@ -21,50 +21,50 @@  discard block
 block discarded – undo
21 21
 
22 22
 	<div class="entry-content">
23 23
 		<?php the_content(); ?>
24
-		<?php wp_link_pages( array( 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'twentyeleven' ) . '</span>', 'after' => '</div>' ) ); ?>
24
+		<?php wp_link_pages(array('before' => '<div class="page-link"><span>'.__('Pages:', 'twentyeleven').'</span>', 'after' => '</div>')); ?>
25 25
 	</div><!-- .entry-content -->
26 26
 
27 27
 	<footer class="entry-meta">
28 28
 		<?php
29 29
 			/* translators: used between list items, there is a space after the comma */
30
-			$categories_list = get_the_category_list( __( ', ', 'twentyeleven' ) );
30
+			$categories_list = get_the_category_list(__(', ', 'twentyeleven'));
31 31
 
32 32
 			/* translators: used between list items, there is a space after the comma */
33
-			$tag_list = get_the_tag_list( '', __( ', ', 'twentyeleven' ) );
34
-			if ( '' != $tag_list ) {
35
-				$utility_text = __( 'This entry was posted in %1$s and tagged %2$s by <a href="%6$s">%5$s</a>. Bookmark the <a href="%3$s" title="Permalink to %4$s" rel="bookmark">permalink</a>.', 'twentyeleven' );
36
-			} elseif ( '' != $categories_list ) {
37
-				$utility_text = __( 'This entry was posted in %1$s by <a href="%6$s">%5$s</a>. Bookmark the <a href="%3$s" title="Permalink to %4$s" rel="bookmark">permalink</a>.', 'twentyeleven' );
33
+			$tag_list = get_the_tag_list('', __(', ', 'twentyeleven'));
34
+			if ('' != $tag_list) {
35
+				$utility_text = __('This entry was posted in %1$s and tagged %2$s by <a href="%6$s">%5$s</a>. Bookmark the <a href="%3$s" title="Permalink to %4$s" rel="bookmark">permalink</a>.', 'twentyeleven');
36
+			} elseif ('' != $categories_list) {
37
+				$utility_text = __('This entry was posted in %1$s by <a href="%6$s">%5$s</a>. Bookmark the <a href="%3$s" title="Permalink to %4$s" rel="bookmark">permalink</a>.', 'twentyeleven');
38 38
 			} else {
39
-				$utility_text = __( 'This entry was posted by <a href="%6$s">%5$s</a>. Bookmark the <a href="%3$s" title="Permalink to %4$s" rel="bookmark">permalink</a>.', 'twentyeleven' );
39
+				$utility_text = __('This entry was posted by <a href="%6$s">%5$s</a>. Bookmark the <a href="%3$s" title="Permalink to %4$s" rel="bookmark">permalink</a>.', 'twentyeleven');
40 40
 			}
41 41
 
42 42
 			printf(
43 43
 				$utility_text,
44 44
 				$categories_list,
45 45
 				$tag_list,
46
-				esc_url( get_permalink() ),
47
-				the_title_attribute( 'echo=0' ),
46
+				esc_url(get_permalink()),
47
+				the_title_attribute('echo=0'),
48 48
 				get_the_author(),
49
-				esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) )
49
+				esc_url(get_author_posts_url(get_the_author_meta('ID')))
50 50
 			);
51 51
 		?>
52
-		<?php edit_post_link( __( 'Edit', 'twentyeleven' ), '<span class="edit-link">', '</span>' ); ?>
52
+		<?php edit_post_link(__('Edit', 'twentyeleven'), '<span class="edit-link">', '</span>'); ?>
53 53
 
54
-		<?php if ( get_the_author_meta( 'description' ) && ( ! function_exists( 'is_multi_author' ) || is_multi_author() ) ) : // If a user has filled out their description and this is a multi-author blog, show a bio on their entries ?>
54
+		<?php if (get_the_author_meta('description') && ( ! function_exists('is_multi_author') || is_multi_author())) : // If a user has filled out their description and this is a multi-author blog, show a bio on their entries ?>
55 55
 		<div id="author-info">
56 56
 			<div id="author-avatar">
57 57
 				<?php
58 58
 				/** This filter is documented in author.php */
59
-				echo get_avatar( get_the_author_meta( 'user_email' ), apply_filters( 'twentyeleven_author_bio_avatar_size', 68 ) );
59
+				echo get_avatar(get_the_author_meta('user_email'), apply_filters('twentyeleven_author_bio_avatar_size', 68));
60 60
 				?>
61 61
 			</div><!-- #author-avatar -->
62 62
 			<div id="author-description">
63
-				<h2><?php printf( __( 'About %s', 'twentyeleven' ), get_the_author() ); ?></h2>
64
-				<?php the_author_meta( 'description' ); ?>
63
+				<h2><?php printf(__('About %s', 'twentyeleven'), get_the_author()); ?></h2>
64
+				<?php the_author_meta('description'); ?>
65 65
 				<div id="author-link">
66
-					<a href="<?php echo esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ); ?>" rel="author">
67
-						<?php printf( __( 'View all posts by %s <span class="meta-nav">&rarr;</span>', 'twentyeleven' ), get_the_author() ); ?>
66
+					<a href="<?php echo esc_url(get_author_posts_url(get_the_author_meta('ID'))); ?>" rel="author">
67
+						<?php printf(__('View all posts by %s <span class="meta-nav">&rarr;</span>', 'twentyeleven'), get_the_author()); ?>
68 68
 					</a>
69 69
 				</div><!-- #author-link	-->
70 70
 			</div><!-- #author-description -->
Please login to merge, or discard this patch.
src/wp-content/themes/twentyeleven/inc/theme-options.php 2 patches
Braces   +38 added lines, -28 removed lines patch added patch discarded remove patch
@@ -99,8 +99,9 @@  discard block
 block discarded – undo
99 99
 		'twentyeleven_theme_options_render_page' // Function that renders the options page
100 100
 	);
101 101
 
102
-	if ( ! $theme_page )
103
-		return;
102
+	if ( ! $theme_page ) {
103
+			return;
104
+	}
104 105
 
105 106
 	add_action( "load-$theme_page", 'twentyeleven_theme_options_help' );
106 107
 }
@@ -217,8 +218,9 @@  discard block
 block discarded – undo
217 218
 		'theme_layout' => 'content-sidebar',
218 219
 	);
219 220
 
220
-	if ( is_rtl() )
221
-		$default_theme_options['theme_layout'] = 'sidebar-content';
221
+	if ( is_rtl() ) {
222
+			$default_theme_options['theme_layout'] = 'sidebar-content';
223
+	}
222 224
 
223 225
 	/**
224 226
 	 * Filter the Twenty Eleven default options.
@@ -246,8 +248,9 @@  discard block
 block discarded – undo
246 248
 	}
247 249
 
248 250
 	$color_schemes = twentyeleven_color_schemes();
249
-	if ( ! isset( $color_schemes[ $color_scheme ] ) )
250
-		return false;
251
+	if ( ! isset( $color_schemes[ $color_scheme ] ) ) {
252
+			return false;
253
+	}
251 254
 
252 255
 	return $color_schemes[ $color_scheme ]['default_link_color'];
253 256
 }
@@ -364,19 +367,22 @@  discard block
 block discarded – undo
364 367
 	$output = $defaults = twentyeleven_get_default_theme_options();
365 368
 
366 369
 	// Color scheme must be in our array of color scheme options
367
-	if ( isset( $input['color_scheme'] ) && array_key_exists( $input['color_scheme'], twentyeleven_color_schemes() ) )
368
-		$output['color_scheme'] = $input['color_scheme'];
370
+	if ( isset( $input['color_scheme'] ) && array_key_exists( $input['color_scheme'], twentyeleven_color_schemes() ) ) {
371
+			$output['color_scheme'] = $input['color_scheme'];
372
+	}
369 373
 
370 374
 	// Our defaults for the link color may have changed, based on the color scheme.
371 375
 	$output['link_color'] = $defaults['link_color'] = twentyeleven_get_default_link_color( $output['color_scheme'] );
372 376
 
373 377
 	// Link color must be 3 or 6 hexadecimal characters
374
-	if ( isset( $input['link_color'] ) && preg_match( '/^#?([a-f0-9]{3}){1,2}$/i', $input['link_color'] ) )
375
-		$output['link_color'] = '#' . strtolower( ltrim( $input['link_color'], '#' ) );
378
+	if ( isset( $input['link_color'] ) && preg_match( '/^#?([a-f0-9]{3}){1,2}$/i', $input['link_color'] ) ) {
379
+			$output['link_color'] = '#' . strtolower( ltrim( $input['link_color'], '#' ) );
380
+	}
376 381
 
377 382
 	// Theme layout must be in our array of theme layout options
378
-	if ( isset( $input['theme_layout'] ) && array_key_exists( $input['theme_layout'], twentyeleven_layouts() ) )
379
-		$output['theme_layout'] = $input['theme_layout'];
383
+	if ( isset( $input['theme_layout'] ) && array_key_exists( $input['theme_layout'], twentyeleven_layouts() ) ) {
384
+			$output['theme_layout'] = $input['theme_layout'];
385
+	}
380 386
 
381 387
 	/**
382 388
 	 * Filter the Twenty Eleven sanitized form input array.
@@ -399,8 +405,9 @@  discard block
 block discarded – undo
399 405
 	$options = twentyeleven_get_theme_options();
400 406
 	$color_scheme = $options['color_scheme'];
401 407
 
402
-	if ( 'dark' == $color_scheme )
403
-		wp_enqueue_style( 'dark', get_template_directory_uri() . '/colors/dark.css', array(), null );
408
+	if ( 'dark' == $color_scheme ) {
409
+			wp_enqueue_style( 'dark', get_template_directory_uri() . '/colors/dark.css', array(), null );
410
+	}
404 411
 
405 412
 	/**
406 413
 	 * Fires after the styles for the Twenty Eleven color scheme are enqueued.
@@ -427,9 +434,10 @@  discard block
 block discarded – undo
427 434
 	$default_options = twentyeleven_get_default_theme_options();
428 435
 
429 436
 	// Don't do anything if the current link color is the default.
430
-	if ( $default_options['link_color'] == $link_color )
431
-		return;
432
-?>
437
+	if ( $default_options['link_color'] == $link_color ) {
438
+			return;
439
+	}
440
+	?>
433 441
 	<style>
434 442
 		/* Link color */
435 443
 		a,
@@ -472,17 +480,19 @@  discard block
 block discarded – undo
472 480
 	$options = twentyeleven_get_theme_options();
473 481
 	$current_layout = $options['theme_layout'];
474 482
 
475
-	if ( in_array( $current_layout, array( 'content-sidebar', 'sidebar-content' ) ) )
476
-		$classes = array( 'two-column' );
477
-	else
478
-		$classes = array( 'one-column' );
479
-
480
-	if ( 'content-sidebar' == $current_layout )
481
-		$classes[] = 'right-sidebar';
482
-	elseif ( 'sidebar-content' == $current_layout )
483
-		$classes[] = 'left-sidebar';
484
-	else
485
-		$classes[] = $current_layout;
483
+	if ( in_array( $current_layout, array( 'content-sidebar', 'sidebar-content' ) ) ) {
484
+			$classes = array( 'two-column' );
485
+	} else {
486
+			$classes = array( 'one-column' );
487
+	}
488
+
489
+	if ( 'content-sidebar' == $current_layout ) {
490
+			$classes[] = 'right-sidebar';
491
+	} elseif ( 'sidebar-content' == $current_layout ) {
492
+			$classes[] = 'left-sidebar';
493
+	} else {
494
+			$classes[] = $current_layout;
495
+	}
486 496
 
487 497
 	/**
488 498
 	 * Filter the Twenty Eleven layout body classes.
Please login to merge, or discard this patch.
Spacing   +130 added lines, -130 removed lines patch added patch discarded remove patch
@@ -16,12 +16,12 @@  discard block
 block discarded – undo
16 16
  *
17 17
  * @param string $hook_suffix An admin page's hook suffix.
18 18
  */
19
-function twentyeleven_admin_enqueue_scripts( $hook_suffix ) {
20
-	wp_enqueue_style( 'twentyeleven-theme-options', get_template_directory_uri() . '/inc/theme-options.css', false, '2011-04-28' );
21
-	wp_enqueue_script( 'twentyeleven-theme-options', get_template_directory_uri() . '/inc/theme-options.js', array( 'farbtastic' ), '2011-06-10' );
22
-	wp_enqueue_style( 'farbtastic' );
19
+function twentyeleven_admin_enqueue_scripts($hook_suffix) {
20
+	wp_enqueue_style('twentyeleven-theme-options', get_template_directory_uri().'/inc/theme-options.css', false, '2011-04-28');
21
+	wp_enqueue_script('twentyeleven-theme-options', get_template_directory_uri().'/inc/theme-options.js', array('farbtastic'), '2011-06-10');
22
+	wp_enqueue_style('farbtastic');
23 23
 }
24
-add_action( 'admin_print_styles-appearance_page_theme_options', 'twentyeleven_admin_enqueue_scripts' );
24
+add_action('admin_print_styles-appearance_page_theme_options', 'twentyeleven_admin_enqueue_scripts');
25 25
 
26 26
 /**
27 27
  * Register the form setting for our twentyeleven_options array.
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
 function twentyeleven_theme_options_init() {
38 38
 
39 39
 	register_setting(
40
-		'twentyeleven_options',       // Options group, see settings_fields() call in twentyeleven_theme_options_render_page()
40
+		'twentyeleven_options', // Options group, see settings_fields() call in twentyeleven_theme_options_render_page()
41 41
 		'twentyeleven_theme_options', // Database option, see twentyeleven_get_theme_options()
42 42
 		'twentyeleven_theme_options_validate' // The sanitization callback, see twentyeleven_theme_options_validate()
43 43
 	);
@@ -52,17 +52,17 @@  discard block
 block discarded – undo
52 52
 
53 53
 	// Register our individual settings fields
54 54
 	add_settings_field(
55
-		'color_scheme',                             // Unique identifier for the field for this section
56
-		__( 'Color Scheme', 'twentyeleven' ),       // Setting field label
55
+		'color_scheme', // Unique identifier for the field for this section
56
+		__('Color Scheme', 'twentyeleven'), // Setting field label
57 57
 		'twentyeleven_settings_field_color_scheme', // Function that renders the settings field
58
-		'theme_options',                            // Menu slug, used to uniquely identify the page; see twentyeleven_theme_options_add_page()
58
+		'theme_options', // Menu slug, used to uniquely identify the page; see twentyeleven_theme_options_add_page()
59 59
 		'general'                                   // Settings section. Same as the first argument in the add_settings_section() above
60 60
 	);
61 61
 
62
-	add_settings_field( 'link_color', __( 'Link Color',     'twentyeleven' ), 'twentyeleven_settings_field_link_color', 'theme_options', 'general' );
63
-	add_settings_field( 'layout',     __( 'Default Layout', 'twentyeleven' ), 'twentyeleven_settings_field_layout',     'theme_options', 'general' );
62
+	add_settings_field('link_color', __('Link Color', 'twentyeleven'), 'twentyeleven_settings_field_link_color', 'theme_options', 'general');
63
+	add_settings_field('layout', __('Default Layout', 'twentyeleven'), 'twentyeleven_settings_field_layout', 'theme_options', 'general');
64 64
 }
65
-add_action( 'admin_init', 'twentyeleven_theme_options_init' );
65
+add_action('admin_init', 'twentyeleven_theme_options_init');
66 66
 
67 67
 /**
68 68
  * Change the capability required to save the 'twentyeleven_options' options group.
@@ -78,10 +78,10 @@  discard block
 block discarded – undo
78 78
  * @param string $capability The capability used for the page, which is manage_options by default.
79 79
  * @return string The capability to actually use.
80 80
  */
81
-function twentyeleven_option_page_capability( $capability ) {
81
+function twentyeleven_option_page_capability($capability) {
82 82
 	return 'edit_theme_options';
83 83
 }
84
-add_filter( 'option_page_capability_twentyeleven_options', 'twentyeleven_option_page_capability' );
84
+add_filter('option_page_capability_twentyeleven_options', 'twentyeleven_option_page_capability');
85 85
 
86 86
 /**
87 87
  * Add a theme options page to the admin menu, including some help documentation.
@@ -92,49 +92,49 @@  discard block
 block discarded – undo
92 92
  */
93 93
 function twentyeleven_theme_options_add_page() {
94 94
 	$theme_page = add_theme_page(
95
-		__( 'Theme Options', 'twentyeleven' ),   // Name of page
96
-		__( 'Theme Options', 'twentyeleven' ),   // Label in menu
97
-		'edit_theme_options',                    // Capability required
98
-		'theme_options',                         // Menu slug, used to uniquely identify the page
95
+		__('Theme Options', 'twentyeleven'), // Name of page
96
+		__('Theme Options', 'twentyeleven'), // Label in menu
97
+		'edit_theme_options', // Capability required
98
+		'theme_options', // Menu slug, used to uniquely identify the page
99 99
 		'twentyeleven_theme_options_render_page' // Function that renders the options page
100 100
 	);
101 101
 
102
-	if ( ! $theme_page )
102
+	if ( ! $theme_page)
103 103
 		return;
104 104
 
105
-	add_action( "load-$theme_page", 'twentyeleven_theme_options_help' );
105
+	add_action("load-$theme_page", 'twentyeleven_theme_options_help');
106 106
 }
107
-add_action( 'admin_menu', 'twentyeleven_theme_options_add_page' );
107
+add_action('admin_menu', 'twentyeleven_theme_options_add_page');
108 108
 
109 109
 function twentyeleven_theme_options_help() {
110 110
 
111
-	$help = '<p>' . __( 'Some themes provide customization options that are grouped together on a Theme Options screen. If you change themes, options may change or disappear, as they are theme-specific. Your current theme, Twenty Eleven, provides the following Theme Options:', 'twentyeleven' ) . '</p>' .
112
-			'<ol>' .
113
-				'<li>' . __( '<strong>Color Scheme</strong>: You can choose a color palette of "Light" (light background with dark text) or "Dark" (dark background with light text) for your site.', 'twentyeleven' ) . '</li>' .
114
-				'<li>' . __( '<strong>Link Color</strong>: You can choose the color used for text links on your site. You can enter the HTML color or hex code, or you can choose visually by clicking the "Select a Color" button to pick from a color wheel.', 'twentyeleven' ) . '</li>' .
115
-				'<li>' . __( '<strong>Default Layout</strong>: You can choose if you want your site&#8217;s default layout to have a sidebar on the left, the right, or not at all.', 'twentyeleven' ) . '</li>' .
116
-			'</ol>' .
117
-			'<p>' . __( 'Remember to click "Save Changes" to save any changes you have made to the theme options.', 'twentyeleven' ) . '</p>';
111
+	$help = '<p>'.__('Some themes provide customization options that are grouped together on a Theme Options screen. If you change themes, options may change or disappear, as they are theme-specific. Your current theme, Twenty Eleven, provides the following Theme Options:', 'twentyeleven').'</p>'.
112
+			'<ol>'.
113
+				'<li>'.__('<strong>Color Scheme</strong>: You can choose a color palette of "Light" (light background with dark text) or "Dark" (dark background with light text) for your site.', 'twentyeleven').'</li>'.
114
+				'<li>'.__('<strong>Link Color</strong>: You can choose the color used for text links on your site. You can enter the HTML color or hex code, or you can choose visually by clicking the "Select a Color" button to pick from a color wheel.', 'twentyeleven').'</li>'.
115
+				'<li>'.__('<strong>Default Layout</strong>: You can choose if you want your site&#8217;s default layout to have a sidebar on the left, the right, or not at all.', 'twentyeleven').'</li>'.
116
+			'</ol>'.
117
+			'<p>'.__('Remember to click "Save Changes" to save any changes you have made to the theme options.', 'twentyeleven').'</p>';
118 118
 
119
-	$sidebar = '<p><strong>' . __( 'For more information:', 'twentyeleven' ) . '</strong></p>' .
120
-		'<p>' . __( '<a href="https://codex.wordpress.org/Appearance_Theme_Options_Screen" target="_blank">Documentation on Theme Options</a>', 'twentyeleven' ) . '</p>' .
121
-		'<p>' . __( '<a href="https://wordpress.org/support/" target="_blank">Support Forums</a>', 'twentyeleven' ) . '</p>';
119
+	$sidebar = '<p><strong>'.__('For more information:', 'twentyeleven').'</strong></p>'.
120
+		'<p>'.__('<a href="https://codex.wordpress.org/Appearance_Theme_Options_Screen" target="_blank">Documentation on Theme Options</a>', 'twentyeleven').'</p>'.
121
+		'<p>'.__('<a href="https://wordpress.org/support/" target="_blank">Support Forums</a>', 'twentyeleven').'</p>';
122 122
 
123 123
 	$screen = get_current_screen();
124 124
 
125
-	if ( method_exists( $screen, 'add_help_tab' ) ) {
125
+	if (method_exists($screen, 'add_help_tab')) {
126 126
 		// WordPress 3.3.0
127
-		$screen->add_help_tab( array(
128
-			'title' => __( 'Overview', 'twentyeleven' ),
127
+		$screen->add_help_tab(array(
128
+			'title' => __('Overview', 'twentyeleven'),
129 129
 			'id' => 'theme-options-help',
130 130
 			'content' => $help,
131 131
 			)
132 132
 		);
133 133
 
134
-		$screen->set_help_sidebar( $sidebar );
134
+		$screen->set_help_sidebar($sidebar);
135 135
 	} else {
136 136
 		// WordPress 3.2.0
137
-		add_contextual_help( $screen, $help . $sidebar );
137
+		add_contextual_help($screen, $help.$sidebar);
138 138
 	}
139 139
 }
140 140
 
@@ -147,14 +147,14 @@  discard block
 block discarded – undo
147 147
 	$color_scheme_options = array(
148 148
 		'light' => array(
149 149
 			'value' => 'light',
150
-			'label' => __( 'Light', 'twentyeleven' ),
151
-			'thumbnail' => get_template_directory_uri() . '/inc/images/light.png',
150
+			'label' => __('Light', 'twentyeleven'),
151
+			'thumbnail' => get_template_directory_uri().'/inc/images/light.png',
152 152
 			'default_link_color' => '#1b8be0',
153 153
 		),
154 154
 		'dark' => array(
155 155
 			'value' => 'dark',
156
-			'label' => __( 'Dark', 'twentyeleven' ),
157
-			'thumbnail' => get_template_directory_uri() . '/inc/images/dark.png',
156
+			'label' => __('Dark', 'twentyeleven'),
157
+			'thumbnail' => get_template_directory_uri().'/inc/images/dark.png',
158 158
 			'default_link_color' => '#e4741f',
159 159
 		),
160 160
 	);
@@ -166,7 +166,7 @@  discard block
 block discarded – undo
166 166
 	 *
167 167
 	 * @param array $color_scheme_options An associative array of color scheme options.
168 168
 	 */
169
-	return apply_filters( 'twentyeleven_color_schemes', $color_scheme_options );
169
+	return apply_filters('twentyeleven_color_schemes', $color_scheme_options);
170 170
 }
171 171
 
172 172
 /**
@@ -178,18 +178,18 @@  discard block
 block discarded – undo
178 178
 	$layout_options = array(
179 179
 		'content-sidebar' => array(
180 180
 			'value' => 'content-sidebar',
181
-			'label' => __( 'Content on left', 'twentyeleven' ),
182
-			'thumbnail' => get_template_directory_uri() . '/inc/images/content-sidebar.png',
181
+			'label' => __('Content on left', 'twentyeleven'),
182
+			'thumbnail' => get_template_directory_uri().'/inc/images/content-sidebar.png',
183 183
 		),
184 184
 		'sidebar-content' => array(
185 185
 			'value' => 'sidebar-content',
186
-			'label' => __( 'Content on right', 'twentyeleven' ),
187
-			'thumbnail' => get_template_directory_uri() . '/inc/images/sidebar-content.png',
186
+			'label' => __('Content on right', 'twentyeleven'),
187
+			'thumbnail' => get_template_directory_uri().'/inc/images/sidebar-content.png',
188 188
 		),
189 189
 		'content' => array(
190 190
 			'value' => 'content',
191
-			'label' => __( 'One-column, no sidebar', 'twentyeleven' ),
192
-			'thumbnail' => get_template_directory_uri() . '/inc/images/content.png',
191
+			'label' => __('One-column, no sidebar', 'twentyeleven'),
192
+			'thumbnail' => get_template_directory_uri().'/inc/images/content.png',
193 193
 		),
194 194
 	);
195 195
 
@@ -200,7 +200,7 @@  discard block
 block discarded – undo
200 200
 	 *
201 201
 	 * @param array $layout_options An associative array of layout options.
202 202
 	 */
203
-	return apply_filters( 'twentyeleven_layouts', $layout_options );
203
+	return apply_filters('twentyeleven_layouts', $layout_options);
204 204
 }
205 205
 
206 206
 /**
@@ -213,11 +213,11 @@  discard block
 block discarded – undo
213 213
 function twentyeleven_get_default_theme_options() {
214 214
 	$default_theme_options = array(
215 215
 		'color_scheme' => 'light',
216
-		'link_color'   => twentyeleven_get_default_link_color( 'light' ),
216
+		'link_color'   => twentyeleven_get_default_link_color('light'),
217 217
 		'theme_layout' => 'content-sidebar',
218 218
 	);
219 219
 
220
-	if ( is_rtl() )
220
+	if (is_rtl())
221 221
 		$default_theme_options['theme_layout'] = 'sidebar-content';
222 222
 
223 223
 	/**
@@ -227,7 +227,7 @@  discard block
 block discarded – undo
227 227
 	 *
228 228
 	 * @param array $default_theme_options An array of default theme options.
229 229
 	 */
230
-	return apply_filters( 'twentyeleven_default_theme_options', $default_theme_options );
230
+	return apply_filters('twentyeleven_default_theme_options', $default_theme_options);
231 231
 }
232 232
 
233 233
 /**
@@ -239,17 +239,17 @@  discard block
 block discarded – undo
239 239
  *                             Default null (or the active color scheme).
240 240
  * @return string The default link color.
241 241
 */
242
-function twentyeleven_get_default_link_color( $color_scheme = null ) {
243
-	if ( null === $color_scheme ) {
242
+function twentyeleven_get_default_link_color($color_scheme = null) {
243
+	if (null === $color_scheme) {
244 244
 		$options = twentyeleven_get_theme_options();
245 245
 		$color_scheme = $options['color_scheme'];
246 246
 	}
247 247
 
248 248
 	$color_schemes = twentyeleven_color_schemes();
249
-	if ( ! isset( $color_schemes[ $color_scheme ] ) )
249
+	if ( ! isset($color_schemes[$color_scheme]))
250 250
 		return false;
251 251
 
252
-	return $color_schemes[ $color_scheme ]['default_link_color'];
252
+	return $color_schemes[$color_scheme]['default_link_color'];
253 253
 }
254 254
 
255 255
 /**
@@ -258,7 +258,7 @@  discard block
 block discarded – undo
258 258
  * @since Twenty Eleven 1.0
259 259
  */
260 260
 function twentyeleven_get_theme_options() {
261
-	return get_option( 'twentyeleven_theme_options', twentyeleven_get_default_theme_options() );
261
+	return get_option('twentyeleven_theme_options', twentyeleven_get_default_theme_options());
262 262
 }
263 263
 
264 264
 /**
@@ -269,15 +269,15 @@  discard block
 block discarded – undo
269 269
 function twentyeleven_settings_field_color_scheme() {
270 270
 	$options = twentyeleven_get_theme_options();
271 271
 
272
-	foreach ( twentyeleven_color_schemes() as $scheme ) {
272
+	foreach (twentyeleven_color_schemes() as $scheme) {
273 273
 	?>
274 274
 	<div class="layout image-radio-option color-scheme">
275 275
 	<label class="description">
276
-		<input type="radio" name="twentyeleven_theme_options[color_scheme]" value="<?php echo esc_attr( $scheme['value'] ); ?>" <?php checked( $options['color_scheme'], $scheme['value'] ); ?> />
277
-		<input type="hidden" id="default-color-<?php echo esc_attr( $scheme['value'] ); ?>" value="<?php echo esc_attr( $scheme['default_link_color'] ); ?>" />
276
+		<input type="radio" name="twentyeleven_theme_options[color_scheme]" value="<?php echo esc_attr($scheme['value']); ?>" <?php checked($options['color_scheme'], $scheme['value']); ?> />
277
+		<input type="hidden" id="default-color-<?php echo esc_attr($scheme['value']); ?>" value="<?php echo esc_attr($scheme['default_link_color']); ?>" />
278 278
 		<span>
279
-			<img src="<?php echo esc_url( $scheme['thumbnail'] ); ?>" width="136" height="122" alt="" />
280
-			<?php echo esc_html( $scheme['label'] ); ?>
279
+			<img src="<?php echo esc_url($scheme['thumbnail']); ?>" width="136" height="122" alt="" />
280
+			<?php echo esc_html($scheme['label']); ?>
281 281
 		</span>
282 282
 	</label>
283 283
 	</div>
@@ -293,12 +293,12 @@  discard block
 block discarded – undo
293 293
 function twentyeleven_settings_field_link_color() {
294 294
 	$options = twentyeleven_get_theme_options();
295 295
 	?>
296
-	<input type="text" name="twentyeleven_theme_options[link_color]" id="link-color" value="<?php echo esc_attr( $options['link_color'] ); ?>" />
296
+	<input type="text" name="twentyeleven_theme_options[link_color]" id="link-color" value="<?php echo esc_attr($options['link_color']); ?>" />
297 297
 	<a href="#" class="pickcolor hide-if-no-js" id="link-color-example"></a>
298
-	<input type="button" class="pickcolor button hide-if-no-js" value="<?php esc_attr_e( 'Select a Color', 'twentyeleven' ); ?>" />
298
+	<input type="button" class="pickcolor button hide-if-no-js" value="<?php esc_attr_e('Select a Color', 'twentyeleven'); ?>" />
299 299
 	<div id="colorPickerDiv" style="z-index: 100; background:#eee; border:1px solid #ccc; position:absolute; display:none;"></div>
300 300
 	<br />
301
-	<span><?php printf( __( 'Default color: %s', 'twentyeleven' ), '<span id="default-color">' . twentyeleven_get_default_link_color( $options['color_scheme'] ) . '</span>' ); ?></span>
301
+	<span><?php printf(__('Default color: %s', 'twentyeleven'), '<span id="default-color">'.twentyeleven_get_default_link_color($options['color_scheme']).'</span>'); ?></span>
302 302
 	<?php
303 303
 }
304 304
 
@@ -309,14 +309,14 @@  discard block
 block discarded – undo
309 309
  */
310 310
 function twentyeleven_settings_field_layout() {
311 311
 	$options = twentyeleven_get_theme_options();
312
-	foreach ( twentyeleven_layouts() as $layout ) {
312
+	foreach (twentyeleven_layouts() as $layout) {
313 313
 		?>
314 314
 		<div class="layout image-radio-option theme-layout">
315 315
 		<label class="description">
316
-			<input type="radio" name="twentyeleven_theme_options[theme_layout]" value="<?php echo esc_attr( $layout['value'] ); ?>" <?php checked( $options['theme_layout'], $layout['value'] ); ?> />
316
+			<input type="radio" name="twentyeleven_theme_options[theme_layout]" value="<?php echo esc_attr($layout['value']); ?>" <?php checked($options['theme_layout'], $layout['value']); ?> />
317 317
 			<span>
318
-				<img src="<?php echo esc_url( $layout['thumbnail'] ); ?>" width="136" height="122" alt="" />
319
-				<?php echo esc_html( $layout['label'] ); ?>
318
+				<img src="<?php echo esc_url($layout['thumbnail']); ?>" width="136" height="122" alt="" />
319
+				<?php echo esc_html($layout['label']); ?>
320 320
 			</span>
321 321
 		</label>
322 322
 		</div>
@@ -333,14 +333,14 @@  discard block
 block discarded – undo
333 333
 	?>
334 334
 	<div class="wrap">
335 335
 		<?php screen_icon(); ?>
336
-		<?php $theme_name = function_exists( 'wp_get_theme' ) ? wp_get_theme() : get_current_theme(); ?>
337
-		<h2><?php printf( __( '%s Theme Options', 'twentyeleven' ), $theme_name ); ?></h2>
336
+		<?php $theme_name = function_exists('wp_get_theme') ? wp_get_theme() : get_current_theme(); ?>
337
+		<h2><?php printf(__('%s Theme Options', 'twentyeleven'), $theme_name); ?></h2>
338 338
 		<?php settings_errors(); ?>
339 339
 
340 340
 		<form method="post" action="options.php">
341 341
 			<?php
342
-				settings_fields( 'twentyeleven_options' );
343
-				do_settings_sections( 'theme_options' );
342
+				settings_fields('twentyeleven_options');
343
+				do_settings_sections('theme_options');
344 344
 				submit_button();
345 345
 			?>
346 346
 		</form>
@@ -360,22 +360,22 @@  discard block
 block discarded – undo
360 360
  *
361 361
  * @param array $input An array of form input.
362 362
  */
363
-function twentyeleven_theme_options_validate( $input ) {
363
+function twentyeleven_theme_options_validate($input) {
364 364
 	$output = $defaults = twentyeleven_get_default_theme_options();
365 365
 
366 366
 	// Color scheme must be in our array of color scheme options
367
-	if ( isset( $input['color_scheme'] ) && array_key_exists( $input['color_scheme'], twentyeleven_color_schemes() ) )
367
+	if (isset($input['color_scheme']) && array_key_exists($input['color_scheme'], twentyeleven_color_schemes()))
368 368
 		$output['color_scheme'] = $input['color_scheme'];
369 369
 
370 370
 	// Our defaults for the link color may have changed, based on the color scheme.
371
-	$output['link_color'] = $defaults['link_color'] = twentyeleven_get_default_link_color( $output['color_scheme'] );
371
+	$output['link_color'] = $defaults['link_color'] = twentyeleven_get_default_link_color($output['color_scheme']);
372 372
 
373 373
 	// Link color must be 3 or 6 hexadecimal characters
374
-	if ( isset( $input['link_color'] ) && preg_match( '/^#?([a-f0-9]{3}){1,2}$/i', $input['link_color'] ) )
375
-		$output['link_color'] = '#' . strtolower( ltrim( $input['link_color'], '#' ) );
374
+	if (isset($input['link_color']) && preg_match('/^#?([a-f0-9]{3}){1,2}$/i', $input['link_color']))
375
+		$output['link_color'] = '#'.strtolower(ltrim($input['link_color'], '#'));
376 376
 
377 377
 	// Theme layout must be in our array of theme layout options
378
-	if ( isset( $input['theme_layout'] ) && array_key_exists( $input['theme_layout'], twentyeleven_layouts() ) )
378
+	if (isset($input['theme_layout']) && array_key_exists($input['theme_layout'], twentyeleven_layouts()))
379 379
 		$output['theme_layout'] = $input['theme_layout'];
380 380
 
381 381
 	/**
@@ -387,7 +387,7 @@  discard block
 block discarded – undo
387 387
 	 * @param array $input    An array of un-sanitized form input.
388 388
 	 * @param array $defaults An array of default theme options.
389 389
 	 */
390
-	return apply_filters( 'twentyeleven_theme_options_validate', $output, $input, $defaults );
390
+	return apply_filters('twentyeleven_theme_options_validate', $output, $input, $defaults);
391 391
 }
392 392
 
393 393
 /**
@@ -399,8 +399,8 @@  discard block
 block discarded – undo
399 399
 	$options = twentyeleven_get_theme_options();
400 400
 	$color_scheme = $options['color_scheme'];
401 401
 
402
-	if ( 'dark' == $color_scheme )
403
-		wp_enqueue_style( 'dark', get_template_directory_uri() . '/colors/dark.css', array(), null );
402
+	if ('dark' == $color_scheme)
403
+		wp_enqueue_style('dark', get_template_directory_uri().'/colors/dark.css', array(), null);
404 404
 
405 405
 	/**
406 406
 	 * Fires after the styles for the Twenty Eleven color scheme are enqueued.
@@ -409,9 +409,9 @@  discard block
 block discarded – undo
409 409
 	 *
410 410
 	 * @param string $color_scheme The color scheme.
411 411
 	 */
412
-	do_action( 'twentyeleven_enqueue_color_scheme', $color_scheme );
412
+	do_action('twentyeleven_enqueue_color_scheme', $color_scheme);
413 413
 }
414
-add_action( 'wp_enqueue_scripts', 'twentyeleven_enqueue_color_scheme' );
414
+add_action('wp_enqueue_scripts', 'twentyeleven_enqueue_color_scheme');
415 415
 
416 416
 /**
417 417
  * Add a style block to the theme for the current link color.
@@ -427,7 +427,7 @@  discard block
 block discarded – undo
427 427
 	$default_options = twentyeleven_get_default_theme_options();
428 428
 
429 429
 	// Don't do anything if the current link color is the default.
430
-	if ( $default_options['link_color'] == $link_color )
430
+	if ($default_options['link_color'] == $link_color)
431 431
 		return;
432 432
 ?>
433 433
 	<style>
@@ -459,7 +459,7 @@  discard block
 block discarded – undo
459 459
 	</style>
460 460
 <?php
461 461
 }
462
-add_action( 'wp_head', 'twentyeleven_print_link_color_style' );
462
+add_action('wp_head', 'twentyeleven_print_link_color_style');
463 463
 
464 464
 /**
465 465
  * Add Twenty Eleven layout classes to the array of body classes.
@@ -468,18 +468,18 @@  discard block
 block discarded – undo
468 468
  *
469 469
  * @param array $existing_classes An array of existing body classes.
470 470
  */
471
-function twentyeleven_layout_classes( $existing_classes ) {
471
+function twentyeleven_layout_classes($existing_classes) {
472 472
 	$options = twentyeleven_get_theme_options();
473 473
 	$current_layout = $options['theme_layout'];
474 474
 
475
-	if ( in_array( $current_layout, array( 'content-sidebar', 'sidebar-content' ) ) )
476
-		$classes = array( 'two-column' );
475
+	if (in_array($current_layout, array('content-sidebar', 'sidebar-content')))
476
+		$classes = array('two-column');
477 477
 	else
478
-		$classes = array( 'one-column' );
478
+		$classes = array('one-column');
479 479
 
480
-	if ( 'content-sidebar' == $current_layout )
480
+	if ('content-sidebar' == $current_layout)
481 481
 		$classes[] = 'right-sidebar';
482
-	elseif ( 'sidebar-content' == $current_layout )
482
+	elseif ('sidebar-content' == $current_layout)
483 483
 		$classes[] = 'left-sidebar';
484 484
 	else
485 485
 		$classes[] = $current_layout;
@@ -492,11 +492,11 @@  discard block
 block discarded – undo
492 492
 	 * @param array  $classes        An array of body classes.
493 493
 	 * @param string $current_layout The current theme layout.
494 494
 	 */
495
-	$classes = apply_filters( 'twentyeleven_layout_classes', $classes, $current_layout );
495
+	$classes = apply_filters('twentyeleven_layout_classes', $classes, $current_layout);
496 496
 
497
-	return array_merge( $existing_classes, $classes );
497
+	return array_merge($existing_classes, $classes);
498 498
 }
499
-add_filter( 'body_class', 'twentyeleven_layout_classes' );
499
+add_filter('body_class', 'twentyeleven_layout_classes');
500 500
 
501 501
 /**
502 502
  * Implements Twenty Eleven theme options into Customizer
@@ -505,87 +505,87 @@  discard block
 block discarded – undo
505 505
  *
506 506
  * @param object $wp_customize Customizer object.
507 507
  */
508
-function twentyeleven_customize_register( $wp_customize ) {
509
-	$wp_customize->get_setting( 'blogname' )->transport = 'postMessage';
510
-	$wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage';
511
-	$wp_customize->get_setting( 'header_textcolor' )->transport = 'postMessage';
508
+function twentyeleven_customize_register($wp_customize) {
509
+	$wp_customize->get_setting('blogname')->transport = 'postMessage';
510
+	$wp_customize->get_setting('blogdescription')->transport = 'postMessage';
511
+	$wp_customize->get_setting('header_textcolor')->transport = 'postMessage';
512 512
 
513
-	if ( isset( $wp_customize->selective_refresh ) ) {
514
-		$wp_customize->selective_refresh->add_partial( 'blogname', array(
513
+	if (isset($wp_customize->selective_refresh)) {
514
+		$wp_customize->selective_refresh->add_partial('blogname', array(
515 515
 			'selector' => '#site-title a',
516 516
 			'container_inclusive' => false,
517 517
 			'render_callback' => 'twentyeleven_customize_partial_blogname',
518
-		) );
519
-		$wp_customize->selective_refresh->add_partial( 'blogdescription', array(
518
+		));
519
+		$wp_customize->selective_refresh->add_partial('blogdescription', array(
520 520
 			'selector' => '#site-description',
521 521
 			'container_inclusive' => false,
522 522
 			'render_callback' => 'twentyeleven_customize_partial_blogdescription',
523
-		) );
523
+		));
524 524
 	}
525 525
 
526 526
 	$options  = twentyeleven_get_theme_options();
527 527
 	$defaults = twentyeleven_get_default_theme_options();
528 528
 
529
-	$wp_customize->add_setting( 'twentyeleven_theme_options[color_scheme]', array(
529
+	$wp_customize->add_setting('twentyeleven_theme_options[color_scheme]', array(
530 530
 		'default'    => $defaults['color_scheme'],
531 531
 		'type'       => 'option',
532 532
 		'capability' => 'edit_theme_options',
533
-	) );
533
+	));
534 534
 
535 535
 	$schemes = twentyeleven_color_schemes();
536 536
 	$choices = array();
537
-	foreach ( $schemes as $scheme ) {
538
-		$choices[ $scheme['value'] ] = $scheme['label'];
537
+	foreach ($schemes as $scheme) {
538
+		$choices[$scheme['value']] = $scheme['label'];
539 539
 	}
540 540
 
541
-	$wp_customize->add_control( 'twentyeleven_color_scheme', array(
542
-		'label'    => __( 'Color Scheme', 'twentyeleven' ),
541
+	$wp_customize->add_control('twentyeleven_color_scheme', array(
542
+		'label'    => __('Color Scheme', 'twentyeleven'),
543 543
 		'section'  => 'colors',
544 544
 		'settings' => 'twentyeleven_theme_options[color_scheme]',
545 545
 		'type'     => 'radio',
546 546
 		'choices'  => $choices,
547 547
 		'priority' => 5,
548
-	) );
548
+	));
549 549
 
550 550
 	// Link Color (added to Color Scheme section in Customizer)
551
-	$wp_customize->add_setting( 'twentyeleven_theme_options[link_color]', array(
552
-		'default'           => twentyeleven_get_default_link_color( $options['color_scheme'] ),
551
+	$wp_customize->add_setting('twentyeleven_theme_options[link_color]', array(
552
+		'default'           => twentyeleven_get_default_link_color($options['color_scheme']),
553 553
 		'type'              => 'option',
554 554
 		'sanitize_callback' => 'sanitize_hex_color',
555 555
 		'capability'        => 'edit_theme_options',
556
-	) );
556
+	));
557 557
 
558
-	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'link_color', array(
559
-		'label'    => __( 'Link Color', 'twentyeleven' ),
558
+	$wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'link_color', array(
559
+		'label'    => __('Link Color', 'twentyeleven'),
560 560
 		'section'  => 'colors',
561 561
 		'settings' => 'twentyeleven_theme_options[link_color]',
562
-	) ) );
562
+	)));
563 563
 
564 564
 	// Default Layout
565
-	$wp_customize->add_section( 'twentyeleven_layout', array(
566
-		'title'    => __( 'Layout', 'twentyeleven' ),
565
+	$wp_customize->add_section('twentyeleven_layout', array(
566
+		'title'    => __('Layout', 'twentyeleven'),
567 567
 		'priority' => 50,
568
-	) );
568
+	));
569 569
 
570
-	$wp_customize->add_setting( 'twentyeleven_theme_options[theme_layout]', array(
570
+	$wp_customize->add_setting('twentyeleven_theme_options[theme_layout]', array(
571 571
 		'type'              => 'option',
572 572
 		'default'           => $defaults['theme_layout'],
573 573
 		'sanitize_callback' => 'sanitize_key',
574
-	) );
574
+	));
575 575
 
576 576
 	$layouts = twentyeleven_layouts();
577 577
 	$choices = array();
578
-	foreach ( $layouts as $layout ) {
579
-		$choices[ $layout['value'] ] = $layout['label'];
578
+	foreach ($layouts as $layout) {
579
+		$choices[$layout['value']] = $layout['label'];
580 580
 	}
581 581
 
582
-	$wp_customize->add_control( 'twentyeleven_theme_options[theme_layout]', array(
582
+	$wp_customize->add_control('twentyeleven_theme_options[theme_layout]', array(
583 583
 		'section'    => 'twentyeleven_layout',
584 584
 		'type'       => 'radio',
585 585
 		'choices'    => $choices,
586
-	) );
586
+	));
587 587
 }
588
-add_action( 'customize_register', 'twentyeleven_customize_register' );
588
+add_action('customize_register', 'twentyeleven_customize_register');
589 589
 
590 590
 /**
591 591
  * Render the site title for the selective refresh partial.
@@ -596,7 +596,7 @@  discard block
 block discarded – undo
596 596
  * @return void
597 597
  */
598 598
 function twentyeleven_customize_partial_blogname() {
599
-	bloginfo( 'name' );
599
+	bloginfo('name');
600 600
 }
601 601
 
602 602
 /**
@@ -608,7 +608,7 @@  discard block
 block discarded – undo
608 608
  * @return void
609 609
  */
610 610
 function twentyeleven_customize_partial_blogdescription() {
611
-	bloginfo( 'description' );
611
+	bloginfo('description');
612 612
 }
613 613
 
614 614
 /**
@@ -619,6 +619,6 @@  discard block
 block discarded – undo
619 619
  * @since Twenty Eleven 1.3
620 620
  */
621 621
 function twentyeleven_customize_preview_js() {
622
-	wp_enqueue_script( 'twentyeleven-customizer', get_template_directory_uri() . '/inc/theme-customizer.js', array( 'customize-preview' ), '20150401', true );
622
+	wp_enqueue_script('twentyeleven-customizer', get_template_directory_uri().'/inc/theme-customizer.js', array('customize-preview'), '20150401', true);
623 623
 }
624
-add_action( 'customize_preview_init', 'twentyeleven_customize_preview_js' );
624
+add_action('customize_preview_init', 'twentyeleven_customize_preview_js');
Please login to merge, or discard this patch.
src/wp-content/themes/twentyeleven/archive.php 2 patches
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -17,48 +17,48 @@
 block discarded – undo
17 17
 		<section id="primary">
18 18
 			<div id="content" role="main">
19 19
 
20
-			<?php if ( have_posts() ) : ?>
20
+			<?php if (have_posts()) : ?>
21 21
 
22 22
 				<header class="page-header">
23 23
 					<h1 class="page-title">
24
-						<?php if ( is_day() ) : ?>
25
-							<?php printf( __( 'Daily Archives: %s', 'twentyeleven' ), '<span>' . get_the_date() . '</span>' ); ?>
26
-						<?php elseif ( is_month() ) : ?>
27
-							<?php printf( __( 'Monthly Archives: %s', 'twentyeleven' ), '<span>' . get_the_date( _x( 'F Y', 'monthly archives date format', 'twentyeleven' ) ) . '</span>' ); ?>
28
-						<?php elseif ( is_year() ) : ?>
29
-							<?php printf( __( 'Yearly Archives: %s', 'twentyeleven' ), '<span>' . get_the_date( _x( 'Y', 'yearly archives date format', 'twentyeleven' ) ) . '</span>' ); ?>
24
+						<?php if (is_day()) : ?>
25
+							<?php printf(__('Daily Archives: %s', 'twentyeleven'), '<span>'.get_the_date().'</span>'); ?>
26
+						<?php elseif (is_month()) : ?>
27
+							<?php printf(__('Monthly Archives: %s', 'twentyeleven'), '<span>'.get_the_date(_x('F Y', 'monthly archives date format', 'twentyeleven')).'</span>'); ?>
28
+						<?php elseif (is_year()) : ?>
29
+							<?php printf(__('Yearly Archives: %s', 'twentyeleven'), '<span>'.get_the_date(_x('Y', 'yearly archives date format', 'twentyeleven')).'</span>'); ?>
30 30
 						<?php else : ?>
31
-							<?php _e( 'Blog Archives', 'twentyeleven' ); ?>
31
+							<?php _e('Blog Archives', 'twentyeleven'); ?>
32 32
 						<?php endif; ?>
33 33
 					</h1>
34 34
 				</header>
35 35
 
36
-				<?php twentyeleven_content_nav( 'nav-above' ); ?>
36
+				<?php twentyeleven_content_nav('nav-above'); ?>
37 37
 
38 38
 				<?php /* Start the Loop */ ?>
39
-				<?php while ( have_posts() ) : the_post(); ?>
39
+				<?php while (have_posts()) : the_post(); ?>
40 40
 
41 41
 					<?php
42 42
 						/* Include the Post-Format-specific template for the content.
43 43
 						 * If you want to overload this in a child theme then include a file
44 44
 						 * called content-___.php (where ___ is the Post Format name) and that will be used instead.
45 45
 						 */
46
-						get_template_part( 'content', get_post_format() );
46
+						get_template_part('content', get_post_format());
47 47
 					?>
48 48
 
49 49
 				<?php endwhile; ?>
50 50
 
51
-				<?php twentyeleven_content_nav( 'nav-below' ); ?>
51
+				<?php twentyeleven_content_nav('nav-below'); ?>
52 52
 
53 53
 			<?php else : ?>
54 54
 
55 55
 				<article id="post-0" class="post no-results not-found">
56 56
 					<header class="entry-header">
57
-						<h1 class="entry-title"><?php _e( 'Nothing Found', 'twentyeleven' ); ?></h1>
57
+						<h1 class="entry-title"><?php _e('Nothing Found', 'twentyeleven'); ?></h1>
58 58
 					</header><!-- .entry-header -->
59 59
 
60 60
 					<div class="entry-content">
61
-						<p><?php _e( 'Apologies, but no results were found for the requested archive. Perhaps searching will help find a related post.', 'twentyeleven' ); ?></p>
61
+						<p><?php _e('Apologies, but no results were found for the requested archive. Perhaps searching will help find a related post.', 'twentyeleven'); ?></p>
62 62
 						<?php get_search_form(); ?>
63 63
 					</div><!-- .entry-content -->
64 64
 				</article><!-- #post-0 -->
Please login to merge, or discard this patch.
Braces   +10 added lines, -4 removed lines patch added patch discarded remove patch
@@ -27,8 +27,11 @@  discard block
 block discarded – undo
27 27
 							<?php printf( __( 'Monthly Archives: %s', 'twentyeleven' ), '<span>' . get_the_date( _x( 'F Y', 'monthly archives date format', 'twentyeleven' ) ) . '</span>' ); ?>
28 28
 						<?php elseif ( is_year() ) : ?>
29 29
 							<?php printf( __( 'Yearly Archives: %s', 'twentyeleven' ), '<span>' . get_the_date( _x( 'Y', 'yearly archives date format', 'twentyeleven' ) ) . '</span>' ); ?>
30
-						<?php else : ?>
31
-							<?php _e( 'Blog Archives', 'twentyeleven' ); ?>
30
+						<?php else {
31
+	: ?>
32
+							<?php _e( 'Blog Archives', 'twentyeleven' );
33
+}
34
+?>
32 35
 						<?php endif; ?>
33 36
 					</h1>
34 37
 				</header>
@@ -50,11 +53,14 @@  discard block
 block discarded – undo
50 53
 
51 54
 				<?php twentyeleven_content_nav( 'nav-below' ); ?>
52 55
 
53
-			<?php else : ?>
56
+			<?php else {
57
+	: ?>
54 58
 
55 59
 				<article id="post-0" class="post no-results not-found">
56 60
 					<header class="entry-header">
57
-						<h1 class="entry-title"><?php _e( 'Nothing Found', 'twentyeleven' ); ?></h1>
61
+						<h1 class="entry-title"><?php _e( 'Nothing Found', 'twentyeleven' );
62
+}
63
+?></h1>
58 64
 					</header><!-- .entry-header -->
59 65
 
60 66
 					<div class="entry-content">
Please login to merge, or discard this patch.
src/wp-content/themes/twentyeleven/content-status.php 2 patches
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -16,17 +16,17 @@  discard block
 block discarded – undo
16 16
 		<header class="entry-header">
17 17
 			<hgroup>
18 18
 				<h2 class="entry-title"><a href="<?php the_permalink(); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
19
-				<h3 class="entry-format"><?php _e( 'Status', 'twentyeleven' ); ?></h3>
19
+				<h3 class="entry-format"><?php _e('Status', 'twentyeleven'); ?></h3>
20 20
 			</hgroup>
21 21
 
22
-			<?php if ( comments_open() && ! post_password_required() ) : ?>
22
+			<?php if (comments_open() && ! post_password_required()) : ?>
23 23
 			<div class="comments-link">
24
-				<?php comments_popup_link( '<span class="leave-reply">' . __( 'Reply', 'twentyeleven' ) . '</span>', _x( '1', 'comments number', 'twentyeleven' ), _x( '%', 'comments number', 'twentyeleven' ) ); ?>
24
+				<?php comments_popup_link('<span class="leave-reply">'.__('Reply', 'twentyeleven').'</span>', _x('1', 'comments number', 'twentyeleven'), _x('%', 'comments number', 'twentyeleven')); ?>
25 25
 			</div>
26 26
 			<?php endif; ?>
27 27
 		</header><!-- .entry-header -->
28 28
 
29
-		<?php if ( is_search() ) : // Only display Excerpts for Search ?>
29
+		<?php if (is_search()) : // Only display Excerpts for Search ?>
30 30
 		<div class="entry-summary">
31 31
 			<?php the_excerpt(); ?>
32 32
 		</div><!-- .entry-summary -->
@@ -41,21 +41,21 @@  discard block
 block discarded – undo
41 41
 				 *
42 42
 				 * @param int The height and width avatar dimensions in pixels. Default 65.
43 43
 				 */
44
-				echo get_avatar( get_the_author_meta( 'ID' ), apply_filters( 'twentyeleven_status_avatar', 65 ) );
44
+				echo get_avatar(get_the_author_meta('ID'), apply_filters('twentyeleven_status_avatar', 65));
45 45
 				?>
46 46
 			</div>
47 47
 
48
-			<?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentyeleven' ) ); ?>
49
-			<?php wp_link_pages( array( 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'twentyeleven' ) . '</span>', 'after' => '</div>' ) ); ?>
48
+			<?php the_content(__('Continue reading <span class="meta-nav">&rarr;</span>', 'twentyeleven')); ?>
49
+			<?php wp_link_pages(array('before' => '<div class="page-link"><span>'.__('Pages:', 'twentyeleven').'</span>', 'after' => '</div>')); ?>
50 50
 		</div><!-- .entry-content -->
51 51
 		<?php endif; ?>
52 52
 
53 53
 		<footer class="entry-meta">
54 54
 			<?php twentyeleven_posted_on(); ?>
55
-			<?php if ( comments_open() ) : ?>
55
+			<?php if (comments_open()) : ?>
56 56
 			<span class="sep"> | </span>
57
-			<span class="comments-link"><?php comments_popup_link( '<span class="leave-reply">' . __( 'Leave a reply', 'twentyeleven' ) . '</span>', __( '<b>1</b> Reply', 'twentyeleven' ), __( '<b>%</b> Replies', 'twentyeleven' ) ); ?></span>
57
+			<span class="comments-link"><?php comments_popup_link('<span class="leave-reply">'.__('Leave a reply', 'twentyeleven').'</span>', __('<b>1</b> Reply', 'twentyeleven'), __('<b>%</b> Replies', 'twentyeleven')); ?></span>
58 58
 			<?php endif; ?>
59
-			<?php edit_post_link( __( 'Edit', 'twentyeleven' ), '<span class="edit-link">', '</span>' ); ?>
59
+			<?php edit_post_link(__('Edit', 'twentyeleven'), '<span class="edit-link">', '</span>'); ?>
60 60
 		</footer><!-- .entry-meta -->
61 61
 	</article><!-- #post-<?php the_ID(); ?> -->
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,8 @@  discard block
 block discarded – undo
30 30
 		<div class="entry-summary">
31 31
 			<?php the_excerpt(); ?>
32 32
 		</div><!-- .entry-summary -->
33
-		<?php else : ?>
33
+		<?php else {
34
+	: ?>
34 35
 		<div class="entry-content">
35 36
 			<div class="avatar">
36 37
 				<?php
@@ -42,6 +43,7 @@  discard block
 block discarded – undo
42 43
 				 * @param int The height and width avatar dimensions in pixels. Default 65.
43 44
 				 */
44 45
 				echo get_avatar( get_the_author_meta( 'ID' ), apply_filters( 'twentyeleven_status_avatar', 65 ) );
46
+}
45 47
 				?>
46 48
 			</div>
47 49
 
Please login to merge, or discard this patch.
src/wp-content/themes/twentyeleven/author.php 2 patches
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
12 12
 		<section id="primary">
13 13
 			<div id="content" role="main">
14 14
 
15
-			<?php if ( have_posts() ) : ?>
15
+			<?php if (have_posts()) : ?>
16 16
 
17 17
 				<?php
18 18
 					/*
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
 				?>
27 27
 
28 28
 				<header class="page-header">
29
-					<h1 class="page-title author"><?php printf( __( 'Author Archives: %s', 'twentyeleven' ), '<span class="vcard"><a class="url fn n" href="' . esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ) . '" title="' . esc_attr( get_the_author() ) . '" rel="me">' . get_the_author() . '</a></span>' ); ?></h1>
29
+					<h1 class="page-title author"><?php printf(__('Author Archives: %s', 'twentyeleven'), '<span class="vcard"><a class="url fn n" href="'.esc_url(get_author_posts_url(get_the_author_meta('ID'))).'" title="'.esc_attr(get_the_author()).'" rel="me">'.get_the_author().'</a></span>'); ?></h1>
30 30
 				</header>
31 31
 
32 32
 				<?php
@@ -38,11 +38,11 @@  discard block
 block discarded – undo
38 38
 					rewind_posts();
39 39
 				?>
40 40
 
41
-				<?php twentyeleven_content_nav( 'nav-above' ); ?>
41
+				<?php twentyeleven_content_nav('nav-above'); ?>
42 42
 
43 43
 				<?php
44 44
 				// If a user has filled out their description, show a bio on their entries.
45
-				if ( get_the_author_meta( 'description' ) ) : ?>
45
+				if (get_the_author_meta('description')) : ?>
46 46
 				<div id="author-info">
47 47
 					<div id="author-avatar">
48 48
 						<?php
@@ -53,18 +53,18 @@  discard block
 block discarded – undo
53 53
 						 *
54 54
 						 * @param int The height and width avatar dimension in pixels. Default 60.
55 55
 						 */
56
-						echo get_avatar( get_the_author_meta( 'user_email' ), apply_filters( 'twentyeleven_author_bio_avatar_size', 60 ) );
56
+						echo get_avatar(get_the_author_meta('user_email'), apply_filters('twentyeleven_author_bio_avatar_size', 60));
57 57
 						?>
58 58
 					</div><!-- #author-avatar -->
59 59
 					<div id="author-description">
60
-						<h2><?php printf( __( 'About %s', 'twentyeleven' ), get_the_author() ); ?></h2>
61
-						<?php the_author_meta( 'description' ); ?>
60
+						<h2><?php printf(__('About %s', 'twentyeleven'), get_the_author()); ?></h2>
61
+						<?php the_author_meta('description'); ?>
62 62
 					</div><!-- #author-description	-->
63 63
 				</div><!-- #author-info -->
64 64
 				<?php endif; ?>
65 65
 
66 66
 				<?php /* Start the Loop */ ?>
67
-				<?php while ( have_posts() ) : the_post(); ?>
67
+				<?php while (have_posts()) : the_post(); ?>
68 68
 
69 69
 					<?php
70 70
 						/*
@@ -72,22 +72,22 @@  discard block
 block discarded – undo
72 72
 						 * If you want to overload this in a child theme then include a file
73 73
 						 * called content-___.php (where ___ is the Post Format name) and that will be used instead.
74 74
 						 */
75
-						get_template_part( 'content', get_post_format() );
75
+						get_template_part('content', get_post_format());
76 76
 					?>
77 77
 
78 78
 				<?php endwhile; ?>
79 79
 
80
-				<?php twentyeleven_content_nav( 'nav-below' ); ?>
80
+				<?php twentyeleven_content_nav('nav-below'); ?>
81 81
 
82 82
 			<?php else : ?>
83 83
 
84 84
 				<article id="post-0" class="post no-results not-found">
85 85
 					<header class="entry-header">
86
-						<h1 class="entry-title"><?php _e( 'Nothing Found', 'twentyeleven' ); ?></h1>
86
+						<h1 class="entry-title"><?php _e('Nothing Found', 'twentyeleven'); ?></h1>
87 87
 					</header><!-- .entry-header -->
88 88
 
89 89
 					<div class="entry-content">
90
-						<p><?php _e( 'Apologies, but no results were found for the requested archive. Perhaps searching will help find a related post.', 'twentyeleven' ); ?></p>
90
+						<p><?php _e('Apologies, but no results were found for the requested archive. Perhaps searching will help find a related post.', 'twentyeleven'); ?></p>
91 91
 						<?php get_search_form(); ?>
92 92
 					</div><!-- .entry-content -->
93 93
 				</article><!-- #post-0 -->
Please login to merge, or discard this patch.
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -30,11 +30,14 @@
 block discarded – undo
30 30
 
31 31
 				<?php twentyeleven_content_nav( 'nav-below' ); ?>
32 32
 
33
-			<?php else : ?>
33
+			<?php else {
34
+	: ?>
34 35
 
35 36
 				<article id="post-0" class="post no-results not-found">
36 37
 					<header class="entry-header">
37
-						<h1 class="entry-title"><?php _e( 'Nothing Found', 'twentyeleven' ); ?></h1>
38
+						<h1 class="entry-title"><?php _e( 'Nothing Found', 'twentyeleven' );
39
+}
40
+?></h1>
38 41
 					</header><!-- .entry-header -->
39 42
 
40 43
 					<div class="entry-content">
Please login to merge, or discard this patch.