Passed
Push — master ( fc82b5...704b83 )
by SILENT
02:25
created
content-link.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -12,20 +12,20 @@
 block discarded – undo
12 12
 	<div class="wrap">
13 13
 		<header class="entry-header">
14 14
 			<?php
15
-				$categories_list = get_the_category_list( __( ', ', 'strip' ) ); ?>
15
+				$categories_list = get_the_category_list(__(', ', 'strip')); ?>
16 16
 
17 17
 		</header><!-- .entry-header -->
18 18
 
19 19
 		<footer class="entry-meta">
20 20
 			<?php strip_entry_meta(); ?>
21 21
 
22
-			<span class="entry-format"><a href="<?php echo esc_url( get_post_format_link( 'link' ) ); ?>" title="<?php echo esc_attr( sprintf( __( 'All %s posts', 'strip' ), get_post_format_string( 'link' ) ) ); ?>"><?php echo esc_html( get_post_format_string( 'link' ) ); ?></a></span>
22
+			<span class="entry-format"><a href="<?php echo esc_url(get_post_format_link('link')); ?>" title="<?php echo esc_attr(sprintf(__('All %s posts', 'strip'), get_post_format_string('link'))); ?>"><?php echo esc_html(get_post_format_string('link')); ?></a></span>
23 23
 
24
-			<?php edit_post_link( __( 'Edit', 'strip' ), '<span class="edit-link">', '</span>' ); ?>
24
+			<?php edit_post_link(__('Edit', 'strip'), '<span class="edit-link">', '</span>'); ?>
25 25
 		</footer><!-- .entry-meta -->
26 26
 
27 27
 		<div class="entry-content">
28
-			<?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'strip' ) ); ?>
28
+			<?php the_content(__('Continue reading <span class="meta-nav">&rarr;</span>', 'strip')); ?>
29 29
 
30 30
 			</div><!-- .entry-content -->
31 31
 		</div><!-- .entry-wrap -->
Please login to merge, or discard this patch.
content-quote.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -12,19 +12,19 @@
 block discarded – undo
12 12
 	<div class="wrap">
13 13
 		<header class="entry-header">
14 14
 	<?php
15
-				$categories_list = get_the_category_list( __( ', ', 'strip' ) ); ?>
15
+				$categories_list = get_the_category_list(__(', ', 'strip')); ?>
16 16
 
17 17
 		</header><!-- .entry-header -->
18 18
 
19 19
 		<footer class="entry-meta">
20 20
 
21
-			<span class="entry-format"><a href="<?php echo esc_url( get_post_format_link( 'quote' ) ); ?>" title="<?php echo esc_attr( sprintf( __( 'All %s posts', 'strip' ), get_post_format_string( 'quote' ) ) ); ?>"><?php echo esc_html( get_post_format_string( 'quote' ) ); ?></a></span>
21
+			<span class="entry-format"><a href="<?php echo esc_url(get_post_format_link('quote')); ?>" title="<?php echo esc_attr(sprintf(__('All %s posts', 'strip'), get_post_format_string('quote'))); ?>"><?php echo esc_html(get_post_format_string('quote')); ?></a></span>
22 22
 
23
-	<?php edit_post_link( __( 'Edit', 'strip' ), '<span class="edit-link">', '</span>' ); ?>
23
+	<?php edit_post_link(__('Edit', 'strip'), '<span class="edit-link">', '</span>'); ?>
24 24
 		</footer><!-- .entry-meta -->
25 25
 
26 26
 		<div class="entry-content">
27
-	<?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'strip' ) ); ?>
27
+	<?php the_content(__('Continue reading <span class="meta-nav">&rarr;</span>', 'strip')); ?>
28 28
 
29 29
 		</div><!-- .entry-content -->
30 30
 		</div><!-- .entry-wrap -->
Please login to merge, or discard this patch.
comments.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
  * the visitor has not yet entered the password we will
19 19
  * return early without loading the comments.
20 20
  */
21
-if ( post_password_required() ) {
21
+if (post_password_required()) {
22 22
 	return;
23 23
 }
24 24
 ?>
@@ -27,13 +27,13 @@  discard block
 block discarded – undo
27 27
 
28 28
 	<?php
29 29
 	// You can start editing here -- including this comment!
30
-	if ( have_comments() ) : ?>
30
+	if (have_comments()) : ?>
31 31
 		<h2 class="comments-title">
32 32
 			<?php
33 33
 				$comments_number = get_comments_number();
34
-			if ( '1' === $comments_number ) {
34
+			if ('1' === $comments_number) {
35 35
 				/* translators: %s: post title */
36
-				printf( esc_html_x( 'One Reply to &ldquo;%s&rdquo;', 'comments title', 'strip' ), get_the_title() );
36
+				printf(esc_html_x('One Reply to &ldquo;%s&rdquo;', 'comments title', 'strip'), get_the_title());
37 37
 			} else {
38 38
 				printf(
39 39
 					esc_attr(
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
 							'strip'
47 47
 						)
48 48
 					),
49
-					number_format_i18n( $comments_number ),
49
+					number_format_i18n($comments_number),
50 50
 					get_the_title()
51 51
 				);
52 52
 			}
@@ -55,26 +55,26 @@  discard block
 block discarded – undo
55 55
 
56 56
 		<ol class="comment-list">
57 57
 			<?php
58
-				wp_list_comments( array(
58
+				wp_list_comments(array(
59 59
 					'avatar_size' => 96,
60 60
 					'style'       => 'ol',
61 61
 					'short_ping'  => true,
62
-					'reply_text'  => __( 'Reply', 'strip' ),
63
-				) );
62
+					'reply_text'  => __('Reply', 'strip'),
63
+				));
64 64
 			?>
65 65
 		</ol>
66 66
 
67
-		<?php the_comments_pagination( array(
68
-			'prev_text' => '<span class="screen-reader-text">' . __( 'Previous', 'strip' ) . '</span>',
69
-			'next_text' => '<span class="screen-reader-text">' . __( 'Next', 'strip' ) . '</span>',
70
-		) );
67
+		<?php the_comments_pagination(array(
68
+			'prev_text' => '<span class="screen-reader-text">' . __('Previous', 'strip') . '</span>',
69
+			'next_text' => '<span class="screen-reader-text">' . __('Next', 'strip') . '</span>',
70
+		));
71 71
 
72 72
 	endif; // Check for have_comments().
73 73
 
74 74
 	// If comments are closed and there are comments, let's leave a little note, shall we?
75
-	if ( ! comments_open() && get_comments_number() && post_type_supports( get_post_type(), 'comments' ) ) : ?>
75
+	if ( ! comments_open() && get_comments_number() && post_type_supports(get_post_type(), 'comments')) : ?>
76 76
 
77
-		<p class="no-comments"><?php esc_html_e( 'Comments are closed.', 'strip' ); ?></p>
77
+		<p class="no-comments"><?php esc_html_e('Comments are closed.', 'strip'); ?></p>
78 78
 	<?php
79 79
 	endif;
80 80
 
Please login to merge, or discard this patch.
content.php 2 patches
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -10,24 +10,24 @@  discard block
 block discarded – undo
10 10
 
11 11
 <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
12 12
 	<div class="wrap">
13
-			<?php if ( '' !== get_the_post_thumbnail() && ! is_single() ) : ?>
14
-			<a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( sprintf( __( 'Permalink to %s', 'strip' ), the_title_attribute( 'echo=0' ) ) ); ?>" rel="<?php the_ID(); ?>" class="strip-featured-thumbnail">
15
-				<?php the_post_thumbnail( 'strip-featured-thumbnail' ); ?>
13
+			<?php if ('' !== get_the_post_thumbnail() && ! is_single()) : ?>
14
+			<a href="<?php the_permalink(); ?>" title="<?php echo esc_attr(sprintf(__('Permalink to %s', 'strip'), the_title_attribute('echo=0'))); ?>" rel="<?php the_ID(); ?>" class="strip-featured-thumbnail">
15
+				<?php the_post_thumbnail('strip-featured-thumbnail'); ?>
16 16
 			</a>
17 17
 			<?php else : ?>
18
-				<?php the_post_thumbnail( 'strip-featured-thumbnail' ); ?>
18
+				<?php the_post_thumbnail('strip-featured-thumbnail'); ?>
19 19
 			<?php endif; ?>
20 20
 
21 21
 		<header class="entry-header">
22 22
 			<?php
23
-			$categories_list = get_the_category_list( __( ', ', 'strip' ) );
24
-			if ( $categories_list && strip_categorized_blog() ) {
23
+			$categories_list = get_the_category_list(__(', ', 'strip'));
24
+			if ($categories_list && strip_categorized_blog()) {
25 25
 				echo '<span class="categories-links">' . $categories_list . '</span>';
26 26
 			}
27
-			if ( ! is_single() ) :
28
-				the_title( '<h1 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h1>' );
27
+			if ( ! is_single()) :
28
+				the_title('<h1 class="entry-title"><a href="' . esc_url(get_permalink()) . '" rel="bookmark">', '</a></h1>');
29 29
 			else :
30
-					the_title( '<h1 class="entry-title">', '</h1>' );
30
+					the_title('<h1 class="entry-title">', '</h1>');
31 31
 			endif;
32 32
 			?>
33 33
 		</header><!-- .entry-header -->
@@ -35,14 +35,14 @@  discard block
 block discarded – undo
35 35
 		<footer class="entry-meta">
36 36
 			<?php strip_entry_meta(); ?>
37 37
 
38
-			<?php if ( ! post_password_required() && ( comments_open() || '0' !== get_comments_number() ) ) : ?>
39
-			<span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'strip' ), __( '1 Comment', 'strip' ), __( '% Comments', 'strip' ) ); ?></span>
38
+			<?php if ( ! post_password_required() && (comments_open() || '0' !== get_comments_number())) : ?>
39
+			<span class="comments-link"><?php comments_popup_link(__('Leave a comment', 'strip'), __('1 Comment', 'strip'), __('% Comments', 'strip')); ?></span>
40 40
 			<?php endif; ?>
41 41
 
42
-			<?php edit_post_link( __( 'Edit', 'strip' ), '<span class="edit-link">', '</span>' ); ?>
42
+			<?php edit_post_link(__('Edit', 'strip'), '<span class="edit-link">', '</span>'); ?>
43 43
 		</footer><!-- .entry-meta -->
44 44
 
45
-		<?php if ( is_search() ) : // Only display Excerpts for Search. ?>
45
+		<?php if (is_search()) : // Only display Excerpts for Search. ?>
46 46
 		<div class="entry-summary">
47 47
 			<?php the_excerpt(); ?>
48 48
 		</div><!-- .entry-summary -->
@@ -51,16 +51,16 @@  discard block
 block discarded – undo
51 51
 			<?php
52 52
 			the_content(sprintf(
53 53
 				/* translators: %s: Name of current post. */
54
-				esc_html( __( 'Continue reading %s <span class="meta-nav">&rarr;</span>', 'strip' ), array( 'span' => array( 'class' => array() ) ) ),
55
-				get_the_title( '<span class="screen-reader-text">"', '"</span>', false )
54
+				esc_html(__('Continue reading %s <span class="meta-nav">&rarr;</span>', 'strip'), array('span' => array('class' => array()))),
55
+				get_the_title('<span class="screen-reader-text">"', '"</span>', false)
56 56
 			));
57 57
 
58 58
 			wp_link_pages(array(
59
-				'before'      => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'strip' ) . '</span>',
59
+				'before'      => '<div class="page-links"><span class="page-links-title">' . __('Pages:', 'strip') . '</span>',
60 60
 				'after'       => '</div>',
61 61
 				'link_before' => '<span>',
62 62
 				'link_after'  => '</span>',
63
-				'pagelink'    => '<span class="screen-reader-text">' . __( 'Page', 'strip' ) . ' </span>%',
63
+				'pagelink'    => '<span class="screen-reader-text">' . __('Page', 'strip') . ' </span>%',
64 64
 				'separator'   => '<span class="screen-reader-text">, </span>',
65 65
 			));
66 66
 		?>
Please login to merge, or discard this patch.
Braces   +11 added lines, -4 removed lines patch added patch discarded remove patch
@@ -14,8 +14,11 @@  discard block
 block discarded – undo
14 14
 			<a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( sprintf( __( 'Permalink to %s', 'strip' ), the_title_attribute( 'echo=0' ) ) ); ?>" rel="<?php the_ID(); ?>" class="strip-featured-thumbnail">
15 15
 				<?php the_post_thumbnail( 'strip-featured-thumbnail' ); ?>
16 16
 			</a>
17
-			<?php else : ?>
18
-				<?php the_post_thumbnail( 'strip-featured-thumbnail' ); ?>
17
+			<?php else {
18
+	: ?>
19
+				<?php the_post_thumbnail( 'strip-featured-thumbnail' );
20
+}
21
+?>
19 22
 			<?php endif; ?>
20 23
 
21 24
 		<header class="entry-header">
@@ -26,8 +29,10 @@  discard block
 block discarded – undo
26 29
 			}
27 30
 			if ( ! is_single() ) :
28 31
 				the_title( '<h1 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h1>' );
29
-			else :
32
+			else {
33
+				:
30 34
 					the_title( '<h1 class="entry-title">', '</h1>' );
35
+			}
31 36
 			endif;
32 37
 			?>
33 38
 		</header><!-- .entry-header -->
@@ -46,7 +51,8 @@  discard block
 block discarded – undo
46 51
 		<div class="entry-summary">
47 52
 			<?php the_excerpt(); ?>
48 53
 		</div><!-- .entry-summary -->
49
-		<?php else : ?>
54
+		<?php else {
55
+	: ?>
50 56
 		<div class="entry-content">
51 57
 			<?php
52 58
 			the_content(sprintf(
@@ -54,6 +60,7 @@  discard block
 block discarded – undo
54 60
 				esc_html( __( 'Continue reading %s <span class="meta-nav">&rarr;</span>', 'strip' ), array( 'span' => array( 'class' => array() ) ) ),
55 61
 				get_the_title( '<span class="screen-reader-text">"', '"</span>', false )
56 62
 			));
63
+}
57 64
 
58 65
 			wp_link_pages(array(
59 66
 				'before'      => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'strip' ) . '</span>',
Please login to merge, or discard this patch.
inc/custom-header.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -30,8 +30,8 @@
 block discarded – undo
30 30
 			'admin-preview-callback' => 'strip_admin_header_image',
31 31
 	) ) );
32 32
 	/**
33
- * Register default header image
34
- */
33
+	 * Register default header image
34
+	 */
35 35
 	register_default_headers( array(
36 36
 		'DefaultHeader' => array(
37 37
 		'url'  			=> get_template_directory_uri() . '/assets/images/Default-header.png',
Please login to merge, or discard this patch.
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
  * @package strip
19 19
  */
20 20
 function strip_custom_header_setup() {
21
-	add_theme_support( 'custom-header', apply_filters( 'strip_custom_header_args', array(
21
+	add_theme_support('custom-header', apply_filters('strip_custom_header_args', array(
22 22
 		'default-image'          => get_template_directory_uri() . '/assets/images/Default-header.png',
23 23
 		'default-text-color'     => '000',
24 24
 		'flex-width'             => true,
@@ -28,24 +28,24 @@  discard block
 block discarded – undo
28 28
 		'wp-head-callback'       => 'strip_header_style',
29 29
 		'admin-head-callback'    => 'strip_admin_header_style',
30 30
 			'admin-preview-callback' => 'strip_admin_header_image',
31
-	) ) );
31
+	)));
32 32
 	/**
33 33
  * Register default header image
34 34
  */
35
-	register_default_headers( array(
35
+	register_default_headers(array(
36 36
 		'DefaultHeader' => array(
37 37
 		'url'  			=> get_template_directory_uri() . '/assets/images/Default-header.png',
38 38
 		'thumbnail_url' => get_template_directory_uri() . '/assets/images/Default-header.png',
39
-		'description'   => _x( 'DefaultHeader', 'header image description', 'strip' ),
39
+		'description'   => _x('DefaultHeader', 'header image description', 'strip'),
40 40
 		),
41 41
 		)
42 42
 	);
43 43
 
44 44
 }
45 45
 
46
-add_action( 'after_setup_theme', 'strip_custom_header_setup' );
46
+add_action('after_setup_theme', 'strip_custom_header_setup');
47 47
 
48
-if ( ! function_exists( 'strip_header_style' ) ) :
48
+if ( ! function_exists('strip_header_style')) :
49 49
 	/**
50 50
 	 * Styles the header image and text displayed on the blog
51 51
 	 *
@@ -57,34 +57,34 @@  discard block
 block discarded – undo
57 57
 		  $header_text_color = get_header_textcolor();
58 58
 
59 59
 			/* Header image. */
60
-		$header_image = esc_url( get_header_image() );
60
+		$header_image = esc_url(get_header_image());
61 61
 
62 62
 		/* Start header styles. */
63 63
 		$style = '';
64 64
 
65 65
 		/* When to show header image. */
66
-		$min_width = absint( apply_filters( 'strip_header_bg_show', 1 ) );
66
+		$min_width = absint(apply_filters('strip_header_bg_show', 1));
67 67
 
68 68
 		/* Background arguments. */
69
-		$background_arguments = esc_attr( apply_filters( 'strip_header_bg_arguments', 'no-repeat 50% 50%' ) );
69
+		$background_arguments = esc_attr(apply_filters('strip_header_bg_arguments', 'no-repeat 50% 50%'));
70 70
 
71
-		if ( ! empty( $header_image ) ) {
71
+		if ( ! empty($header_image)) {
72 72
 			$style .= "@media screen and (min-width: {$min_width}px) { body.custom-header-image .site-header { background: url({$header_image}) {$background_arguments}; -webkit-background-size: cover; -moz-background-size: cover; -o-background-size: cover; background-size: cover; } }";
73 73
 		}
74 74
 
75 75
 		/* Site title styles. */
76
-		if ( display_header_text() ) {
76
+		if (display_header_text()) {
77 77
 			$style .= ".site-title, .site-title a, .site-description, .site-description a { color: #{$header_text_color} }";
78 78
 			$style .= ".site-title { border-color: #{$header_text_color} }";
79 79
 		}
80 80
 
81
-		if ( ! display_header_text() ) {
81
+		if ( ! display_header_text()) {
82 82
 			$style .= '.site-title, .site-title a, .site-description, .site-description a { clip: rect(1px, 1px, 1px, 1px); position: absolute; }';
83 83
 		}
84 84
 
85 85
 		/* Echo styles if it's not empty. */
86
-		if ( ! empty( $style ) ) {
87
-			echo "\n" . '<style type="text/css" id="custom-header-css">' . esc_attr( trim( $style ) ) . '</style>' . "\n";
86
+		if ( ! empty($style)) {
87
+			echo "\n" . '<style type="text/css" id="custom-header-css">' . esc_attr(trim($style)) . '</style>' . "\n";
88 88
 		}
89 89
 
90 90
 	}
Please login to merge, or discard this patch.
search.php 2 patches
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -11,39 +11,39 @@
 block discarded – undo
11 11
 	<section id="primary"
12 12
 	<main id="content" role="main">
13 13
 
14
-		<?php if ( have_posts() ) : ?>
14
+		<?php if (have_posts()) : ?>
15 15
 
16 16
 			<header class="page-header">
17
-				<h1 class="page-title"><?php printf( esc_html__( 'Search Results for: %s', 'strip' ), '<span>' . get_search_query() . '</span>' ); ?></h1>
17
+				<h1 class="page-title"><?php printf(esc_html__('Search Results for: %s', 'strip'), '<span>' . get_search_query() . '</span>'); ?></h1>
18 18
 			</header><!-- .page-header -->
19 19
 
20 20
 			<?php /* Start the Loop */ ?>
21
-			<?php while ( have_posts() ) :
21
+			<?php while (have_posts()) :
22 22
 				the_post();
23 23
 
24
-				get_template_part( 'content', get_post_format() );
24
+				get_template_part('content', get_post_format());
25 25
 
26 26
 			endwhile;
27 27
 
28
-			the_posts_pagination( array(
29
-				'prev_text' => _x( '&#8592;', 'Previous page link', 'strip' ) . '<span class="screen-reader-text">' . __( 'Previous page', 'strip' ) . '</span>',
30
-				'next_text' => '<span class="screen-reader-text">' . __( 'Next page', 'strip' ) . '</span>' . _x( '&#8594;', 'Next post link', 'strip' ),
31
-				'before_page_number' => '<span class="meta-nav screen-reader-text">' . __( 'Page', 'strip' ) . ' </span>',
32
-			) );
28
+			the_posts_pagination(array(
29
+				'prev_text' => _x('&#8592;', 'Previous page link', 'strip') . '<span class="screen-reader-text">' . __('Previous page', 'strip') . '</span>',
30
+				'next_text' => '<span class="screen-reader-text">' . __('Next page', 'strip') . '</span>' . _x('&#8594;', 'Next post link', 'strip'),
31
+				'before_page_number' => '<span class="meta-nav screen-reader-text">' . __('Page', 'strip') . ' </span>',
32
+			));
33 33
 
34 34
 		else : ?>
35 35
 
36 36
 <article id="post-0" class="no-results">
37 37
 	<header class="page-header">
38
-		<h1 class="page-title"><?php esc_html_e( 'Nothing Found', 'strip' ); ?></h1>
38
+		<h1 class="page-title"><?php esc_html_e('Nothing Found', 'strip'); ?></h1>
39 39
 	</header><!-- .page-header -->
40 40
 <div class="entry-content">
41
-			<p> <?php esc_html_e( 'Bummer, I cannot find what you are looking for.
42
-				Would you like to search in the', 'strip' ); ?>
41
+			<p> <?php esc_html_e('Bummer, I cannot find what you are looking for.
42
+				Would you like to search in the', 'strip'); ?>
43 43
 
44
-			<a href="<?php echo esc_url( get_post_type_archive_link( 'comic' ) ); ?>">Comics Archive</a>? Great stuff there.</p>
44
+			<a href="<?php echo esc_url(get_post_type_archive_link('comic')); ?>">Comics Archive</a>? Great stuff there.</p>
45 45
 
46
-			<p><?php esc_html_e( 'Or do you prefer trying another search with different keywords?', 'strip' ); ?></p>
46
+			<p><?php esc_html_e('Or do you prefer trying another search with different keywords?', 'strip'); ?></p>
47 47
 
48 48
 			<?php get_search_form(); ?>
49 49
 
Please login to merge, or discard this patch.
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -31,11 +31,14 @@
 block discarded – undo
31 31
 				'before_page_number' => '<span class="meta-nav screen-reader-text">' . __( 'Page', 'strip' ) . ' </span>',
32 32
 			) );
33 33
 
34
-		else : ?>
34
+		else {
35
+			: ?>
35 36
 
36 37
 <article id="post-0" class="no-results">
37 38
 	<header class="page-header">
38
-		<h1 class="page-title"><?php esc_html_e( 'Nothing Found', 'strip' ); ?></h1>
39
+		<h1 class="page-title"><?php esc_html_e( 'Nothing Found', 'strip' );
40
+		}
41
+		?></h1>
39 42
 	</header><!-- .page-header -->
40 43
 <div class="entry-content">
41 44
 			<p> <?php esc_html_e( 'Bummer, I cannot find what you are looking for.
Please login to merge, or discard this patch.
index.php 2 patches
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -17,10 +17,10 @@  discard block
 block discarded – undo
17 17
 	<div id="primary" class="content-area">
18 18
 		<div id="content" class="site-content" role="main">
19 19
 
20
-		<?php if ( have_posts() ) : ?>
20
+		<?php if (have_posts()) : ?>
21 21
 
22 22
 	<?php /* Start the Loop */ ?>
23
-			<?php while ( have_posts() ) :
23
+			<?php while (have_posts()) :
24 24
 				the_post(); ?>
25 25
 
26 26
 				<?php
@@ -31,22 +31,22 @@  discard block
 block discarded – undo
31 31
 				* If you want to override this in a child theme, then include a file
32 32
 				* called content-___.php (where ___ is the Post Format name) and that will be used instead.
33 33
 				*/
34
-					get_template_part( 'content', get_post_format() );
34
+					get_template_part('content', get_post_format());
35 35
 				?>
36 36
 
37 37
 			<?php endwhile; ?>
38 38
 
39 39
 			<div class="wrap">
40
-					<?php the_posts_pagination( array(
41
-						'prev_text' => _x( '&#8592;', 'Previous page link', 'strip' ) . '<span class="screen-reader-text">' . __( 'Previous page', 'strip' ) . '</span>',
42
-						'next_text' => '<span class="screen-reader-text">' . __( 'Next page', 'strip' ) . '</span>' . _x( '&#8594;', 'Next post link', 'strip' ),
43
-						'before_page_number' => '<span class="meta-nav screen-reader-text">' . __( 'Page', 'strip' ) . ' </span>',
44
-					) ); ?>
40
+					<?php the_posts_pagination(array(
41
+						'prev_text' => _x('&#8592;', 'Previous page link', 'strip') . '<span class="screen-reader-text">' . __('Previous page', 'strip') . '</span>',
42
+						'next_text' => '<span class="screen-reader-text">' . __('Next page', 'strip') . '</span>' . _x('&#8594;', 'Next post link', 'strip'),
43
+						'before_page_number' => '<span class="meta-nav screen-reader-text">' . __('Page', 'strip') . ' </span>',
44
+					)); ?>
45 45
 	</div>
46 46
 
47 47
 		<?php else : ?>
48 48
 
49
-			<?php get_template_part( 'no-results', 'index' ); ?>
49
+			<?php get_template_part('no-results', 'index'); ?>
50 50
 
51 51
 		<?php endif; ?>
52 52
 
Please login to merge, or discard this patch.
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -44,9 +44,12 @@
 block discarded – undo
44 44
 					) ); ?>
45 45
 	</div>
46 46
 
47
-		<?php else : ?>
47
+		<?php else {
48
+	: ?>
48 49
 
49
-			<?php get_template_part( 'no-results', 'index' ); ?>
50
+			<?php get_template_part( 'no-results', 'index' );
51
+}
52
+?>
50 53
 
51 54
 		<?php endif; ?>
52 55
 
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
@@ -14,19 +14,19 @@  discard block
 block discarded – undo
14 14
 	<main id="main" class="site-main" role="main">
15 15
 
16 16
 	<?php
17
-	if ( have_posts() ) : ?>
17
+	if (have_posts()) : ?>
18 18
 
19 19
 		<header class="page-header">
20 20
 			<div class="wrap">
21 21
 			<?php
22
-				the_archive_title( '<h1 class="page-title">', '</h1>' );
23
-				the_archive_description( '<div class="taxonomy-description">', '</div>' );
22
+				the_archive_title('<h1 class="page-title">', '</h1>');
23
+				the_archive_description('<div class="taxonomy-description">', '</div>');
24 24
 			?>
25 25
 				</div><!-- .wrap -->
26 26
 			</header><!-- .page-header -->
27 27
 
28 28
 			<?php /* Start the Loop */ ?>
29
-			<?php while ( have_posts() ) : the_post(); ?>
29
+			<?php while (have_posts()) : the_post(); ?>
30 30
 
31 31
 				<?php
32 32
 
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
 					 * If you want to overload this in a child theme then include a file
36 36
 					 * called content-___.php (where ___ is the Post Format name) and that will be used instead.
37 37
 					 */
38
-					get_template_part( 'content', get_post_format() );
38
+					get_template_part('content', get_post_format());
39 39
 				?>
40 40
 
41 41
 			<?php endwhile; ?>
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
 
47 47
 		<?php else : ?>
48 48
 
49
-			<?php get_template_part( 'no-results', 'archive' ); ?>
49
+			<?php get_template_part('no-results', 'archive'); ?>
50 50
 
51 51
 		<?php endif; ?>
52 52
 
Please login to merge, or discard this patch.
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -44,9 +44,12 @@
 block discarded – undo
44 44
 					<?php the_posts_pagination(); ?>
45 45
 	</div>
46 46
 
47
-		<?php else : ?>
47
+		<?php else {
48
+	: ?>
48 49
 
49
-			<?php get_template_part( 'no-results', 'archive' ); ?>
50
+			<?php get_template_part( 'no-results', 'archive' );
51
+}
52
+?>
50 53
 
51 54
 		<?php endif; ?>
52 55
 
Please login to merge, or discard this patch.
functions.php 2 patches
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -83,8 +83,8 @@  discard block
 block discarded – undo
83 83
 		add_filter( 'the_content', 'filter_ptags_on_images' );
84 84
 
85 85
 		/**
86
-	 	* This theme uses wp_nav_menu() in one location.
87
-	 	*/
86
+		 * This theme uses wp_nav_menu() in one location.
87
+		 */
88 88
 		register_nav_menus(array(
89 89
 			'primary' => __( 'Primary Menu', 'strip' ),
90 90
 		));
@@ -103,8 +103,8 @@  discard block
 block discarded – undo
103 103
 		) );
104 104
 
105 105
 		/**
106
-	 * Enable support for Post Formats
107
-	 */
106
+		 * Enable support for Post Formats
107
+		 */
108 108
 		add_theme_support( 'post-formats', array(
109 109
 			'image',
110 110
 			'video',
@@ -123,9 +123,9 @@  discard block
 block discarded – undo
123 123
 	}
124 124
 
125 125
 	/**
126
-	* This theme styles the visual editor to resemble the theme style,
127
-	* specifically font, colors, icons, and column width.
128
-	*/
126
+	 * This theme styles the visual editor to resemble the theme style,
127
+	 * specifically font, colors, icons, and column width.
128
+	 */
129 129
 	add_editor_style( array( '/assets/css/editor-style.css', '/assets/fonts/fenix.css' ) );
130 130
 
131 131
 	// Indicate widget sidebars can use selective refresh in the Customizer.
Please login to merge, or discard this patch.
Spacing   +206 added lines, -206 removed lines patch added patch discarded remove patch
@@ -9,11 +9,11 @@  discard block
 block discarded – undo
9 9
  */
10 10
 
11 11
 	// Set the content width based on the theme's design and stylesheet.
12
-if ( ! isset( $content_width ) ) {
12
+if ( ! isset($content_width)) {
13 13
 		$content_width = 1920;
14 14
 } /* pixels */
15 15
 
16
-if ( ! function_exists( 'strip_setup' ) ) :
16
+if ( ! function_exists('strip_setup')) :
17 17
 	/**
18 18
 	 * Sets up theme defaults and registers support for various WordPress features.
19 19
 	 *
@@ -28,29 +28,29 @@  discard block
 block discarded – undo
28 28
 * adding custom login css
29 29
 * changing text in footer of admin
30 30
 */
31
-		require_once( 'assets/admin.php' );
31
+		require_once('assets/admin.php');
32 32
 		/**
33 33
 * Make theme available for translation
34 34
 * Translations can be filed in the /languages/ directory
35 35
 * If you're building a theme based on strip, use a find and replace
36 36
 * to change 'strip' to the name of your theme in all the template files
37 37
 */
38
-		load_theme_textdomain( 'strip', get_template_directory() . '/languages' );
38
+		load_theme_textdomain('strip', get_template_directory() . '/languages');
39 39
 
40 40
 		// Add default posts and comments RSS feed links to head.
41
-		add_theme_support( 'automatic-feed-links' );
41
+		add_theme_support('automatic-feed-links');
42 42
 
43 43
 		/**
44 44
 * Enable support for title-tag. Allows themes to add document title tag to HTML <head> (since version 4.1.).
45 45
 */
46
-		add_theme_support( 'title-tag' );
46
+		add_theme_support('title-tag');
47 47
 
48 48
 		/**
49 49
 * Enable support for custom logo.
50 50
 *
51 51
 * @since strip 1.0
52 52
 */
53
-		add_theme_support( 'custom-logo', array(
53
+		add_theme_support('custom-logo', array(
54 54
 			'height'      => 156,
55 55
 			'width'       => 312,
56 56
 			'flex-height' => true,
@@ -63,11 +63,11 @@  discard block
 block discarded – undo
63 63
 *
64 64
 * @link https://developer.wordpress.org/themes/functionality/featured-images-post-thumbnails/
65 65
 */
66
-add_theme_support( 'post-thumbnails' );
67
-add_image_size( 'strip-featured-image', 1920, 480, true );
68
-add_image_size( 'strip-large', 1272, 636, true ); // cropped.
69
-add_image_size( 'strip-medium', 624, 312, true ); // cropped.
70
-add_image_size( 'strip-thumbnail', 312, 156, true ); // cropped.
66
+add_theme_support('post-thumbnails');
67
+add_image_size('strip-featured-image', 1920, 480, true);
68
+add_image_size('strip-large', 1272, 636, true); // cropped.
69
+add_image_size('strip-medium', 624, 312, true); // cropped.
70
+add_image_size('strip-thumbnail', 312, 156, true); // cropped.
71 71
 		/**
72 72
 		 * Remove paragraph tags around images.
73 73
 		 *
@@ -75,35 +75,35 @@  discard block
 block discarded – undo
75 75
 		 * @link https://css-tricks.com/snippets/wordpress/remove-paragraph-tags-from-around-images/
76 76
 		 * @see http://codex.wordpress.org/Function_Reference/wpautop gets the same result but removes line blocks: remove_filter( 'the_content', 'wpautop' );
77 77
 		 */
78
-		function filter_ptags_on_images( $img ) {
79
-			return preg_replace( '/<p>\s*(<a .*>)?\s*(<img .* \/>)\s*(<\/a>)?\s*<\/p>/iU', '\1\2\3', $img );
78
+		function filter_ptags_on_images($img) {
79
+			return preg_replace('/<p>\s*(<a .*>)?\s*(<img .* \/>)\s*(<\/a>)?\s*<\/p>/iU', '\1\2\3', $img);
80 80
 		}
81
-		add_filter( 'the_content', 'filter_ptags_on_images' );
81
+		add_filter('the_content', 'filter_ptags_on_images');
82 82
 
83 83
 		/**
84 84
 	 	* This theme uses wp_nav_menu() in one location.
85 85
 	 	*/
86 86
 		register_nav_menus(array(
87
-			'primary' => __( 'Primary Menu', 'strip' ),
87
+			'primary' => __('Primary Menu', 'strip'),
88 88
 		));
89 89
 
90 90
 		/*
91 91
 		* Switch default core markup for search form, comment form, and comments
92 92
 		* to output valid HTML5.
93 93
 		*/
94
-		add_theme_support( 'html5', array(
94
+		add_theme_support('html5', array(
95 95
 			'search-form',
96 96
 			'comment-form',
97 97
 			'comment-list',
98 98
 			'gallery',
99 99
 			'caption',
100 100
 			'widgets',
101
-		) );
101
+		));
102 102
 
103 103
 		/**
104 104
 	 * Enable support for Post Formats
105 105
 	 */
106
-		add_theme_support( 'post-formats', array(
106
+		add_theme_support('post-formats', array(
107 107
 			'image',
108 108
 			'video',
109 109
 			'quote',
@@ -111,35 +111,35 @@  discard block
 block discarded – undo
111 111
 			'gallery',
112 112
 			'audio',
113 113
 			'chat',
114
-		) );
114
+		));
115 115
 
116 116
 		// Setup the WordPress core custom background feature.
117 117
 		add_theme_support('custom-background', apply_filters('strip_custom_background_args', array(
118 118
 			'default-color' => 'ffffff',
119 119
 			'default-image' => '',
120
-		) ) );
120
+		)));
121 121
 	}
122 122
 
123 123
 	/**
124 124
 	* This theme styles the visual editor to resemble the theme style,
125 125
 	* specifically font, colors, icons, and column width.
126 126
 	*/
127
-	add_editor_style( array( '/assets/css/editor-style.css', '/assets/fonts/fenix.css' ) );
127
+	add_editor_style(array('/assets/css/editor-style.css', '/assets/fonts/fenix.css'));
128 128
 
129 129
 	// Indicate widget sidebars can use selective refresh in the Customizer.
130 130
 	// See https://make.wordpress.org/core/2016/03/22/implementing-selective-refresh-support-for-widgets/ for detail.
131
-	add_theme_support( 'customize-selective-refresh-widgets' );
131
+	add_theme_support('customize-selective-refresh-widgets');
132 132
 endif; // strip_setup.
133
-add_action( 'after_setup_theme', 'strip_setup' );
133
+add_action('after_setup_theme', 'strip_setup');
134 134
 
135 135
 /**
136 136
  * Register widgetized area and update sidebar with default widgets
137 137
  */
138 138
 function strip_widgets_init() {
139 139
 	register_sidebar(array(
140
-		'name'          => __( 'Main Sidebar', 'strip' ),
140
+		'name'          => __('Main Sidebar', 'strip'),
141 141
 		'id'            => 'sidebar',
142
-		'description'   => __( 'The main body widget area', 'strip' ),
142
+		'description'   => __('The main body widget area', 'strip'),
143 143
 		'before_widget' => '<aside id="%1$s" class="widget %2$s">',
144 144
 		'after_widget'	=> '</aside>',
145 145
 		'before_title'	=> '<h2 class="widget-title">',
@@ -147,10 +147,10 @@  discard block
 block discarded – undo
147 147
 	));
148 148
 
149 149
 	// First footer widget area, located in the footer. Empty by default.
150
-	register_sidebar( array(
151
-		'name'          => __( 'First Footer Widget', 'strip' ),
150
+	register_sidebar(array(
151
+		'name'          => __('First Footer Widget', 'strip'),
152 152
 		'id'            => 'first-footer-widget',
153
-		'description'   => __( 'The first footer widget', 'strip' ),
153
+		'description'   => __('The first footer widget', 'strip'),
154 154
 		'before_widget' => '<aside id="%1$s" class="widget %2$s">',
155 155
 		'after_widget'	=> '</aside>',
156 156
 		'before_title'	=> '<h3 class="widget-title">',
@@ -159,9 +159,9 @@  discard block
 block discarded – undo
159 159
 
160 160
 	// Second Footer Widget Area, located in the footer. Empty by default.
161 161
 	register_sidebar(array(
162
-		'name'          => __( 'Second Footer Widget', 'strip' ),
162
+		'name'          => __('Second Footer Widget', 'strip'),
163 163
 		'id'            => 'second-footer-widget',
164
-		'description'   => __( 'The second footer widget', 'strip' ),
164
+		'description'   => __('The second footer widget', 'strip'),
165 165
 		'before_widget' => '<aside id="%1$s" class="widget %2$s">',
166 166
 		'after_widget'	=> '</aside>',
167 167
 		'before_title'	=> '<h3 class="widget-title">',
@@ -170,9 +170,9 @@  discard block
 block discarded – undo
170 170
 
171 171
 	// Third Footer Widget Area, located in the footer. Empty by default.
172 172
 	register_sidebar(array(
173
-		'name'          => __( 'Third Footer Widget', 'strip' ),
173
+		'name'          => __('Third Footer Widget', 'strip'),
174 174
 		'id'            => 'third-footer-widget',
175
-		'description'   => __( 'The third footer widget', 'strip' ),
175
+		'description'   => __('The third footer widget', 'strip'),
176 176
 		'before_widget' => '<aside id="%1$s" class="widget %2$s">',
177 177
 		'after_widget'	=> '</aside>',
178 178
 		'before_title'	=> '<h3 class="widget-title">',
@@ -181,9 +181,9 @@  discard block
 block discarded – undo
181 181
 
182 182
 	// Fourth Footer Widget Area, located in the footer. Empty by default.
183 183
 	register_sidebar(array(
184
-		'name'           => __( 'Fourth Footer Widget', 'strip' ),
184
+		'name'           => __('Fourth Footer Widget', 'strip'),
185 185
 		'id'             => 'fourth-footer-widget',
186
-		'description'    => __( 'The fourth footer widget', 'strip' ),
186
+		'description'    => __('The fourth footer widget', 'strip'),
187 187
 		'before_widget'  => '<aside id="%1$s" class="widget %2$s">',
188 188
 		'after_widget'	 => '</aside>',
189 189
 		'before_title'	 => '<h3 class="widget-title">',
@@ -191,7 +191,7 @@  discard block
 block discarded – undo
191 191
 	));
192 192
 
193 193
 }
194
-add_action( 'widgets_init', 'strip_widgets_init' );
194
+add_action('widgets_init', 'strip_widgets_init');
195 195
 
196 196
 /**
197 197
  * Handles JavaScript detection.
@@ -203,47 +203,47 @@  discard block
 block discarded – undo
203 203
 function strip_javascript_detection() {
204 204
 	echo "<script>(function(html){html.className = html.className.replace(/\bno-js\b/,'js')})(document.documentElement);</script>\n";
205 205
 }
206
-add_action( 'wp_head', 'strip_javascript_detection', 0 );
206
+add_action('wp_head', 'strip_javascript_detection', 0);
207 207
 
208 208
 /**
209 209
  * Enqueue_styles for custom fonts.
210 210
  */
211 211
 function strip_scripts() {
212 212
 	// add custom font here if any.
213
-	wp_enqueue_style( 'fenix', get_template_directory_uri() . '/assets/fonts/fenix.css', array(), null );
213
+	wp_enqueue_style('fenix', get_template_directory_uri() . '/assets/fonts/fenix.css', array(), null);
214 214
 
215
-	wp_enqueue_style( 'inconsolata', get_template_directory_uri() . '/assets/fonts/inconsolata.css', array(), null );
215
+	wp_enqueue_style('inconsolata', get_template_directory_uri() . '/assets/fonts/inconsolata.css', array(), null);
216 216
 
217 217
 	// Theme stylesheet.
218
-	wp_enqueue_style( 'strip-style', get_stylesheet_uri() );
218
+	wp_enqueue_style('strip-style', get_stylesheet_uri());
219 219
 
220 220
 	// Load the Internet Explorer specific stylesheet. Conditional stylesheet — tested and works with IE9 on Windows7.
221
-	wp_enqueue_style( 'strip-ie', get_template_directory_uri() . '/assets/css/ie.css', array( 'strip-style' ), '20160305' );
222
-	wp_style_add_data( 'strip-ie', 'conditional', 'lt IE 10' );
221
+	wp_enqueue_style('strip-ie', get_template_directory_uri() . '/assets/css/ie.css', array('strip-style'), '20160305');
222
+	wp_style_add_data('strip-ie', 'conditional', 'lt IE 10');
223 223
 
224
-	if ( has_nav_menu( 'primary' ) ) {
225
-		wp_enqueue_script( 'strip-navigation', get_template_directory_uri() . '/assets/js/min/navigation-min.js', array(), '1.0', true );
224
+	if (has_nav_menu('primary')) {
225
+		wp_enqueue_script('strip-navigation', get_template_directory_uri() . '/assets/js/min/navigation-min.js', array(), '1.0', true);
226 226
 	}
227 227
 
228 228
 	// Load the html5 shiv.
229
-	wp_enqueue_script( 'strip-html5', get_template_directory_uri() . '/assets/js/min/html5-min.js', array(), '3.7.3' );
230
-	wp_script_add_data( 'strip-html5', 'conditional', 'lt IE 9' );
229
+	wp_enqueue_script('strip-html5', get_template_directory_uri() . '/assets/js/min/html5-min.js', array(), '3.7.3');
230
+	wp_script_add_data('strip-html5', 'conditional', 'lt IE 9');
231 231
 
232
-	wp_enqueue_script( 'strip-skip-link-focus-fix', get_template_directory_uri() . '/assets/js/min/skip-link-focus-fix-min.js', array(), '1.0', true );
232
+	wp_enqueue_script('strip-skip-link-focus-fix', get_template_directory_uri() . '/assets/js/min/skip-link-focus-fix-min.js', array(), '1.0', true);
233 233
 
234
-	if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
235
-		wp_enqueue_script( 'comment-reply' );
234
+	if (is_singular() && comments_open() && get_option('thread_comments')) {
235
+		wp_enqueue_script('comment-reply');
236 236
 
237 237
 			// toggle comments js.
238
-			wp_enqueue_script( 'strip-toggle-comments', get_template_directory_uri() . '/assets/js/min/toggle-comments-min.js', array( 'jquery' ), '1.2', true );
238
+			wp_enqueue_script('strip-toggle-comments', get_template_directory_uri() . '/assets/js/min/toggle-comments-min.js', array('jquery'), '1.2', true);
239 239
 
240
-		if ( is_single() && wp_attachment_is_image() ) {
241
-			wp_enqueue_script( 'strip-keyboard-image-navigation', get_template_directory_uri() . '/assets/js/min/keyboard-image-navigation-min.js', array( 'jquery' ), '20160412', true );
240
+		if (is_single() && wp_attachment_is_image()) {
241
+			wp_enqueue_script('strip-keyboard-image-navigation', get_template_directory_uri() . '/assets/js/min/keyboard-image-navigation-min.js', array('jquery'), '20160412', true);
242 242
 		}
243 243
 	}
244 244
 }
245 245
 
246
-add_action( 'wp_enqueue_scripts', 'strip_scripts' );
246
+add_action('wp_enqueue_scripts', 'strip_scripts');
247 247
 
248 248
 /**
249 249
  * Implement the Custom Header feature.
@@ -270,14 +270,14 @@  discard block
 block discarded – undo
270 270
  */
271 271
 require get_template_directory() . '/inc/jetpack.php';
272 272
 
273
-add_action( 'wp_enqueue_scripts', 'enqueue_royal_sliders' );
273
+add_action('wp_enqueue_scripts', 'enqueue_royal_sliders');
274 274
 /**
275 275
  * Register RoyalSLider
276 276
  */
277 277
 function enqueue_royal_sliders() {
278
-	if ( function_exists( 'register_new_royalslider_files' ) ) {
278
+	if (function_exists('register_new_royalslider_files')) {
279 279
 		// you could try this: if ( is_single() && is_archive() ) { but you don't really need it.
280
-			register_new_royalslider_files( 1 ); // 1 is RoyalSlider configuration number
280
+			register_new_royalslider_files(1); // 1 is RoyalSlider configuration number
281 281
 		// add } if use is_single etc.
282 282
 	}
283 283
 }
@@ -290,24 +290,24 @@  discard block
 block discarded – undo
290 290
  * @link https://gist.github.com/SilentComics/0a7ea47942eb759dbb48eac2b7be1bbc/
291 291
  */
292 292
 function get_first_image() {
293
-	$post  = get_post();
293
+	$post = get_post();
294 294
 	$first_img = '';
295
-	preg_match_all( '/<img.+src=[\'"]([^\'"]+)[\'"].*>/i', do_shortcode( $post->post_content, 'gallery' ), $matches );
296
-	  $first_img = isset( $matches[1][0] ) ? $matches[1][0] : null;
295
+	preg_match_all('/<img.+src=[\'"]([^\'"]+)[\'"].*>/i', do_shortcode($post->post_content, 'gallery'), $matches);
296
+	  $first_img = isset($matches[1][0]) ? $matches[1][0] : null;
297 297
 
298
-	if ( empty( $first_img ) ) {
298
+	if (empty($first_img)) {
299 299
 			return get_template_directory_uri() . '/assets/images/empty.png'; // path to default image.
300 300
 	}
301 301
 
302 302
 		// Now we have the $first_img but we want the thumbnail of that image.
303
-		$explode = explode( '.', $first_img );
304
-		$count = count( $explode );
303
+		$explode = explode('.', $first_img);
304
+		$count = count($explode);
305 305
 		$size = '-624x312'; // Panel ratio (2:1) 312x156 for lighther page, 624x312 for retina; use add_image_size() and Force Regenerate Thumbnails plugin when changing sizes.
306
-		$explode[ $count -2 ] = $explode[ $count -2 ] . '' . $size;
307
-		$thumb_img = implode( '.', $explode );
306
+		$explode[$count - 2] = $explode[$count - 2] . '' . $size;
307
+		$thumb_img = implode('.', $explode);
308 308
 		return $thumb_img;
309 309
 }
310
-	add_filter( 'get_first_image', 'thumbnail' );
310
+	add_filter('get_first_image', 'thumbnail');
311 311
 
312 312
 /**
313 313
  * Register Custom Post Type for comics
@@ -315,24 +315,24 @@  discard block
 block discarded – undo
315 315
 function comic_post_type() {
316 316
 
317 317
 	$labels = array(
318
-		'name'                       => _x( 'Comics', 'Post Type General Name', 'strip' ),
319
-		'singular_name'              => _x( 'Comic', 'Post Type Singular Name', 'strip' ),
320
-		'menu_name'                  => _x( 'Comics', 'admin menu', 'strip' ),
321
-		'name_admin_bar'             => _x( 'Comic', 'add new on admin bar', 'strip' ),
322
-		'parent_item_colon'	         => __( 'Parent Comic:', 'strip' ),
323
-		'all_items'                  => __( 'All Comics', 'strip' ),
324
-		'add_new_item'               => __( 'Add New Comic', 'strip' ),
325
-		'add_new'                    => __( 'Add New Comic', 'strip' ),
326
-		'new_item'                   => __( 'New Comic', 'strip' ),
327
-		'edit_item'                  => __( 'Edit Comic', 'strip' ),
328
-		'update_item'                => __( 'Update Comic', 'strip' ),
329
-		'view_item'                  => __( 'View Comic', 'strip' ),
330
-		'search_items'               => __( 'Search Item', 'strip' ),
331
-		'not_found'                  => __( 'No Comics found', 'strip' ),
332
-		'not_found_in_trash'         => __( 'No Comics found in Trash', 'strip' ),
333
-		'items_list'                 => __( 'Comics list', 'strip' ),
334
-		'items_list_navigation'      => __( 'Comics list navigation', 'strip' ),
335
-		'filter_items_list'          => __( 'Filter Comics list', 'strip' ),
318
+		'name'                       => _x('Comics', 'Post Type General Name', 'strip'),
319
+		'singular_name'              => _x('Comic', 'Post Type Singular Name', 'strip'),
320
+		'menu_name'                  => _x('Comics', 'admin menu', 'strip'),
321
+		'name_admin_bar'             => _x('Comic', 'add new on admin bar', 'strip'),
322
+		'parent_item_colon'	         => __('Parent Comic:', 'strip'),
323
+		'all_items'                  => __('All Comics', 'strip'),
324
+		'add_new_item'               => __('Add New Comic', 'strip'),
325
+		'add_new'                    => __('Add New Comic', 'strip'),
326
+		'new_item'                   => __('New Comic', 'strip'),
327
+		'edit_item'                  => __('Edit Comic', 'strip'),
328
+		'update_item'                => __('Update Comic', 'strip'),
329
+		'view_item'                  => __('View Comic', 'strip'),
330
+		'search_items'               => __('Search Item', 'strip'),
331
+		'not_found'                  => __('No Comics found', 'strip'),
332
+		'not_found_in_trash'         => __('No Comics found in Trash', 'strip'),
333
+		'items_list'                 => __('Comics list', 'strip'),
334
+		'items_list_navigation'      => __('Comics list navigation', 'strip'),
335
+		'filter_items_list'          => __('Filter Comics list', 'strip'),
336 336
 	);
337 337
 
338 338
 	$supports = array(
@@ -349,11 +349,11 @@  discard block
 block discarded – undo
349 349
 	);
350 350
 
351 351
 	$args = array(
352
-		'label'                      => __( 'Comic', 'strip' ),
353
-		'description'                => __( 'Publish Comics and Webcomics', 'strip' ),
352
+		'label'                      => __('Comic', 'strip'),
353
+		'description'                => __('Publish Comics and Webcomics', 'strip'),
354 354
 		'labels'                     => $labels,
355 355
 		'supports'                   => $supports,
356
-		'taxonomies'                 => array( 'story', 'story_term', 'draft' ),
356
+		'taxonomies'                 => array('story', 'story_term', 'draft'),
357 357
 		'hierarchical'               => true,
358 358
 		'public'                     => true,
359 359
 		'show_ui'                    => true,
@@ -366,40 +366,40 @@  discard block
 block discarded – undo
366 366
 		'has_archive'                => true,
367 367
 		'feeds'                      => true,
368 368
 		'exclude_from_search'        => false,
369
-		'rewrite'                    => array( 'slug' => 'stories', 'with_front' => true ),
369
+		'rewrite'                    => array('slug' => 'stories', 'with_front' => true),
370 370
 		'publicly_queryable'	       => true,
371 371
 		'capability_type'            => 'post',
372 372
 	);
373
-	register_post_type( 'comic', $args );
373
+	register_post_type('comic', $args);
374 374
 }
375 375
 
376 376
 // Hook into the 'init' action.
377
-add_action( 'init', 'comic_post_type', 0 ); // End of register_cpt_comic().
377
+add_action('init', 'comic_post_type', 0); // End of register_cpt_comic().
378 378
 
379 379
 	/**
380 380
 	 * Register Custom Taxonomy 'story'
381 381
 	 */
382 382
 function comic_story_taxonomy() {
383 383
 	$labels = array(
384
-		'name'                       => _x( 'Comic Story', 'Taxonomy General Name', 'strip' ),
385
-		'singular_name'              => _x( 'Comic Story', 'Taxonomy Singular Name', 'strip' ),
386
-		'menu_name'                  => __( 'Comic Stories', 'strip' ),
387
-		'all_items'                  => __( 'All Comic Stories', 'strip' ),
388
-		'parent_item'                => __( 'Parent Story', 'strip' ),
389
-		'parent_item_colon'          => __( 'Parent Story:', 'strip' ),
390
-		'new_item_name'              => __( 'New Comic Story', 'strip' ),
391
-		'add_new_item'               => __( 'Add New Story', 'strip' ),
392
-		'edit_item'                  => __( 'Edit Story', 'strip' ),
393
-		'update_item'                => __( 'Update Story', 'strip' ),
394
-		'view_item'                  => __( 'View Item', 'strip' ),
395
-		'separate_items_with_commas' => __( 'Separate stories with commas', 'strip' ),
396
-		'add_or_remove_items'        => __( 'Add or Remove Stories', 'strip' ),
397
-		'choose_from_most_used'      => __( 'Choose from the most used stories', 'strip' ),
398
-		'popular_items'              => __( 'Popular comic stories', 'strip' ),
399
-		'search_items'               => __( 'Search Stories', 'strip' ),
400
-		'not_found'                  => __( 'No comic Stories found', 'strip' ),
401
-		'items_list'                 => __( 'Comic Stories list', 'strip' ),
402
-		'items_list_navigation'      => __( 'Comic Stories list navigation', 'strip' ),
384
+		'name'                       => _x('Comic Story', 'Taxonomy General Name', 'strip'),
385
+		'singular_name'              => _x('Comic Story', 'Taxonomy Singular Name', 'strip'),
386
+		'menu_name'                  => __('Comic Stories', 'strip'),
387
+		'all_items'                  => __('All Comic Stories', 'strip'),
388
+		'parent_item'                => __('Parent Story', 'strip'),
389
+		'parent_item_colon'          => __('Parent Story:', 'strip'),
390
+		'new_item_name'              => __('New Comic Story', 'strip'),
391
+		'add_new_item'               => __('Add New Story', 'strip'),
392
+		'edit_item'                  => __('Edit Story', 'strip'),
393
+		'update_item'                => __('Update Story', 'strip'),
394
+		'view_item'                  => __('View Item', 'strip'),
395
+		'separate_items_with_commas' => __('Separate stories with commas', 'strip'),
396
+		'add_or_remove_items'        => __('Add or Remove Stories', 'strip'),
397
+		'choose_from_most_used'      => __('Choose from the most used stories', 'strip'),
398
+		'popular_items'              => __('Popular comic stories', 'strip'),
399
+		'search_items'               => __('Search Stories', 'strip'),
400
+		'not_found'                  => __('No comic Stories found', 'strip'),
401
+		'items_list'                 => __('Comic Stories list', 'strip'),
402
+		'items_list_navigation'      => __('Comic Stories list navigation', 'strip'),
403 403
 	);
404 404
 	$args = array(
405 405
 		'labels'                     => $labels,
@@ -411,14 +411,14 @@  discard block
 block discarded – undo
411 411
 		'show_in_nav_menus'          => true,
412 412
 		'show_tagcloud'              => true,
413 413
 		'query_var'	                 => true,
414
-		'rewrite'                    => array( 'slug' => 'story' ),
414
+		'rewrite'                    => array('slug' => 'story'),
415 415
 	);
416
-	register_taxonomy( 'story', array( 'comic' ), $args );
417
-	register_taxonomy_for_object_type( 'story', 'comic' );
416
+	register_taxonomy('story', array('comic'), $args);
417
+	register_taxonomy_for_object_type('story', 'comic');
418 418
 }
419 419
 
420 420
 // Hook into the 'init' action.
421
-add_action( 'init', 'comic_story_taxonomy', 0 );
421
+add_action('init', 'comic_story_taxonomy', 0);
422 422
 
423 423
 /**
424 424
  * Function strip rewrite rules.
@@ -427,31 +427,31 @@  discard block
 block discarded – undo
427 427
 	flush_rewrite_rules();
428 428
 }
429 429
 /* Flush rewrite rules for custom post types. */
430
-add_action( 'after_switch_theme', 'strip_rewrite_rules' );
430
+add_action('after_switch_theme', 'strip_rewrite_rules');
431 431
 
432 432
 // Add Print taxonomy, NOT hierarchical (like tags)
433 433
 // Register Custom Taxonomy.
434 434
 	$labels = array(
435
-		'name'                       => _x( 'Prints', 'Taxonomy General Name', 'strip' ),
436
-		'singular_name'              => _x( 'Print', 'Taxonomy Singular Name', 'strip' ),
437
-		'menu_name'                  => __( 'Print', 'strip' ),
438
-		'all_items'                  => __( 'All Prints', 'strip' ),
439
-		'parent_item'                => __( 'Parent Print', 'strip' ),
440
-		'parent_item_colon'          => __( 'Parent Print:', 'strip' ),
441
-		'new_item_name'              => __( 'New Print Name', 'strip' ),
442
-		'add_new_item'               => __( 'Add New Print', 'strip' ),
443
-		'edit_item'                  => __( 'Edit Print', 'strip' ),
444
-		'update_item'                => __( 'Update Pring', 'strip' ),
445
-		'view_item'                  => __( 'View Print', 'strip' ),
446
-		'separate_items_with_commas' => __( 'Separate prints with commas', 'strip' ),
447
-		'add_or_remove_items'        => __( 'Add or remove prints', 'strip' ),
448
-		'choose_from_most_used'      => __( 'Choose from the most used', 'strip' ),
449
-		'popular_items'              => __( 'Popular Prints', 'strip' ),
450
-		'search_items'               => __( 'Search Prints', 'strip' ),
451
-		'not_found'                  => __( 'Not Found', 'strip' ),
452
-		'no_terms'                   => __( 'No prints', 'strip' ),
453
-		'items_list'                 => __( 'Prints list', 'strip' ),
454
-		'items_list_navigation'      => __( 'Prints list navigation', 'strip' ),
435
+		'name'                       => _x('Prints', 'Taxonomy General Name', 'strip'),
436
+		'singular_name'              => _x('Print', 'Taxonomy Singular Name', 'strip'),
437
+		'menu_name'                  => __('Print', 'strip'),
438
+		'all_items'                  => __('All Prints', 'strip'),
439
+		'parent_item'                => __('Parent Print', 'strip'),
440
+		'parent_item_colon'          => __('Parent Print:', 'strip'),
441
+		'new_item_name'              => __('New Print Name', 'strip'),
442
+		'add_new_item'               => __('Add New Print', 'strip'),
443
+		'edit_item'                  => __('Edit Print', 'strip'),
444
+		'update_item'                => __('Update Pring', 'strip'),
445
+		'view_item'                  => __('View Print', 'strip'),
446
+		'separate_items_with_commas' => __('Separate prints with commas', 'strip'),
447
+		'add_or_remove_items'        => __('Add or remove prints', 'strip'),
448
+		'choose_from_most_used'      => __('Choose from the most used', 'strip'),
449
+		'popular_items'              => __('Popular Prints', 'strip'),
450
+		'search_items'               => __('Search Prints', 'strip'),
451
+		'not_found'                  => __('Not Found', 'strip'),
452
+		'no_terms'                   => __('No prints', 'strip'),
453
+		'items_list'                 => __('Prints list', 'strip'),
454
+		'items_list_navigation'      => __('Prints list navigation', 'strip'),
455 455
 	);
456 456
 
457 457
 	$args = array(
@@ -463,21 +463,21 @@  discard block
 block discarded – undo
463 463
 		'show_in_nav_menus'          => true,
464 464
 		'show_tagcloud'              => true,
465 465
 	);
466
-	register_taxonomy( 'print', array( 'comic' ), $args );
466
+	register_taxonomy('print', array('comic'), $args);
467 467
 
468 468
 	/*
469 469
 	* WooCommerce Hooks
470 470
 	* Layout
471 471
 	*/
472
-	remove_action( 'woocommerce_before_main_content', 'woocommerce_breadcrumb', 20, 0 );
473
-	remove_action( 'woocommerce_before_main_content', 'woocommerce_output_content_wrapper', 10 );
474
-	remove_action( 'woocommerce_after_main_content', 'woocommerce_output_content_wrapper_end', 10 );
472
+	remove_action('woocommerce_before_main_content', 'woocommerce_breadcrumb', 20, 0);
473
+	remove_action('woocommerce_before_main_content', 'woocommerce_output_content_wrapper', 10);
474
+	remove_action('woocommerce_after_main_content', 'woocommerce_output_content_wrapper_end', 10);
475 475
 	// remove_action( 'woocommerce_after_shop_loop', 'woocommerce_pagination', 10 ); // removes woo pagination.
476
-	remove_action( 'woocommerce_before_shop_loop', 'woocommerce_result_count', 20 );
477
-	remove_action( 'woocommerce_before_shop_loop', 'woocommerce_catalog_ordering', 30 );
476
+	remove_action('woocommerce_before_shop_loop', 'woocommerce_result_count', 20);
477
+	remove_action('woocommerce_before_shop_loop', 'woocommerce_catalog_ordering', 30);
478 478
 
479
-	add_action( 'woocommerce_before_main_content', 'strip_wrapper_start', 10 );
480
-	add_action( 'woocommerce_after_main_content', 'strip_wrapper_end', 10 );
479
+	add_action('woocommerce_before_main_content', 'strip_wrapper_start', 10);
480
+	add_action('woocommerce_after_main_content', 'strip_wrapper_end', 10);
481 481
 
482 482
 		 /**
483 483
 		  * WooCommerce wrapper
@@ -493,13 +493,13 @@  discard block
 block discarded – undo
493 493
 		echo '</section>';
494 494
 	}
495 495
 
496
-	add_action( 'after_setup_theme', 'woocommerce_support' );
496
+	add_action('after_setup_theme', 'woocommerce_support');
497 497
 	/**
498 498
 	 * Add WooCommerce support
499 499
 	 * https://docs.woothemes.com/document/third-party-custom-theme-compatibility/*
500 500
 	 */
501 501
 	function woocommerce_support() {
502
-		add_theme_support( 'woocommerce' );
502
+		add_theme_support('woocommerce');
503 503
 	}
504 504
 
505 505
 	/**
@@ -507,13 +507,13 @@  discard block
 block discarded – undo
507 507
 	 */
508 508
 	function wp_enqueue_woocommerce_style() {
509 509
 
510
-			wp_register_style( 'strip-woocommerce', get_template_directory_uri() . '/assets/css/woocommerce-min.css' );
511
-		if ( class_exists( 'woocommerce' ) ) {
512
-			wp_enqueue_style( 'strip-woocommerce' );
510
+			wp_register_style('strip-woocommerce', get_template_directory_uri() . '/assets/css/woocommerce-min.css');
511
+		if (class_exists('woocommerce')) {
512
+			wp_enqueue_style('strip-woocommerce');
513 513
 		}
514 514
 	}
515 515
 
516
-	add_action( 'wp_enqueue_scripts', 'wp_enqueue_woocommerce_style' );
516
+	add_action('wp_enqueue_scripts', 'wp_enqueue_woocommerce_style');
517 517
 
518 518
 	/**
519 519
 * Optimize WooCommerce Scripts
@@ -524,53 +524,53 @@  discard block
 block discarded – undo
524 524
 * @link https://gist.github.com/DevinWalker/7621777
525 525
 * @link http://dessky.com/blog/disable-woocommerce-scripts-and-styles/
526 526
 */
527
-	add_action( 'wp_enqueue_scripts', 'strip_manage_woocommerce_styles', 99 );
527
+	add_action('wp_enqueue_scripts', 'strip_manage_woocommerce_styles', 99);
528 528
 
529 529
 	/**
530 530
 	 * Remove some WooCommerce queries.
531 531
 	 */
532 532
 	function strip_manage_woocommerce_styles() {
533 533
 		// remove generator meta tag.
534
-		remove_action( 'wp_head', array( 'woocommerce', 'generator' ) );
534
+		remove_action('wp_head', array('woocommerce', 'generator'));
535 535
 		// first check that woo exists to prevent fatal errors.
536
-		if ( function_exists( 'strip_is_woocommerce_activated' ) ) {
536
+		if (function_exists('strip_is_woocommerce_activated')) {
537 537
 			// dequeue scripts and styles, unless we're in the store.
538
-			if ( ! is_woocommerce() && ! is_cart() && ! is_checkout() ) {
539
-				wp_dequeue_style( 'woocommerce_frontend_styles' );
540
-				wp_dequeue_style( 'woocommerce-general' );
541
-				wp_dequeue_style( 'woocommerce-layout' );
542
-				wp_dequeue_style( 'woocommerce-smallscreen' );
543
-				wp_dequeue_style( 'woocommerce_fancybox_styles' );
544
-				wp_dequeue_style( 'woocommerce_chosen_styles' );
545
-				wp_dequeue_style( 'woocommerce_prettyPhoto_css' );
546
-				wp_dequeue_style( 'select2' );
547
-				wp_dequeue_style( 'strip-woocommerce' ); // the theme's CSS overwrite.
548
-				wp_dequeue_script( 'wc-add-payment-method' );
549
-				wp_dequeue_script( 'wc-lost-password' );
550
-				wp_dequeue_script( 'wc_price_slider' );
551
-				wp_dequeue_script( 'wc-single-product' );
552
-				wp_dequeue_script( 'wc-add-to-cart' );
553
-				wp_dequeue_script( 'wc-cart-fragments' );
554
-				wp_dequeue_script( 'wc-credit-card-form' );
555
-				wp_dequeue_script( 'wc-checkout' );
556
-				wp_dequeue_script( 'wc-add-to-cart-variation' );
557
-				wp_dequeue_script( 'wc-single-product' );
558
-				wp_dequeue_script( 'wc-cart' );
559
-				wp_dequeue_script( 'wc-chosen' );
560
-				wp_dequeue_script( 'woocommerce' );
561
-				wp_dequeue_script( 'jquery-cookie' );
562
-				wp_dequeue_script( 'prettyPhoto' );
563
-				wp_dequeue_script( 'prettyPhoto-init' );
564
-				wp_dequeue_script( 'jquery-blockui' );
565
-				wp_dequeue_script( 'jquery-placeholder' );
566
-				wp_dequeue_script( 'jquery-payment' );
567
-				wp_dequeue_script( 'fancybox' );
568
-				wp_dequeue_script( 'jqueryui' );
538
+			if ( ! is_woocommerce() && ! is_cart() && ! is_checkout()) {
539
+				wp_dequeue_style('woocommerce_frontend_styles');
540
+				wp_dequeue_style('woocommerce-general');
541
+				wp_dequeue_style('woocommerce-layout');
542
+				wp_dequeue_style('woocommerce-smallscreen');
543
+				wp_dequeue_style('woocommerce_fancybox_styles');
544
+				wp_dequeue_style('woocommerce_chosen_styles');
545
+				wp_dequeue_style('woocommerce_prettyPhoto_css');
546
+				wp_dequeue_style('select2');
547
+				wp_dequeue_style('strip-woocommerce'); // the theme's CSS overwrite.
548
+				wp_dequeue_script('wc-add-payment-method');
549
+				wp_dequeue_script('wc-lost-password');
550
+				wp_dequeue_script('wc_price_slider');
551
+				wp_dequeue_script('wc-single-product');
552
+				wp_dequeue_script('wc-add-to-cart');
553
+				wp_dequeue_script('wc-cart-fragments');
554
+				wp_dequeue_script('wc-credit-card-form');
555
+				wp_dequeue_script('wc-checkout');
556
+				wp_dequeue_script('wc-add-to-cart-variation');
557
+				wp_dequeue_script('wc-single-product');
558
+				wp_dequeue_script('wc-cart');
559
+				wp_dequeue_script('wc-chosen');
560
+				wp_dequeue_script('woocommerce');
561
+				wp_dequeue_script('jquery-cookie');
562
+				wp_dequeue_script('prettyPhoto');
563
+				wp_dequeue_script('prettyPhoto-init');
564
+				wp_dequeue_script('jquery-blockui');
565
+				wp_dequeue_script('jquery-placeholder');
566
+				wp_dequeue_script('jquery-payment');
567
+				wp_dequeue_script('fancybox');
568
+				wp_dequeue_script('jqueryui');
569 569
 			}
570 570
 		}
571 571
 	}
572 572
 
573
-	add_action( 'pre_get_posts', 'strip_set_posts_per_page' );
573
+	add_action('pre_get_posts', 'strip_set_posts_per_page');
574 574
 	/**
575 575
 	 * Set posts, WooCommerce products & comics number per archive page
576 576
 	 * Fixes 404 error on pagination due to CTP conflicting with WordPress posts_per_page default
@@ -579,12 +579,12 @@  discard block
 block discarded – undo
579 579
 	 * @param WP_Query $query strip_set_posts_per_page.
580 580
 	 * @return $query
581 581
 	 */
582
-	function strip_set_posts_per_page( $query ) {
583
-		if ( is_post_type_archive( 'product' ) ) {
584
-			$query->set( 'posts_per_page', 4 );
582
+	function strip_set_posts_per_page($query) {
583
+		if (is_post_type_archive('product')) {
584
+			$query->set('posts_per_page', 4);
585 585
 			return  $query;
586
-		} elseif ( is_tax( 'story' ) ) {
587
-			$query->set( 'posts_per_page', 6 );
586
+		} elseif (is_tax('story')) {
587
+			$query->set('posts_per_page', 6);
588 588
 		}
589 589
 	}
590 590
 
@@ -593,13 +593,13 @@  discard block
 block discarded – undo
593 593
 	 *
594 594
 	 * @param string $query strip_add_comics_to_blog.
595 595
 	 */
596
-	function strip_add_comics_to_blog( $query ) {
597
-		if ( is_home() && $query->is_main_query() ) {
598
-			$query->set( 'post_type', array( 'post', 'comic' ) );
596
+	function strip_add_comics_to_blog($query) {
597
+		if (is_home() && $query->is_main_query()) {
598
+			$query->set('post_type', array('post', 'comic'));
599 599
 				return $query;
600 600
 		}
601 601
 	}
602
-		add_action( 'pre_get_posts', 'strip_add_comics_to_blog' );
602
+		add_action('pre_get_posts', 'strip_add_comics_to_blog');
603 603
 
604 604
 	/**
605 605
 	 * Set an automatic default custom taxonomy for comic posts.
@@ -609,35 +609,35 @@  discard block
 block discarded – undo
609 609
 	 * @param	string $post_id set_default_object_terms.
610 610
 	 * @param	string $post set_default_object_terms.
611 611
 	 */
612
-	function set_default_object_terms( $post_id, $post ) {
613
-		if ( 'publish' === $post->post_status && 'comic' === $post->post_type ) {
612
+	function set_default_object_terms($post_id, $post) {
613
+		if ('publish' === $post->post_status && 'comic' === $post->post_type) {
614 614
 			$defaults = array(
615
-			'story' => array( 'draft' ),
615
+			'story' => array('draft'),
616 616
 			);
617
-			$taxonomies = get_object_taxonomies( $post->post_type );
618
-			foreach ( (array) $taxonomies as $taxonomy ) {
619
-				$terms = get_the_terms( $post_id, $taxonomy );
620
-				if ( empty( $terms ) && array_key_exists( $taxonomy, $defaults ) ) {
621
-					wp_set_object_terms( $post_id, $defaults[ $taxonomy ], $taxonomy );
617
+			$taxonomies = get_object_taxonomies($post->post_type);
618
+			foreach ((array) $taxonomies as $taxonomy) {
619
+				$terms = get_the_terms($post_id, $taxonomy);
620
+				if (empty($terms) && array_key_exists($taxonomy, $defaults)) {
621
+					wp_set_object_terms($post_id, $defaults[$taxonomy], $taxonomy);
622 622
 				}
623 623
 			}
624 624
 		}
625 625
 	}
626
-	add_action( 'save_post', 'set_default_object_terms', 0, 2 );
626
+	add_action('save_post', 'set_default_object_terms', 0, 2);
627 627
 
628 628
 	/**
629 629
 	 * Remove jquery migrate $scripts for enhanced performance.
630 630
 	 *
631 631
 	 * @param strings $scripts remove_jquery_migrate.
632 632
 	 */
633
-	function remove_jquery_migrate( $scripts ) {
634
-		if ( is_admin() ) {
633
+	function remove_jquery_migrate($scripts) {
634
+		if (is_admin()) {
635 635
 			return;
636 636
 		}
637
-		 $scripts->remove( 'jquery' );
638
-		 $scripts->add( 'jquery', false, array( 'jquery-core' ), '1.10.2' );
637
+		 $scripts->remove('jquery');
638
+		 $scripts->add('jquery', false, array('jquery-core'), '1.10.2');
639 639
 	}
640
-		add_action( 'wp_default_scripts', 'remove_jquery_migrate' );
640
+		add_action('wp_default_scripts', 'remove_jquery_migrate');
641 641
 
642 642
 		/**
643 643
 		 * Remove login errors notices (security)
@@ -645,4 +645,4 @@  discard block
 block discarded – undo
645 645
 	function no_wordpress_errors() {
646 646
 		return 'Something is wrong!';
647 647
 	}
648
-		add_filter( 'login_errors', 'no_wordpress_errors' );
648
+		add_filter('login_errors', 'no_wordpress_errors');
Please login to merge, or discard this patch.