Completed
Push — master ( 300a78...edfd37 )
by SILENT
02:28
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, 960, true );
68
-		add_image_size( 'strip-large', 1920, 960, 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, 960, true);
68
+		add_image_size('strip-large', 1920, 960, 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
 		/**
73 73
 		 * Remove paragraph tags around images.
@@ -76,35 +76,35 @@  discard block
 block discarded – undo
76 76
 		 * @link https://css-tricks.com/snippets/wordpress/remove-paragraph-tags-from-around-images/
77 77
 		 * @see http://codex.wordpress.org/Function_Reference/wpautop gets the same result but removes line blocks: remove_filter( 'the_content', 'wpautop' );
78 78
 		 */
79
-		function filter_ptags_on_images( $hinh ) {
80
-			return preg_replace( '/<p>\s*(<a .*>)?\s*(<img .* \/>)\s*(<\/a>)?\s*<\/p>/iU', '\1\2\3', $hinh );
79
+		function filter_ptags_on_images($hinh) {
80
+			return preg_replace('/<p>\s*(<a .*>)?\s*(<img .* \/>)\s*(<\/a>)?\s*<\/p>/iU', '\1\2\3', $hinh);
81 81
 		}
82
-		add_filter( 'the_content', 'filter_ptags_on_images' );
82
+		add_filter('the_content', 'filter_ptags_on_images');
83 83
 
84 84
 		/**
85 85
 	 	* This theme uses wp_nav_menu() in one location.
86 86
 	 	*/
87 87
 		register_nav_menus(array(
88
-			'primary' => __( 'Primary Menu', 'strip' ),
88
+			'primary' => __('Primary Menu', 'strip'),
89 89
 		));
90 90
 
91 91
 		/*
92 92
 		* Switch default core markup for search form, comment form, and comments
93 93
 		* to output valid HTML5.
94 94
 		*/
95
-		add_theme_support( 'html5', array(
95
+		add_theme_support('html5', array(
96 96
 			'search-form',
97 97
 			'comment-form',
98 98
 			'comment-list',
99 99
 			'gallery',
100 100
 			'caption',
101 101
 			'widgets',
102
-		) );
102
+		));
103 103
 
104 104
 		/**
105 105
 	 * Enable support for Post Formats
106 106
 	 */
107
-		add_theme_support( 'post-formats', array(
107
+		add_theme_support('post-formats', array(
108 108
 			'image',
109 109
 			'video',
110 110
 			'quote',
@@ -112,35 +112,35 @@  discard block
 block discarded – undo
112 112
 			'gallery',
113 113
 			'audio',
114 114
 			'chat',
115
-		) );
115
+		));
116 116
 
117 117
 		// Setup the WordPress core custom background feature.
118 118
 		add_theme_support('custom-background', apply_filters('strip_custom_background_args', array(
119 119
 			'default-color' => 'ffffff',
120 120
 			'default-image' => '',
121
-		) ) );
121
+		)));
122 122
 	}
123 123
 
124 124
 	/**
125 125
 	* This theme styles the visual editor to resemble the theme style,
126 126
 	* specifically font, colors, icons, and column width.
127 127
 	*/
128
-	add_editor_style( array( '/assets/css/editor-style.css', '/assets/fonts/fenix.css' ) );
128
+	add_editor_style(array('/assets/css/editor-style.css', '/assets/fonts/fenix.css'));
129 129
 
130 130
 	// Indicate widget sidebars can use selective refresh in the Customizer.
131 131
 	// See https://make.wordpress.org/core/2016/03/22/implementing-selective-refresh-support-for-widgets/ for detail.
132
-	add_theme_support( 'customize-selective-refresh-widgets' );
132
+	add_theme_support('customize-selective-refresh-widgets');
133 133
 endif; // strip_setup.
134
-add_action( 'after_setup_theme', 'strip_setup' );
134
+add_action('after_setup_theme', 'strip_setup');
135 135
 
136 136
 /**
137 137
  * Register widgetized area and update sidebar with default widgets
138 138
  */
139 139
 function strip_widgets_init() {
140 140
 	register_sidebar(array(
141
-		'name'          => __( 'Main Sidebar', 'strip' ),
141
+		'name'          => __('Main Sidebar', 'strip'),
142 142
 		'id'            => 'sidebar',
143
-		'description'   => __( 'The main body widget area', 'strip' ),
143
+		'description'   => __('The main body widget area', 'strip'),
144 144
 		'before_widget' => '<aside id="%1$s" class="widget %2$s">',
145 145
 		'after_widget'	=> '</aside>',
146 146
 		'before_title'	=> '<h2 class="widget-title">',
@@ -148,10 +148,10 @@  discard block
 block discarded – undo
148 148
 	));
149 149
 
150 150
 	// First footer widget area, located in the footer. Empty by default.
151
-	register_sidebar( array(
152
-		'name'          => __( 'First Footer Widget', 'strip' ),
151
+	register_sidebar(array(
152
+		'name'          => __('First Footer Widget', 'strip'),
153 153
 		'id'            => 'first-footer-widget',
154
-		'description'   => __( 'The first footer widget', 'strip' ),
154
+		'description'   => __('The first footer widget', 'strip'),
155 155
 		'before_widget' => '<aside id="%1$s" class="widget %2$s">',
156 156
 		'after_widget'	=> '</aside>',
157 157
 		'before_title'	=> '<h3 class="widget-title">',
@@ -160,9 +160,9 @@  discard block
 block discarded – undo
160 160
 
161 161
 	// Second Footer Widget Area, located in the footer. Empty by default.
162 162
 	register_sidebar(array(
163
-		'name'          => __( 'Second Footer Widget', 'strip' ),
163
+		'name'          => __('Second Footer Widget', 'strip'),
164 164
 		'id'            => 'second-footer-widget',
165
-		'description'   => __( 'The second footer widget', 'strip' ),
165
+		'description'   => __('The second footer widget', 'strip'),
166 166
 		'before_widget' => '<aside id="%1$s" class="widget %2$s">',
167 167
 		'after_widget'	=> '</aside>',
168 168
 		'before_title'	=> '<h3 class="widget-title">',
@@ -171,9 +171,9 @@  discard block
 block discarded – undo
171 171
 
172 172
 	// Third Footer Widget Area, located in the footer. Empty by default.
173 173
 	register_sidebar(array(
174
-		'name'          => __( 'Third Footer Widget', 'strip' ),
174
+		'name'          => __('Third Footer Widget', 'strip'),
175 175
 		'id'            => 'third-footer-widget',
176
-		'description'   => __( 'The third footer widget', 'strip' ),
176
+		'description'   => __('The third footer widget', 'strip'),
177 177
 		'before_widget' => '<aside id="%1$s" class="widget %2$s">',
178 178
 		'after_widget'	=> '</aside>',
179 179
 		'before_title'	=> '<h3 class="widget-title">',
@@ -182,9 +182,9 @@  discard block
 block discarded – undo
182 182
 
183 183
 	// Fourth Footer Widget Area, located in the footer. Empty by default.
184 184
 	register_sidebar(array(
185
-		'name'           => __( 'Fourth Footer Widget', 'strip' ),
185
+		'name'           => __('Fourth Footer Widget', 'strip'),
186 186
 		'id'             => 'fourth-footer-widget',
187
-		'description'    => __( 'The fourth footer widget', 'strip' ),
187
+		'description'    => __('The fourth footer widget', 'strip'),
188 188
 		'before_widget'  => '<aside id="%1$s" class="widget %2$s">',
189 189
 		'after_widget'	 => '</aside>',
190 190
 		'before_title'	 => '<h3 class="widget-title">',
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
 	));
193 193
 
194 194
 }
195
-add_action( 'widgets_init', 'strip_widgets_init' );
195
+add_action('widgets_init', 'strip_widgets_init');
196 196
 
197 197
 /**
198 198
  * Handles JavaScript detection.
@@ -204,47 +204,47 @@  discard block
 block discarded – undo
204 204
 function strip_javascript_detection() {
205 205
 	echo "<script>(function(html){html.className = html.className.replace(/\bno-js\b/,'js')})(document.documentElement);</script>\n";
206 206
 }
207
-add_action( 'wp_head', 'strip_javascript_detection', 0 );
207
+add_action('wp_head', 'strip_javascript_detection', 0);
208 208
 
209 209
 /**
210 210
  * Enqueue_styles for custom fonts.
211 211
  */
212 212
 function strip_scripts() {
213 213
 	// add custom font here if any.
214
-	wp_enqueue_style( 'fenix', get_template_directory_uri() . '/assets/fonts/fenix.css', array(), null );
214
+	wp_enqueue_style('fenix', get_template_directory_uri() . '/assets/fonts/fenix.css', array(), null);
215 215
 
216
-	wp_enqueue_style( 'inconsolata', get_template_directory_uri() . '/assets/fonts/inconsolata.css', array(), null );
216
+	wp_enqueue_style('inconsolata', get_template_directory_uri() . '/assets/fonts/inconsolata.css', array(), null);
217 217
 
218 218
 	// Theme stylesheet.
219
-	wp_enqueue_style( 'strip-style', get_stylesheet_uri() );
219
+	wp_enqueue_style('strip-style', get_stylesheet_uri());
220 220
 
221 221
 	// Load the Internet Explorer specific stylesheet. Conditional stylesheet — tested and works with IE9 on Windows7.
222
-	wp_enqueue_style( 'strip-ie', get_template_directory_uri() . 'assets/css/ie.css', array( 'strip-style' ), '20160305' );
223
-	wp_style_add_data( 'strip-ie', 'conditional', 'lt IE 10' );
222
+	wp_enqueue_style('strip-ie', get_template_directory_uri() . 'assets/css/ie.css', array('strip-style'), '20160305');
223
+	wp_style_add_data('strip-ie', 'conditional', 'lt IE 10');
224 224
 
225
-	if ( has_nav_menu( 'primary' ) ) {
226
-		wp_enqueue_script( 'strip-navigation', get_template_directory_uri() . '/assets/js/min/navigation-min.js', array(), '1.0', true );
225
+	if (has_nav_menu('primary')) {
226
+		wp_enqueue_script('strip-navigation', get_template_directory_uri() . '/assets/js/min/navigation-min.js', array(), '1.0', true);
227 227
 	}
228 228
 
229 229
 	// Load the html5 shiv.
230
-	wp_enqueue_script( 'strip-html5', get_template_directory_uri() . '/assets/js/min/html5-min.js', array(), '3.7.3' );
231
-	wp_script_add_data( 'strip-html5', 'conditional', 'lt IE 9' );
230
+	wp_enqueue_script('strip-html5', get_template_directory_uri() . '/assets/js/min/html5-min.js', array(), '3.7.3');
231
+	wp_script_add_data('strip-html5', 'conditional', 'lt IE 9');
232 232
 
233
-	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
+	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);
234 234
 
235
-	if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
236
-		wp_enqueue_script( 'comment-reply' );
235
+	if (is_singular() && comments_open() && get_option('thread_comments')) {
236
+		wp_enqueue_script('comment-reply');
237 237
 
238 238
 			// toggle comments js.
239
-			wp_enqueue_script( 'strip-toggle-comments', get_template_directory_uri() . '/assets/js/min/toggle-comments-min.js', array( 'jquery' ), '1.2', true );
239
+			wp_enqueue_script('strip-toggle-comments', get_template_directory_uri() . '/assets/js/min/toggle-comments-min.js', array('jquery'), '1.2', true);
240 240
 
241
-		if ( is_single() && wp_attachment_is_image() ) {
242
-			wp_enqueue_script( 'strip-keyboard-image-navigation', get_template_directory_uri() . '/assets/js/min/keyboard-image-navigation-min.js', array( 'jquery' ), '20160412', true );
241
+		if (is_single() && wp_attachment_is_image()) {
242
+			wp_enqueue_script('strip-keyboard-image-navigation', get_template_directory_uri() . '/assets/js/min/keyboard-image-navigation-min.js', array('jquery'), '20160412', true);
243 243
 		}
244 244
 	}
245 245
 }
246 246
 
247
-add_action( 'wp_enqueue_scripts', 'strip_scripts' );
247
+add_action('wp_enqueue_scripts', 'strip_scripts');
248 248
 
249 249
 /**
250 250
  * Implement the Custom Header feature.
@@ -271,14 +271,14 @@  discard block
 block discarded – undo
271 271
  */
272 272
 require get_template_directory() . '/inc/jetpack.php';
273 273
 
274
-add_action( 'wp_enqueue_scripts', 'enqueue_royal_sliders' );
274
+add_action('wp_enqueue_scripts', 'enqueue_royal_sliders');
275 275
 /**
276 276
  * Register RoyalSLider
277 277
  */
278 278
 function enqueue_royal_sliders() {
279
-	if ( function_exists( 'register_new_royalslider_files' ) ) {
279
+	if (function_exists('register_new_royalslider_files')) {
280 280
 		// you could try this: if ( is_single() && is_archive() ) { but you don't really need it.
281
-			register_new_royalslider_files( 1 ); // 1 is RoyalSlider configuration number
281
+			register_new_royalslider_files(1); // 1 is RoyalSlider configuration number
282 282
 		// add } if use is_single etc.
283 283
 	}
284 284
 }
@@ -291,24 +291,24 @@  discard block
 block discarded – undo
291 291
  * @link https://gist.github.com/SilentComics/0a7ea47942eb759dbb48eac2b7be1bbc/
292 292
  */
293 293
 function get_first_image() {
294
-	$post  = get_post();
294
+	$post = get_post();
295 295
 	$first_img = '';
296
-	preg_match_all( '/<img.+src=[\'"]([^\'"]+)[\'"].*>/i', do_shortcode( $post->post_content, 'gallery' ), $matches );
297
-	  $first_img = isset( $matches[1][0] ) ? $matches[1][0] : null;
296
+	preg_match_all('/<img.+src=[\'"]([^\'"]+)[\'"].*>/i', do_shortcode($post->post_content, 'gallery'), $matches);
297
+	  $first_img = isset($matches[1][0]) ? $matches[1][0] : null;
298 298
 
299
-	if ( empty( $first_img ) ) {
299
+	if (empty($first_img)) {
300 300
 			return get_template_directory_uri() . '/assets/images/empty.png'; // path to default image.
301 301
 	}
302 302
 
303 303
 		// Now we have the $first_img but we want the thumbnail of that image.
304
-		$explode = explode( '.', $first_img );
305
-		$count = count( $explode );
304
+		$explode = explode('.', $first_img);
305
+		$count = count($explode);
306 306
 		$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.
307
-		$explode[ $count -2 ] = $explode[ $count -2 ] . '' . $size;
308
-		$thumb_img = implode( '.', $explode );
307
+		$explode[$count - 2] = $explode[$count - 2] . '' . $size;
308
+		$thumb_img = implode('.', $explode);
309 309
 		return $thumb_img;
310 310
 }
311
-	add_filter( 'get_first_image', 'thumbnail' );
311
+	add_filter('get_first_image', 'thumbnail');
312 312
 
313 313
 /**
314 314
  * Register Custom Post Type for comics
@@ -316,24 +316,24 @@  discard block
 block discarded – undo
316 316
 function comic_post_type() {
317 317
 
318 318
 	$labels = array(
319
-		'name'                       => _x( 'Comics', 'Post Type General Name', 'strip' ),
320
-		'singular_name'              => _x( 'Comic', 'Post Type Singular Name', 'strip' ),
321
-		'menu_name'                  => _x( 'Comics', 'admin menu', 'strip' ),
322
-		'name_admin_bar'             => _x( 'Comic', 'add new on admin bar', 'strip' ),
323
-		'parent_item_colon'	         => __( 'Parent Comic:', 'strip' ),
324
-		'all_items'                  => __( 'All Comics', 'strip' ),
325
-		'add_new_item'               => __( 'Add New Comic', 'strip' ),
326
-		'add_new'                    => __( 'Add New Comic', 'strip' ),
327
-		'new_item'                   => __( 'New Comic', 'strip' ),
328
-		'edit_item'                  => __( 'Edit Comic', 'strip' ),
329
-		'update_item'                => __( 'Update Comic', 'strip' ),
330
-		'view_item'                  => __( 'View Comic', 'strip' ),
331
-		'search_items'               => __( 'Search Item', 'strip' ),
332
-		'not_found'                  => __( 'No Comics found', 'strip' ),
333
-		'not_found_in_trash'         => __( 'No Comics found in Trash', 'strip' ),
334
-		'items_list'                 => __( 'Comics list', 'strip' ),
335
-		'items_list_navigation'      => __( 'Comics list navigation', 'strip' ),
336
-		'filter_items_list'          => __( 'Filter Comics list', 'strip' ),
319
+		'name'                       => _x('Comics', 'Post Type General Name', 'strip'),
320
+		'singular_name'              => _x('Comic', 'Post Type Singular Name', 'strip'),
321
+		'menu_name'                  => _x('Comics', 'admin menu', 'strip'),
322
+		'name_admin_bar'             => _x('Comic', 'add new on admin bar', 'strip'),
323
+		'parent_item_colon'	         => __('Parent Comic:', 'strip'),
324
+		'all_items'                  => __('All Comics', 'strip'),
325
+		'add_new_item'               => __('Add New Comic', 'strip'),
326
+		'add_new'                    => __('Add New Comic', 'strip'),
327
+		'new_item'                   => __('New Comic', 'strip'),
328
+		'edit_item'                  => __('Edit Comic', 'strip'),
329
+		'update_item'                => __('Update Comic', 'strip'),
330
+		'view_item'                  => __('View Comic', 'strip'),
331
+		'search_items'               => __('Search Item', 'strip'),
332
+		'not_found'                  => __('No Comics found', 'strip'),
333
+		'not_found_in_trash'         => __('No Comics found in Trash', 'strip'),
334
+		'items_list'                 => __('Comics list', 'strip'),
335
+		'items_list_navigation'      => __('Comics list navigation', 'strip'),
336
+		'filter_items_list'          => __('Filter Comics list', 'strip'),
337 337
 	);
338 338
 
339 339
 	$supports = array(
@@ -350,11 +350,11 @@  discard block
 block discarded – undo
350 350
 	);
351 351
 
352 352
 	$args = array(
353
-		'label'                      => __( 'Comic', 'strip' ),
354
-		'description'                => __( 'Publish Comics and Webcomics', 'strip' ),
353
+		'label'                      => __('Comic', 'strip'),
354
+		'description'                => __('Publish Comics and Webcomics', 'strip'),
355 355
 		'labels'                     => $labels,
356 356
 		'supports'                   => $supports,
357
-		'taxonomies'                 => array( 'story', 'story_term', 'draft' ),
357
+		'taxonomies'                 => array('story', 'story_term', 'draft'),
358 358
 		'hierarchical'               => true,
359 359
 		'public'                     => true,
360 360
 		'show_ui'                    => true,
@@ -367,40 +367,40 @@  discard block
 block discarded – undo
367 367
 		'has_archive'                => true,
368 368
 		'feeds'                      => true,
369 369
 		'exclude_from_search'        => false,
370
-		'rewrite'                    => array( 'slug' => 'stories', 'with_front' => true ),
370
+		'rewrite'                    => array('slug' => 'stories', 'with_front' => true),
371 371
 		'publicly_queryable'	       => true,
372 372
 		'capability_type'            => 'post',
373 373
 	);
374
-	register_post_type( 'comic', $args );
374
+	register_post_type('comic', $args);
375 375
 }
376 376
 
377 377
 // Hook into the 'init' action.
378
-add_action( 'init', 'comic_post_type', 0 ); // End of register_cpt_comic().
378
+add_action('init', 'comic_post_type', 0); // End of register_cpt_comic().
379 379
 
380 380
 	/**
381 381
 	 * Register Custom Taxonomy 'story'
382 382
 	 */
383 383
 function comic_story_taxonomy() {
384 384
 	$labels = array(
385
-		'name'                       => _x( 'Comic Story', 'Taxonomy General Name', 'strip' ),
386
-		'singular_name'              => _x( 'Comic Story', 'Taxonomy Singular Name', 'strip' ),
387
-		'menu_name'                  => __( 'Comic Stories', 'strip' ),
388
-		'all_items'                  => __( 'All Comic Stories', 'strip' ),
389
-		'parent_item'                => __( 'Parent Story', 'strip' ),
390
-		'parent_item_colon'          => __( 'Parent Story:', 'strip' ),
391
-		'new_item_name'              => __( 'New Comic Story', 'strip' ),
392
-		'add_new_item'               => __( 'Add New Story', 'strip' ),
393
-		'edit_item'                  => __( 'Edit Story', 'strip' ),
394
-		'update_item'                => __( 'Update Story', 'strip' ),
395
-		'view_item'                  => __( 'View Item', 'strip' ),
396
-		'separate_items_with_commas' => __( 'Separate stories with commas', 'strip' ),
397
-		'add_or_remove_items'        => __( 'Add or Remove Stories', 'strip' ),
398
-		'choose_from_most_used'      => __( 'Choose from the most used stories', 'strip' ),
399
-		'popular_items'              => __( 'Popular comic stories', 'strip' ),
400
-		'search_items'               => __( 'Search Stories', 'strip' ),
401
-		'not_found'                  => __( 'No comic Stories found', 'strip' ),
402
-		'items_list'                 => __( 'Comic Stories list', 'strip' ),
403
-		'items_list_navigation'      => __( 'Comic Stories list navigation', 'strip' ),
385
+		'name'                       => _x('Comic Story', 'Taxonomy General Name', 'strip'),
386
+		'singular_name'              => _x('Comic Story', 'Taxonomy Singular Name', 'strip'),
387
+		'menu_name'                  => __('Comic Stories', 'strip'),
388
+		'all_items'                  => __('All Comic Stories', 'strip'),
389
+		'parent_item'                => __('Parent Story', 'strip'),
390
+		'parent_item_colon'          => __('Parent Story:', 'strip'),
391
+		'new_item_name'              => __('New Comic Story', 'strip'),
392
+		'add_new_item'               => __('Add New Story', 'strip'),
393
+		'edit_item'                  => __('Edit Story', 'strip'),
394
+		'update_item'                => __('Update Story', 'strip'),
395
+		'view_item'                  => __('View Item', 'strip'),
396
+		'separate_items_with_commas' => __('Separate stories with commas', 'strip'),
397
+		'add_or_remove_items'        => __('Add or Remove Stories', 'strip'),
398
+		'choose_from_most_used'      => __('Choose from the most used stories', 'strip'),
399
+		'popular_items'              => __('Popular comic stories', 'strip'),
400
+		'search_items'               => __('Search Stories', 'strip'),
401
+		'not_found'                  => __('No comic Stories found', 'strip'),
402
+		'items_list'                 => __('Comic Stories list', 'strip'),
403
+		'items_list_navigation'      => __('Comic Stories list navigation', 'strip'),
404 404
 	);
405 405
 	$args = array(
406 406
 		'labels'                     => $labels,
@@ -412,14 +412,14 @@  discard block
 block discarded – undo
412 412
 		'show_in_nav_menus'          => true,
413 413
 		'show_tagcloud'              => true,
414 414
 		'query_var'	                 => true,
415
-		'rewrite'                    => array( 'slug' => 'story' ),
415
+		'rewrite'                    => array('slug' => 'story'),
416 416
 	);
417
-	register_taxonomy( 'story', array( 'comic' ), $args );
418
-	register_taxonomy_for_object_type( 'story', 'comic' );
417
+	register_taxonomy('story', array('comic'), $args);
418
+	register_taxonomy_for_object_type('story', 'comic');
419 419
 }
420 420
 
421 421
 // Hook into the 'init' action.
422
-add_action( 'init', 'comic_story_taxonomy', 0 );
422
+add_action('init', 'comic_story_taxonomy', 0);
423 423
 
424 424
 /**
425 425
  * Function strip rewrite rules.
@@ -428,31 +428,31 @@  discard block
 block discarded – undo
428 428
 	flush_rewrite_rules();
429 429
 }
430 430
 /* Flush rewrite rules for custom post types. */
431
-add_action( 'after_switch_theme', 'strip_rewrite_rules' );
431
+add_action('after_switch_theme', 'strip_rewrite_rules');
432 432
 
433 433
 // Add Print taxonomy, NOT hierarchical (like tags)
434 434
 // Register Custom Taxonomy.
435 435
 	$labels = array(
436
-		'name'                       => _x( 'Prints', 'Taxonomy General Name', 'strip' ),
437
-		'singular_name'              => _x( 'Print', 'Taxonomy Singular Name', 'strip' ),
438
-		'menu_name'                  => __( 'Print', 'strip' ),
439
-		'all_items'                  => __( 'All Prints', 'strip' ),
440
-		'parent_item'                => __( 'Parent Print', 'strip' ),
441
-		'parent_item_colon'          => __( 'Parent Print:', 'strip' ),
442
-		'new_item_name'              => __( 'New Print Name', 'strip' ),
443
-		'add_new_item'               => __( 'Add New Print', 'strip' ),
444
-		'edit_item'                  => __( 'Edit Print', 'strip' ),
445
-		'update_item'                => __( 'Update Pring', 'strip' ),
446
-		'view_item'                  => __( 'View Print', 'strip' ),
447
-		'separate_items_with_commas' => __( 'Separate prints with commas', 'strip' ),
448
-		'add_or_remove_items'        => __( 'Add or remove prints', 'strip' ),
449
-		'choose_from_most_used'      => __( 'Choose from the most used', 'strip' ),
450
-		'popular_items'              => __( 'Popular Prints', 'strip' ),
451
-		'search_items'               => __( 'Search Prints', 'strip' ),
452
-		'not_found'                  => __( 'Not Found', 'strip' ),
453
-		'no_terms'                   => __( 'No prints', 'strip' ),
454
-		'items_list'                 => __( 'Prints list', 'strip' ),
455
-		'items_list_navigation'      => __( 'Prints list navigation', 'strip' ),
436
+		'name'                       => _x('Prints', 'Taxonomy General Name', 'strip'),
437
+		'singular_name'              => _x('Print', 'Taxonomy Singular Name', 'strip'),
438
+		'menu_name'                  => __('Print', 'strip'),
439
+		'all_items'                  => __('All Prints', 'strip'),
440
+		'parent_item'                => __('Parent Print', 'strip'),
441
+		'parent_item_colon'          => __('Parent Print:', 'strip'),
442
+		'new_item_name'              => __('New Print Name', 'strip'),
443
+		'add_new_item'               => __('Add New Print', 'strip'),
444
+		'edit_item'                  => __('Edit Print', 'strip'),
445
+		'update_item'                => __('Update Pring', 'strip'),
446
+		'view_item'                  => __('View Print', 'strip'),
447
+		'separate_items_with_commas' => __('Separate prints with commas', 'strip'),
448
+		'add_or_remove_items'        => __('Add or remove prints', 'strip'),
449
+		'choose_from_most_used'      => __('Choose from the most used', 'strip'),
450
+		'popular_items'              => __('Popular Prints', 'strip'),
451
+		'search_items'               => __('Search Prints', 'strip'),
452
+		'not_found'                  => __('Not Found', 'strip'),
453
+		'no_terms'                   => __('No prints', 'strip'),
454
+		'items_list'                 => __('Prints list', 'strip'),
455
+		'items_list_navigation'      => __('Prints list navigation', 'strip'),
456 456
 	);
457 457
 
458 458
 	$args = array(
@@ -464,21 +464,21 @@  discard block
 block discarded – undo
464 464
 		'show_in_nav_menus'          => true,
465 465
 		'show_tagcloud'              => true,
466 466
 	);
467
-	register_taxonomy( 'print', array( 'comic' ), $args );
467
+	register_taxonomy('print', array('comic'), $args);
468 468
 
469 469
 	/*
470 470
 	* WooCommerce Hooks
471 471
 	* Layout
472 472
 	*/
473
-	remove_action( 'woocommerce_before_main_content', 'woocommerce_breadcrumb', 20, 0 );
474
-	remove_action( 'woocommerce_before_main_content', 'woocommerce_output_content_wrapper', 10 );
475
-	remove_action( 'woocommerce_after_main_content', 'woocommerce_output_content_wrapper_end', 10 );
473
+	remove_action('woocommerce_before_main_content', 'woocommerce_breadcrumb', 20, 0);
474
+	remove_action('woocommerce_before_main_content', 'woocommerce_output_content_wrapper', 10);
475
+	remove_action('woocommerce_after_main_content', 'woocommerce_output_content_wrapper_end', 10);
476 476
 	// remove_action( 'woocommerce_after_shop_loop', 'woocommerce_pagination', 10 ); // removes woo pagination.
477
-	remove_action( 'woocommerce_before_shop_loop', 'woocommerce_result_count', 20 );
478
-	remove_action( 'woocommerce_before_shop_loop', 'woocommerce_catalog_ordering', 30 );
477
+	remove_action('woocommerce_before_shop_loop', 'woocommerce_result_count', 20);
478
+	remove_action('woocommerce_before_shop_loop', 'woocommerce_catalog_ordering', 30);
479 479
 
480
-	add_action( 'woocommerce_before_main_content', 'strip_wrapper_start', 10 );
481
-	add_action( 'woocommerce_after_main_content', 'strip_wrapper_end', 10 );
480
+	add_action('woocommerce_before_main_content', 'strip_wrapper_start', 10);
481
+	add_action('woocommerce_after_main_content', 'strip_wrapper_end', 10);
482 482
 
483 483
 		 /**
484 484
 		  * WooCommerce wrapper
@@ -494,13 +494,13 @@  discard block
 block discarded – undo
494 494
 		echo '</section>';
495 495
 	}
496 496
 
497
-	add_action( 'after_setup_theme', 'woocommerce_support' );
497
+	add_action('after_setup_theme', 'woocommerce_support');
498 498
 	/**
499 499
 	 * Add WooCommerce support
500 500
 	 * https://docs.woothemes.com/document/third-party-custom-theme-compatibility/*
501 501
 	 */
502 502
 	function woocommerce_support() {
503
-		add_theme_support( 'woocommerce' );
503
+		add_theme_support('woocommerce');
504 504
 	}
505 505
 
506 506
 	/**
@@ -508,13 +508,13 @@  discard block
 block discarded – undo
508 508
 	 */
509 509
 	function wp_enqueue_woocommerce_style() {
510 510
 
511
-			wp_register_style( 'strip-woocommerce', get_template_directory_uri() . '/assets/css/woocommerce-min.css' );
512
-		if ( class_exists( 'woocommerce' ) ) {
513
-			wp_enqueue_style( 'strip-woocommerce' );
511
+			wp_register_style('strip-woocommerce', get_template_directory_uri() . '/assets/css/woocommerce-min.css');
512
+		if (class_exists('woocommerce')) {
513
+			wp_enqueue_style('strip-woocommerce');
514 514
 		}
515 515
 	}
516 516
 
517
-	add_action( 'wp_enqueue_scripts', 'wp_enqueue_woocommerce_style' );
517
+	add_action('wp_enqueue_scripts', 'wp_enqueue_woocommerce_style');
518 518
 
519 519
 	/**
520 520
 * Optimize WooCommerce Scripts
@@ -525,53 +525,53 @@  discard block
 block discarded – undo
525 525
 * @link https://gist.github.com/DevinWalker/7621777
526 526
 * @link http://dessky.com/blog/disable-woocommerce-scripts-and-styles/
527 527
 */
528
-	add_action( 'wp_enqueue_scripts', 'strip_manage_woocommerce_styles', 99 );
528
+	add_action('wp_enqueue_scripts', 'strip_manage_woocommerce_styles', 99);
529 529
 
530 530
 	/**
531 531
 	 * Remove some WooCommerce queries.
532 532
 	 */
533 533
 	function strip_manage_woocommerce_styles() {
534 534
 		// remove generator meta tag.
535
-		remove_action( 'wp_head', array( 'woocommerce', 'generator' ) );
535
+		remove_action('wp_head', array('woocommerce', 'generator'));
536 536
 		// first check that woo exists to prevent fatal errors.
537
-		if ( function_exists( 'strip_is_woocommerce_activated' ) ) {
537
+		if (function_exists('strip_is_woocommerce_activated')) {
538 538
 			// dequeue scripts and styles, unless we're in the store.
539
-			if ( ! is_woocommerce() && ! is_cart() && ! is_checkout() ) {
540
-				wp_dequeue_style( 'woocommerce_frontend_styles' );
541
-				wp_dequeue_style( 'woocommerce-general' );
542
-				wp_dequeue_style( 'woocommerce-layout' );
543
-				wp_dequeue_style( 'woocommerce-smallscreen' );
544
-				wp_dequeue_style( 'woocommerce_fancybox_styles' );
545
-				wp_dequeue_style( 'woocommerce_chosen_styles' );
546
-				wp_dequeue_style( 'woocommerce_prettyPhoto_css' );
547
-				wp_dequeue_style( 'select2' );
548
-				wp_dequeue_style( 'strip-woocommerce' ); // the theme's CSS overwrite.
549
-				wp_dequeue_script( 'wc-add-payment-method' );
550
-				wp_dequeue_script( 'wc-lost-password' );
551
-				wp_dequeue_script( 'wc_price_slider' );
552
-				wp_dequeue_script( 'wc-single-product' );
553
-				wp_dequeue_script( 'wc-add-to-cart' );
554
-				wp_dequeue_script( 'wc-cart-fragments' );
555
-				wp_dequeue_script( 'wc-credit-card-form' );
556
-				wp_dequeue_script( 'wc-checkout' );
557
-				wp_dequeue_script( 'wc-add-to-cart-variation' );
558
-				wp_dequeue_script( 'wc-single-product' );
559
-				wp_dequeue_script( 'wc-cart' );
560
-				wp_dequeue_script( 'wc-chosen' );
561
-				wp_dequeue_script( 'woocommerce' );
562
-				wp_dequeue_script( 'jquery-cookie' );
563
-				wp_dequeue_script( 'prettyPhoto' );
564
-				wp_dequeue_script( 'prettyPhoto-init' );
565
-				wp_dequeue_script( 'jquery-blockui' );
566
-				wp_dequeue_script( 'jquery-placeholder' );
567
-				wp_dequeue_script( 'jquery-payment' );
568
-				wp_dequeue_script( 'fancybox' );
569
-				wp_dequeue_script( 'jqueryui' );
539
+			if ( ! is_woocommerce() && ! is_cart() && ! is_checkout()) {
540
+				wp_dequeue_style('woocommerce_frontend_styles');
541
+				wp_dequeue_style('woocommerce-general');
542
+				wp_dequeue_style('woocommerce-layout');
543
+				wp_dequeue_style('woocommerce-smallscreen');
544
+				wp_dequeue_style('woocommerce_fancybox_styles');
545
+				wp_dequeue_style('woocommerce_chosen_styles');
546
+				wp_dequeue_style('woocommerce_prettyPhoto_css');
547
+				wp_dequeue_style('select2');
548
+				wp_dequeue_style('strip-woocommerce'); // the theme's CSS overwrite.
549
+				wp_dequeue_script('wc-add-payment-method');
550
+				wp_dequeue_script('wc-lost-password');
551
+				wp_dequeue_script('wc_price_slider');
552
+				wp_dequeue_script('wc-single-product');
553
+				wp_dequeue_script('wc-add-to-cart');
554
+				wp_dequeue_script('wc-cart-fragments');
555
+				wp_dequeue_script('wc-credit-card-form');
556
+				wp_dequeue_script('wc-checkout');
557
+				wp_dequeue_script('wc-add-to-cart-variation');
558
+				wp_dequeue_script('wc-single-product');
559
+				wp_dequeue_script('wc-cart');
560
+				wp_dequeue_script('wc-chosen');
561
+				wp_dequeue_script('woocommerce');
562
+				wp_dequeue_script('jquery-cookie');
563
+				wp_dequeue_script('prettyPhoto');
564
+				wp_dequeue_script('prettyPhoto-init');
565
+				wp_dequeue_script('jquery-blockui');
566
+				wp_dequeue_script('jquery-placeholder');
567
+				wp_dequeue_script('jquery-payment');
568
+				wp_dequeue_script('fancybox');
569
+				wp_dequeue_script('jqueryui');
570 570
 			}
571 571
 		}
572 572
 	}
573 573
 
574
-	add_action( 'pre_get_posts', 'strip_set_posts_per_page' );
574
+	add_action('pre_get_posts', 'strip_set_posts_per_page');
575 575
 	/**
576 576
 	 * Set posts, WooCommerce products & comics number per archive page
577 577
 	 * Fixes 404 error on pagination due to CTP conflicting with WordPress posts_per_page default
@@ -580,12 +580,12 @@  discard block
 block discarded – undo
580 580
 	 * @param WP_Query $query strip_set_posts_per_page.
581 581
 	 * @return $query
582 582
 	 */
583
-	function strip_set_posts_per_page( $query ) {
584
-		if ( is_post_type_archive( 'product' ) ) {
585
-			$query->set( 'posts_per_page', 4 );
583
+	function strip_set_posts_per_page($query) {
584
+		if (is_post_type_archive('product')) {
585
+			$query->set('posts_per_page', 4);
586 586
 			return  $query;
587
-		} elseif ( is_tax( 'story' ) ) {
588
-			$query->set( 'posts_per_page', 6 );
587
+		} elseif (is_tax('story')) {
588
+			$query->set('posts_per_page', 6);
589 589
 		}
590 590
 	}
591 591
 
@@ -594,13 +594,13 @@  discard block
 block discarded – undo
594 594
 	 *
595 595
 	 * @param string $query strip_add_comics_to_blog.
596 596
 	 */
597
-	function strip_add_comics_to_blog( $query ) {
598
-		if ( is_home() && $query->is_main_query() ) {
599
-			$query->set( 'post_type', array( 'post', 'comic' ) );
597
+	function strip_add_comics_to_blog($query) {
598
+		if (is_home() && $query->is_main_query()) {
599
+			$query->set('post_type', array('post', 'comic'));
600 600
 				return $query;
601 601
 		}
602 602
 	}
603
-		add_action( 'pre_get_posts', 'strip_add_comics_to_blog' );
603
+		add_action('pre_get_posts', 'strip_add_comics_to_blog');
604 604
 
605 605
 	/**
606 606
 	 * Set an automatic default custom taxonomy for comic posts.
@@ -610,35 +610,35 @@  discard block
 block discarded – undo
610 610
 	 * @param	string $post_id set_default_object_terms.
611 611
 	 * @param	string $post set_default_object_terms.
612 612
 	 */
613
-	function set_default_object_terms( $post_id, $post ) {
614
-		if ( 'publish' === $post->post_status && 'comic' === $post->post_type ) {
613
+	function set_default_object_terms($post_id, $post) {
614
+		if ('publish' === $post->post_status && 'comic' === $post->post_type) {
615 615
 			$defaults = array(
616
-			'story' => array( 'draft' ),
616
+			'story' => array('draft'),
617 617
 			);
618
-			$taxonomies = get_object_taxonomies( $post->post_type );
619
-			foreach ( (array) $taxonomies as $taxonomy ) {
620
-				$terms = get_the_terms( $post_id, $taxonomy );
621
-				if ( empty( $terms ) && array_key_exists( $taxonomy, $defaults ) ) {
622
-					wp_set_object_terms( $post_id, $defaults[ $taxonomy ], $taxonomy );
618
+			$taxonomies = get_object_taxonomies($post->post_type);
619
+			foreach ((array) $taxonomies as $taxonomy) {
620
+				$terms = get_the_terms($post_id, $taxonomy);
621
+				if (empty($terms) && array_key_exists($taxonomy, $defaults)) {
622
+					wp_set_object_terms($post_id, $defaults[$taxonomy], $taxonomy);
623 623
 				}
624 624
 			}
625 625
 		}
626 626
 	}
627
-	add_action( 'save_post', 'set_default_object_terms', 0, 2 );
627
+	add_action('save_post', 'set_default_object_terms', 0, 2);
628 628
 
629 629
 	/**
630 630
 	 * Remove jquery migrate $scripts for enhanced performance.
631 631
 	 *
632 632
 	 * @param strings $scripts remove_jquery_migrate.
633 633
 	 */
634
-	function remove_jquery_migrate( $scripts ) {
635
-		if ( is_admin() ) {
634
+	function remove_jquery_migrate($scripts) {
635
+		if (is_admin()) {
636 636
 			return;
637 637
 		}
638
-		 $scripts->remove( 'jquery' );
639
-		 $scripts->add( 'jquery', false, array( 'jquery-core' ), '1.10.2' );
638
+		 $scripts->remove('jquery');
639
+		 $scripts->add('jquery', false, array('jquery-core'), '1.10.2');
640 640
 	}
641
-		add_action( 'wp_default_scripts', 'remove_jquery_migrate' );
641
+		add_action('wp_default_scripts', 'remove_jquery_migrate');
642 642
 
643 643
 		/**
644 644
 		 * Remove login errors notices (security)
@@ -646,4 +646,4 @@  discard block
 block discarded – undo
646 646
 	function no_wordpress_errors() {
647 647
 		return 'Something is wrong!';
648 648
 	}
649
-		add_filter( 'login_errors', 'no_wordpress_errors' );
649
+		add_filter('login_errors', 'no_wordpress_errors');
Please login to merge, or discard this patch.