Passed
Branch dev (fcb29f)
by Eric
03:00
created
404.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -7,34 +7,34 @@  discard block
 block discarded – undo
7 7
  * @package bitsy
8 8
  */
9 9
 
10
-<section class="error-404 not-found">
11
-	<header class="page-header">
12
-		<h1 class="page-title"><?php esc_html_e( 'Oops! That page can&rsquo;t be found.', 'bitsy' ); ?></h1>
10
+<section class = "error-404 not-found">
11
+	<header class = "page-header">
12
+		<h1 class = "page-title">< ?php esc_html_e('Oops! That page can&rsquo;t be found.', 'bitsy'); ?></h1>
13 13
 	</header><!-- .page-header -->
14 14
 
15 15
 	<div class="page-content">
16
-		<p><?php esc_html_e( 'It looks like nothing was found at this location. Maybe try one of the links below or a search?', 'bitsy' ); ?></p>
16
+		<p><?php esc_html_e('It looks like nothing was found at this location. Maybe try one of the links below or a search?', 'bitsy'); ?></p>
17 17
 
18 18
 		<?php
19 19
 			get_search_form();
20 20
 
21
-			the_widget( 'WP_Widget_Recent_Posts' );
21
+			the_widget('WP_Widget_Recent_Posts');
22 22
 
23 23
 			// Only show the widget if site has multiple categories.
24
-			if ( bitsy_categorized_blog() ) :
24
+			if (bitsy_categorized_blog()) :
25 25
 		?>
26 26
 
27 27
 		<div class="widget widget_categories">
28
-			<h2 class="widget-title"><?php esc_html_e( 'Most Used Categories', 'bitsy' ); ?></h2>
28
+			<h2 class="widget-title"><?php esc_html_e('Most Used Categories', 'bitsy'); ?></h2>
29 29
 			<ul>
30 30
 			<?php
31
-				wp_list_categories( array(
31
+				wp_list_categories(array(
32 32
 					'orderby'    => 'count',
33 33
 					'order'      => 'DESC',
34 34
 					'show_count' => 1,
35 35
 					'title_li'   => '',
36 36
 					'number'     => 10,
37
-				) );
37
+				));
38 38
 			?>
39 39
 			</ul>
40 40
 		</div><!-- .widget -->
@@ -43,10 +43,10 @@  discard block
 block discarded – undo
43 43
 			endif;
44 44
 
45 45
 			/* translators: %1$s: smiley */
46
-			$archive_content = '<p>' . sprintf( esc_html__( 'Try looking in the monthly archives. %1$s', 'bitsy' ), convert_smilies( ':)' ) ) . '</p>';
47
-			the_widget( 'WP_Widget_Archives', 'dropdown=1', "after_title=</h2>$archive_content" );
46
+			$archive_content = '<p>' . sprintf(esc_html__('Try looking in the monthly archives. %1$s', 'bitsy'), convert_smilies(':)')) . '</p>';
47
+			the_widget('WP_Widget_Archives', 'dropdown=1', "after_title=</h2>$archive_content");
48 48
 
49
-			the_widget( 'WP_Widget_Tag_Cloud' );
49
+			the_widget('WP_Widget_Tag_Cloud');
50 50
 		?>
51 51
 
52 52
 	</div><!-- .page-content -->
Please login to merge, or discard this patch.
footer.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -16,9 +16,9 @@
 block discarded – undo
16 16
 	<footer id="footer" class="site-footer" role="contentinfo">
17 17
 		<div class="container">
18 18
 
19
-			<?php get_template_part( 'components/footer/footer', 'widgets' ); ?>
19
+			<?php get_template_part('components/footer/footer', 'widgets'); ?>
20 20
 	
21
-			<?php get_template_part( 'components/footer/site', 'info' ); ?>
21
+			<?php get_template_part('components/footer/site', 'info'); ?>
22 22
 
23 23
 		</div>
24 24
 	</footer><!-- #footer -->
Please login to merge, or discard this patch.
comments.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
  * the visitor has not yet entered the password we will
16 16
  * return early without loading the comments.
17 17
  */
18
-if ( post_password_required() ) {
18
+if (post_password_required()) {
19 19
 	return;
20 20
 }
21 21
 ?>
@@ -24,24 +24,24 @@  discard block
 block discarded – undo
24 24
 
25 25
 	<?php
26 26
 	// You can start editing here -- including this comment!
27
-	if ( have_comments() ) : ?>
27
+	if (have_comments()) : ?>
28 28
 		<h2 class="comments-title">
29 29
 			<?php
30 30
 				printf( // WPCS: XSS OK.
31
-					esc_html( _nx( 'One thought on &ldquo;%2$s&rdquo;', '%1$s thoughts on &ldquo;%2$s&rdquo;', get_comments_number(), 'comments title', 'bitsy' ) ),
32
-					number_format_i18n( get_comments_number() ),
31
+					esc_html(_nx('One thought on &ldquo;%2$s&rdquo;', '%1$s thoughts on &ldquo;%2$s&rdquo;', get_comments_number(), 'comments title', 'bitsy')),
32
+					number_format_i18n(get_comments_number()),
33 33
 					'<span>' . get_the_title() . '</span>'
34 34
 				);
35 35
 			?>
36 36
 		</h2>
37 37
 
38
-		<?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : // Are there comments to navigate through? ?>
38
+		<?php if (get_comment_pages_count()>1 && get_option('page_comments')) : // Are there comments to navigate through? ?>
39 39
 		<nav id="comment-nav-above" class="navigation comment-navigation" role="navigation">
40
-			<h2 class="screen-reader-text"><?php esc_html_e( 'Comment navigation', 'bitsy' ); ?></h2>
40
+			<h2 class="screen-reader-text"><?php esc_html_e('Comment navigation', 'bitsy'); ?></h2>
41 41
 			<div class="nav-links">
42 42
 
43
-				<div class="nav-previous"><?php previous_comments_link( esc_html__( 'Older Comments', 'bitsy' ) ); ?></div>
44
-				<div class="nav-next"><?php next_comments_link( esc_html__( 'Newer Comments', 'bitsy' ) ); ?></div>
43
+				<div class="nav-previous"><?php previous_comments_link(esc_html__('Older Comments', 'bitsy')); ?></div>
44
+				<div class="nav-next"><?php next_comments_link(esc_html__('Newer Comments', 'bitsy')); ?></div>
45 45
 
46 46
 			</div><!-- .nav-links -->
47 47
 		</nav><!-- #comment-nav-above -->
@@ -49,20 +49,20 @@  discard block
 block discarded – undo
49 49
 
50 50
 		<ol class="comment-list">
51 51
 			<?php
52
-				wp_list_comments( array(
52
+				wp_list_comments(array(
53 53
 					'style'      => 'ol',
54 54
 					'short_ping' => true,
55
-				) );
55
+				));
56 56
 			?>
57 57
 		</ol><!-- .comment-list -->
58 58
 
59
-		<?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : // Are there comments to navigate through? ?>
59
+		<?php if (get_comment_pages_count()>1 && get_option('page_comments')) : // Are there comments to navigate through? ?>
60 60
 		<nav id="comment-nav-below" class="navigation comment-navigation" role="navigation">
61
-			<h2 class="screen-reader-text"><?php esc_html_e( 'Comment navigation', 'bitsy' ); ?></h2>
61
+			<h2 class="screen-reader-text"><?php esc_html_e('Comment navigation', 'bitsy'); ?></h2>
62 62
 			<div class="nav-links">
63 63
 
64
-				<div class="nav-previous"><?php previous_comments_link( esc_html__( 'Older Comments', 'bitsy' ) ); ?></div>
65
-				<div class="nav-next"><?php next_comments_link( esc_html__( 'Newer Comments', 'bitsy' ) ); ?></div>
64
+				<div class="nav-previous"><?php previous_comments_link(esc_html__('Older Comments', 'bitsy')); ?></div>
65
+				<div class="nav-next"><?php next_comments_link(esc_html__('Newer Comments', 'bitsy')); ?></div>
66 66
 
67 67
 			</div><!-- .nav-links -->
68 68
 		</nav><!-- #comment-nav-below -->
@@ -73,9 +73,9 @@  discard block
 block discarded – undo
73 73
 
74 74
 
75 75
 	// If comments are closed and there are comments, let's leave a little note, shall we?
76
-	if ( ! comments_open() && get_comments_number() && post_type_supports( get_post_type(), 'comments' ) ) : ?>
76
+	if ( ! comments_open() && get_comments_number() && post_type_supports(get_post_type(), 'comments')) : ?>
77 77
 
78
-		<p class="no-comments"><?php esc_html_e( 'Comments are closed.', 'bitsy' ); ?></p>
78
+		<p class="no-comments"><?php esc_html_e('Comments are closed.', 'bitsy'); ?></p>
79 79
 	<?php
80 80
 	endif;
81 81
 
Please login to merge, or discard this patch.
index.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -12,9 +12,9 @@  discard block
 block discarded – undo
12 12
  * @package bitsy
13 13
  */
14 14
 
15
-if ( have_posts() ) :
15
+if (have_posts()) :
16 16
 
17
-	if ( is_home() && ! is_front_page() ) : ?>
17
+	if (is_home() && ! is_front_page()) : ?>
18 18
 		<header>
19 19
 			<h1 class="page-title screen-reader-text"><?php single_post_title(); ?></h1>
20 20
 		</header>
@@ -23,14 +23,14 @@  discard block
 block discarded – undo
23 23
 	endif;
24 24
 
25 25
 	/* Start the Loop */
26
-	while ( have_posts() ) : the_post();
26
+	while (have_posts()) : the_post();
27 27
 
28 28
 		/*
29 29
 		 * Include the Post-Format-specific template for the content.
30 30
 		 * If you want to override this in a child theme, then include a file
31 31
 		 * called content-___.php (where ___ is the Post Format name) and that will be used instead.
32 32
 		 */
33
-		get_template_part( 'components/post/content', get_post_format() );
33
+		get_template_part('components/post/content', get_post_format());
34 34
 
35 35
 	endwhile;
36 36
 
@@ -38,6 +38,6 @@  discard block
 block discarded – undo
38 38
 
39 39
 else :
40 40
 
41
-	get_template_part( 'components/post/content', 'none' );
41
+	get_template_part('components/post/content', 'none');
42 42
 
43 43
 endif;
44 44
\ No newline at end of file
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,8 +36,10 @@
 block discarded – undo
36 36
 
37 37
 	the_posts_navigation();
38 38
 
39
-else :
39
+else {
40
+	:
40 41
 
41 42
 	get_template_part( 'components/post/content', 'none' );
43
+}
42 44
 
43 45
 endif;
44 46
\ No newline at end of file
Please login to merge, or discard this patch.
archive.php 2 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -7,25 +7,25 @@  discard block
 block discarded – undo
7 7
  * @package bitsy
8 8
  */
9 9
 
10
-if ( have_posts() ) : ?>
10
+if (have_posts()) : ?>
11 11
 
12 12
 	<header class="page-header">
13 13
 		<?php
14
-			the_archive_title( '<h1 class="page-title">', '</h1>' );
15
-			the_archive_description( '<div class="archive-description">', '</div>' );
14
+			the_archive_title('<h1 class="page-title">', '</h1>');
15
+			the_archive_description('<div class="archive-description">', '</div>');
16 16
 		?>
17 17
 	</header><!-- .page-header -->
18 18
 
19 19
 	<?php
20 20
 	/* Start the Loop */
21
-	while ( have_posts() ) : the_post();
21
+	while (have_posts()) : the_post();
22 22
 
23 23
 		/*
24 24
 		 * Include the Post-Format-specific template for the content.
25 25
 		 * If you want to override this in a child theme, then include a file
26 26
 		 * called content-___.php (where ___ is the Post Format name) and that will be used instead.
27 27
 		 */
28
-		get_template_part( 'components/post/content', get_post_format() );
28
+		get_template_part('components/post/content', get_post_format());
29 29
 
30 30
 	endwhile;
31 31
 
@@ -33,6 +33,6 @@  discard block
 block discarded – undo
33 33
 
34 34
 else :
35 35
 
36
-	get_template_part( 'components/post/content', 'none' );
36
+	get_template_part('components/post/content', 'none');
37 37
 
38 38
 endif;
39 39
\ No newline at end of file
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,8 +31,10 @@
 block discarded – undo
31 31
 
32 32
 	the_posts_navigation();
33 33
 
34
-else :
34
+else {
35
+	:
35 36
 
36 37
 	get_template_part( 'components/post/content', 'none' );
38
+}
37 39
 
38 40
 endif;
39 41
\ No newline at end of file
Please login to merge, or discard this patch.
inc/extras.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -13,27 +13,27 @@
 block discarded – undo
13 13
  * @param array $classes Classes for the body element.
14 14
  * @return array
15 15
  */
16
-function bitsy_body_classes( $classes ) {
16
+function bitsy_body_classes($classes) {
17 17
 	// Adds a class of group-blog to blogs with more than 1 published author.
18
-	if ( is_multi_author() ) {
18
+	if (is_multi_author()) {
19 19
 		$classes[] = 'group-blog';
20 20
 	}
21 21
 
22 22
 	// Adds a class of hfeed to non-singular pages.
23
-	if ( ! is_singular() ) {
23
+	if ( ! is_singular()) {
24 24
 		$classes[] = 'hfeed';
25 25
 	}
26 26
 
27 27
 	return $classes;
28 28
 }
29
-add_filter( 'body_class', 'bitsy_body_classes' );
29
+add_filter('body_class', 'bitsy_body_classes');
30 30
 
31 31
 /**
32 32
  * Add a pingback url auto-discovery header for singularly identifiable articles.
33 33
  */
34 34
 function bitsy_pingback_header() {
35
-	if ( is_singular() && pings_open() ) {
36
-		echo '<link rel="pingback" href="', bloginfo( 'pingback_url' ), '">';
35
+	if (is_singular() && pings_open()) {
36
+		echo '<link rel="pingback" href="', bloginfo('pingback_url'), '">';
37 37
 	}
38 38
 }
39
-add_action( 'wp_head', 'bitsy_pingback_header' );
39
+add_action('wp_head', 'bitsy_pingback_header');
Please login to merge, or discard this patch.
inc/custom-header.php 2 patches
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -21,18 +21,18 @@  discard block
 block discarded – undo
21 21
  * @uses bitsy_header_style()
22 22
  */
23 23
 function bitsy_custom_header_setup() {
24
-	add_theme_support( 'custom-header', apply_filters( 'bitsy_custom_header_args', array(
24
+	add_theme_support('custom-header', apply_filters('bitsy_custom_header_args', array(
25 25
 		'default-image'          => '',
26 26
 		'default-text-color'     => '000000',
27 27
 		'width'                  => 1000,
28 28
 		'height'                 => 250,
29 29
 		'flex-height'            => true,
30 30
 		'wp-head-callback'       => 'bitsy_header_style',
31
-	) ) );
31
+	)));
32 32
 }
33
-add_action( 'after_setup_theme', 'bitsy_custom_header_setup' );
33
+add_action('after_setup_theme', 'bitsy_custom_header_setup');
34 34
 
35
-if ( ! function_exists( 'bitsy_header_style' ) ) :
35
+if ( ! function_exists('bitsy_header_style')) :
36 36
 /**
37 37
  * Styles the header image and text displayed on the blog.
38 38
  *
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
 	 * If no custom options for text are set, let's bail.
46 46
 	 * get_header_textcolor() options: Any hex value, 'blank' to hide text. Default: HEADER_TEXTCOLOR.
47 47
 	 */
48
-	if ( HEADER_TEXTCOLOR === $header_text_color ) {
48
+	if (HEADER_TEXTCOLOR === $header_text_color) {
49 49
 		return;
50 50
 	}
51 51
 
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
 	<style type="text/css">
55 55
 	<?php
56 56
 		// Has the text been hidden?
57
-		if ( ! display_header_text() ) :
57
+		if ( ! display_header_text()) :
58 58
 	?>
59 59
 		.site-title,
60 60
 		.site-description {
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
 	?>
68 68
 		.site-title a,
69 69
 		.site-description {
70
-			color: #<?php echo esc_attr( $header_text_color ); ?>;
70
+			color: #<?php echo esc_attr($header_text_color); ?>;
71 71
 		}
72 72
 	<?php endif; ?>
73 73
 	</style>
Please login to merge, or discard this patch.
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -63,11 +63,14 @@
 block discarded – undo
63 63
 		}
64 64
 	<?php
65 65
 		// If the user has set a custom color for the text use that.
66
-		else :
66
+		else {
67
+			:
67 68
 	?>
68 69
 		.site-title a,
69 70
 		.site-description {
70
-			color: #<?php echo esc_attr( $header_text_color ); ?>;
71
+			color: #<?php echo esc_attr( $header_text_color );
72
+		}
73
+		?>;
71 74
 		}
72 75
 	<?php endif; ?>
73 76
 	</style>
Please login to merge, or discard this patch.
inc/jetpack.php 2 patches
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -15,27 +15,27 @@
 block discarded – undo
15 15
  */
16 16
 function bitsy_jetpack_setup() {
17 17
 	// Add theme support for Infinite Scroll.
18
-	add_theme_support( 'infinite-scroll', array(
18
+	add_theme_support('infinite-scroll', array(
19 19
 		'container' => 'main',
20 20
 		'render'    => 'bitsy_infinite_scroll_render',
21 21
 		'footer'    => 'page',
22
-	) );
22
+	));
23 23
 
24 24
 	// Add theme support for Responsive Videos.
25
-	add_theme_support( 'jetpack-responsive-videos' );
25
+	add_theme_support('jetpack-responsive-videos');
26 26
 }
27
-add_action( 'after_setup_theme', 'bitsy_jetpack_setup' );
27
+add_action('after_setup_theme', 'bitsy_jetpack_setup');
28 28
 
29 29
 /**
30 30
  * Custom render function for Infinite Scroll.
31 31
  */
32 32
 function bitsy_infinite_scroll_render() {
33
-	while ( have_posts() ) {
33
+	while (have_posts()) {
34 34
 		the_post();
35
-		if ( is_search() ) :
36
-			get_template_part( 'components/post/content', 'search' );
35
+		if (is_search()) :
36
+			get_template_part('components/post/content', 'search');
37 37
 		else :
38
-			get_template_part( 'components/post/content', get_post_format() );
38
+			get_template_part('components/post/content', get_post_format());
39 39
 		endif;
40 40
 	}
41 41
 }
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,8 +34,10 @@
 block discarded – undo
34 34
 		the_post();
35 35
 		if ( is_search() ) :
36 36
 			get_template_part( 'components/post/content', 'search' );
37
-		else :
37
+		else {
38
+			:
38 39
 			get_template_part( 'components/post/content', get_post_format() );
40
+		}
39 41
 		endif;
40 42
 	}
41 43
 }
Please login to merge, or discard this patch.
inc/theme-wrapper.php 2 patches
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -30,21 +30,21 @@
 block discarded – undo
30 30
 		 */
31 31
 		static $base;
32 32
 
33
-		static function wrap( $template ) {
33
+		static function wrap($template) {
34 34
 			self::$main_template = $template;
35 35
 
36
-			self::$base = substr( basename( self::$main_template ), 0, -4 );
36
+			self::$base = substr(basename(self::$main_template), 0, -4);
37 37
 
38
-			if ( 'index' == self::$base )
38
+			if ('index' == self::$base)
39 39
 				self::$base = false;
40 40
 
41
-			$templates = array( 'wrapper.php' );
41
+			$templates = array('wrapper.php');
42 42
 
43
-			if ( self::$base )
44
-				array_unshift( $templates, sprintf( 'wrapper-%s.php', self::$base ) );
43
+			if (self::$base)
44
+				array_unshift($templates, sprintf('wrapper-%s.php', self::$base));
45 45
 
46
-			return locate_template( $templates );
46
+			return locate_template($templates);
47 47
 		}
48 48
 	}
49 49
 
50
-	add_filter( 'template_include', array( 'Bitsy_Wrapping', 'wrap' ), 99 );
51 50
\ No newline at end of file
51
+	add_filter('template_include', array('Bitsy_Wrapping', 'wrap'), 99);
52 52
\ No newline at end of file
Please login to merge, or discard this patch.
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -35,13 +35,15 @@
 block discarded – undo
35 35
 
36 36
 			self::$base = substr( basename( self::$main_template ), 0, -4 );
37 37
 
38
-			if ( 'index' == self::$base )
39
-				self::$base = false;
38
+			if ( 'index' == self::$base ) {
39
+							self::$base = false;
40
+			}
40 41
 
41 42
 			$templates = array( 'wrapper.php' );
42 43
 
43
-			if ( self::$base )
44
-				array_unshift( $templates, sprintf( 'wrapper-%s.php', self::$base ) );
44
+			if ( self::$base ) {
45
+							array_unshift( $templates, sprintf( 'wrapper-%s.php', self::$base ) );
46
+			}
45 47
 
46 48
 			return locate_template( $templates );
47 49
 		}
Please login to merge, or discard this patch.