@@ -13,70 +13,70 @@ discard block |
||
13 | 13 | <div id="primary" |
14 | 14 | <div id="content" role="main"> |
15 | 15 | |
16 | - <?php if ( have_posts() ) : ?> |
|
16 | + <?php if (have_posts()) : ?> |
|
17 | 17 | |
18 | 18 | <header class="page-header"> |
19 | 19 | <div class="wrap"> |
20 | 20 | <h1 class="page-title"> |
21 | 21 | <?php |
22 | - if ( is_author() && get_the_author_meta( 'description' ) ) { |
|
22 | + if (is_author() && get_the_author_meta('description')) { |
|
23 | 23 | echo '<div class="author-index shorter">'; |
24 | - get_template_part( 'inc/author','box' ); |
|
24 | + get_template_part('inc/author', 'box'); |
|
25 | 25 | echo '</div>'; |
26 | 26 | } |
27 | 27 | ?> |
28 | 28 | <?php |
29 | - if ( is_category() ) : |
|
30 | - printf( esc_html__( 'Category Archives: %s', 'strip' ), '<span>' . single_cat_title( '', false ) . '</span>' ); |
|
29 | + if (is_category()) : |
|
30 | + printf(esc_html__('Category Archives: %s', 'strip'), '<span>' . single_cat_title('', false) . '</span>'); |
|
31 | 31 | |
32 | - elseif ( is_tag() ) : |
|
33 | - printf( esc_html__( 'Tag Archives: %s', 'strip' ), '<span>' . single_tag_title( '', false ) . '</span>' ); |
|
32 | + elseif (is_tag()) : |
|
33 | + printf(esc_html__('Tag Archives: %s', 'strip'), '<span>' . single_tag_title('', false) . '</span>'); |
|
34 | 34 | |
35 | - elseif ( is_author() ) : |
|
36 | - printf( esc_html__( 'All articles by %s', 'strip' ), '<span class="vcard">' . get_the_author() . '</span>' ); |
|
35 | + elseif (is_author()) : |
|
36 | + printf(esc_html__('All articles by %s', 'strip'), '<span class="vcard">' . get_the_author() . '</span>'); |
|
37 | 37 | |
38 | - elseif ( is_day() ) : |
|
39 | - printf( esc_html__( 'Daily Archives: %s', 'strip' ), '<span>' . get_the_date() . '</span>' ); |
|
38 | + elseif (is_day()) : |
|
39 | + printf(esc_html__('Daily Archives: %s', 'strip'), '<span>' . get_the_date() . '</span>'); |
|
40 | 40 | |
41 | - elseif ( is_month() ) : |
|
42 | - printf( esc_html__( 'Monthly Archives: %s', 'strip' ), '<span>' . get_the_date( 'F Y' ) . '</span>' ); |
|
41 | + elseif (is_month()) : |
|
42 | + printf(esc_html__('Monthly Archives: %s', 'strip'), '<span>' . get_the_date('F Y') . '</span>'); |
|
43 | 43 | |
44 | - elseif ( is_year() ) : |
|
45 | - printf( esc_html__( 'Yearly Archives: %s', 'strip' ), '<span>' . get_the_date( 'Y' ) . '</span>' ); |
|
44 | + elseif (is_year()) : |
|
45 | + printf(esc_html__('Yearly Archives: %s', 'strip'), '<span>' . get_the_date('Y') . '</span>'); |
|
46 | 46 | |
47 | - elseif ( is_tax( 'post_format', 'post-format-aside' ) ) : |
|
48 | - esc_html_e( 'Asides', 'strip' ); |
|
47 | + elseif (is_tax('post_format', 'post-format-aside')) : |
|
48 | + esc_html_e('Asides', 'strip'); |
|
49 | 49 | |
50 | - elseif ( is_tax( 'post_format', 'post-format-gallery' ) ) : |
|
51 | - esc_html_e( 'Galleries', 'strip' ); |
|
50 | + elseif (is_tax('post_format', 'post-format-gallery')) : |
|
51 | + esc_html_e('Galleries', 'strip'); |
|
52 | 52 | |
53 | - elseif ( is_tax( 'post_format', 'post-format-image' ) ) : |
|
54 | - esc_html_e( 'Images', 'strip' ); |
|
53 | + elseif (is_tax('post_format', 'post-format-image')) : |
|
54 | + esc_html_e('Images', 'strip'); |
|
55 | 55 | |
56 | - elseif ( is_tax( 'post_format', 'post-format-video' ) ) : |
|
57 | - esc_html_e( 'Videos', 'strip' ); |
|
56 | + elseif (is_tax('post_format', 'post-format-video')) : |
|
57 | + esc_html_e('Videos', 'strip'); |
|
58 | 58 | |
59 | - elseif ( is_tax( 'post_format', 'post-format-quote' ) ) : |
|
60 | - esc_html_e( 'Quotes', 'strip' ); |
|
59 | + elseif (is_tax('post_format', 'post-format-quote')) : |
|
60 | + esc_html_e('Quotes', 'strip'); |
|
61 | 61 | |
62 | - elseif ( is_tax( 'post_format', 'post-format-link' ) ) : |
|
63 | - esc_html_e( 'Links', 'strip' ); |
|
62 | + elseif (is_tax('post_format', 'post-format-link')) : |
|
63 | + esc_html_e('Links', 'strip'); |
|
64 | 64 | |
65 | - elseif ( is_tax( 'post_format', 'post-format-audio' ) ) : |
|
66 | - esc_html_e( 'Audios', 'strip' ); |
|
65 | + elseif (is_tax('post_format', 'post-format-audio')) : |
|
66 | + esc_html_e('Audios', 'strip'); |
|
67 | 67 | |
68 | - elseif ( is_tax( 'post_format', 'post-format-chat' ) ) : |
|
69 | - esc_html_e( 'Chats', 'strip' ); |
|
68 | + elseif (is_tax('post_format', 'post-format-chat')) : |
|
69 | + esc_html_e('Chats', 'strip'); |
|
70 | 70 | |
71 | - elseif ( is_tax( 'story', 'story_term' ) ) : |
|
72 | - esc_html_e( 'Stories', 'strip' ); |
|
73 | - get_template_part( 'archive-comic' ); |
|
71 | + elseif (is_tax('story', 'story_term')) : |
|
72 | + esc_html_e('Stories', 'strip'); |
|
73 | + get_template_part('archive-comic'); |
|
74 | 74 | |
75 | - elseif ( ! 'comic' === get_post_type() ) : |
|
76 | - esc_html_e( 'Comics', 'strip' ); |
|
75 | + elseif ( ! 'comic' === get_post_type()) : |
|
76 | + esc_html_e('Comics', 'strip'); |
|
77 | 77 | |
78 | 78 | else : |
79 | - esc_html_e( 'Archives', 'strip' ); |
|
79 | + esc_html_e('Archives', 'strip'); |
|
80 | 80 | |
81 | 81 | endif; |
82 | 82 | ?> |
@@ -84,15 +84,15 @@ discard block |
||
84 | 84 | <?php |
85 | 85 | // Show an optional term description. |
86 | 86 | $term_description = term_description(); |
87 | - if ( ! empty( $term_description ) ) : |
|
88 | - '<div class="taxonomy-description"' . printf( esc_html( '%s', $term_description, 'strip' ) ) . '</div>'; |
|
87 | + if ( ! empty($term_description)) : |
|
88 | + '<div class="taxonomy-description"' . printf(esc_html('%s', $term_description, 'strip')) . '</div>'; |
|
89 | 89 | endif; |
90 | 90 | ?> |
91 | 91 | </div><!-- .wrap --> |
92 | 92 | </header><!-- .page-header --> |
93 | 93 | |
94 | 94 | <?php /* Start the Loop */ ?> |
95 | - <?php while ( have_posts() ) : the_post(); ?> |
|
95 | + <?php while (have_posts()) : the_post(); ?> |
|
96 | 96 | |
97 | 97 | <?php |
98 | 98 | |
@@ -101,16 +101,16 @@ discard block |
||
101 | 101 | * If you want to overload this in a child theme then include a file |
102 | 102 | * called content-___.php (where ___ is the Post Format name) and that will be used instead. |
103 | 103 | */ |
104 | - get_template_part( 'content', get_post_format() ); |
|
104 | + get_template_part('content', get_post_format()); |
|
105 | 105 | ?> |
106 | 106 | |
107 | 107 | <?php endwhile; ?> |
108 | 108 | |
109 | - <?php strip_content_nav( 'nav-below' ); ?> |
|
109 | + <?php strip_content_nav('nav-below'); ?> |
|
110 | 110 | |
111 | 111 | <?php else : ?> |
112 | 112 | |
113 | - <?php get_template_part( 'no-results', 'archive' ); ?> |
|
113 | + <?php get_template_part('no-results', 'archive'); ?> |
|
114 | 114 | |
115 | 115 | <?php endif; ?> |
116 | 116 |
@@ -75,8 +75,10 @@ discard block |
||
75 | 75 | elseif ( ! 'comic' === get_post_type() ) : |
76 | 76 | esc_html_e( 'Comics', 'strip' ); |
77 | 77 | |
78 | - else : |
|
78 | + else { |
|
79 | + : |
|
79 | 80 | esc_html_e( 'Archives', 'strip' ); |
81 | + } |
|
80 | 82 | |
81 | 83 | endif; |
82 | 84 | ?> |
@@ -108,9 +110,12 @@ discard block |
||
108 | 110 | |
109 | 111 | <?php strip_content_nav( 'nav-below' ); ?> |
110 | 112 | |
111 | - <?php else : ?> |
|
113 | + <?php else { |
|
114 | + : ?> |
|
112 | 115 | |
113 | - <?php get_template_part( 'no-results', 'archive' ); ?> |
|
116 | + <?php get_template_part( 'no-results', 'archive' ); |
|
117 | +} |
|
118 | +?> |
|
114 | 119 | |
115 | 120 | <?php endif; ?> |
116 | 121 |
@@ -10,27 +10,27 @@ discard block |
||
10 | 10 | |
11 | 11 | <article id="post-<?php the_ID(); ?>" > |
12 | 12 | <div class="wrap"> |
13 | - <?php if ( '' !== get_the_post_thumbnail() ) : ?> |
|
14 | - <?php if ( ! is_single() ) : ?> |
|
15 | - <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"> |
|
16 | - <?php the_post_thumbnail( 'strip-featured-thumbnail' ); ?> |
|
13 | + <?php if ('' !== get_the_post_thumbnail()) : ?> |
|
14 | + <?php if ( ! is_single()) : ?> |
|
15 | + <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"> |
|
16 | + <?php the_post_thumbnail('strip-featured-thumbnail'); ?> |
|
17 | 17 | </a> |
18 | 18 | <?php else : ?> |
19 | - <?php the_post_thumbnail( 'strip-featured-thumbnail' ); ?> |
|
19 | + <?php the_post_thumbnail('strip-featured-thumbnail'); ?> |
|
20 | 20 | <?php endif; ?> |
21 | 21 | <?php endif; ?> |
22 | 22 | |
23 | 23 | <header class="entry-header"> |
24 | 24 | <?php |
25 | - $categories_list = get_the_category_list( __( ', ', 'strip' ) ); |
|
26 | - if ( $categories_list && strip_categorized_blog() ) { |
|
25 | + $categories_list = get_the_category_list(__(', ', 'strip')); |
|
26 | + if ($categories_list && strip_categorized_blog()) { |
|
27 | 27 | echo '<span class="categories-links">' . $categories_list . '</span>'; |
28 | 28 | } |
29 | 29 | |
30 | - if ( ! is_single() ) : |
|
31 | - the_title( '<h1 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h1>' ); |
|
30 | + if ( ! is_single()) : |
|
31 | + the_title('<h1 class="entry-title"><a href="' . esc_url(get_permalink()) . '" rel="bookmark">', '</a></h1>'); |
|
32 | 32 | else : |
33 | - the_title( '<h1 class="entry-title">', '</h1>' ); |
|
33 | + the_title('<h1 class="entry-title">', '</h1>'); |
|
34 | 34 | endif; |
35 | 35 | ?> |
36 | 36 | </header><!-- .entry-header --> |
@@ -38,14 +38,14 @@ discard block |
||
38 | 38 | <footer class="entry-meta"> |
39 | 39 | <?php strip_entry_meta(); ?> |
40 | 40 | |
41 | - <?php if ( ! post_password_required() && ( comments_open() || '0' !== get_comments_number() ) ) : ?> |
|
42 | - <span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'strip' ), __( '1 Comment', 'strip' ), __( '% Comments', 'strip' ) ); ?></span> |
|
41 | + <?php if ( ! post_password_required() && (comments_open() || '0' !== get_comments_number())) : ?> |
|
42 | + <span class="comments-link"><?php comments_popup_link(__('Leave a comment', 'strip'), __('1 Comment', 'strip'), __('% Comments', 'strip')); ?></span> |
|
43 | 43 | <?php endif; ?> |
44 | 44 | |
45 | - <?php edit_post_link( __( 'Edit', 'strip' ), '<span class="edit-link">', '</span>' ); ?> |
|
45 | + <?php edit_post_link(__('Edit', 'strip'), '<span class="edit-link">', '</span>'); ?> |
|
46 | 46 | </footer><!-- .entry-meta --> |
47 | 47 | |
48 | - <?php if ( is_search() ) : // Only display Excerpts for Search. ?> |
|
48 | + <?php if (is_search()) : // Only display Excerpts for Search. ?> |
|
49 | 49 | <div class="entry-summary"> |
50 | 50 | <?php the_excerpt(); ?> |
51 | 51 | </div><!-- .entry-summary --> |
@@ -54,16 +54,16 @@ discard block |
||
54 | 54 | <?php |
55 | 55 | the_content(sprintf( |
56 | 56 | /* translators: %s: Name of current post. */ |
57 | - esc_html( __( 'Continue reading %s <span class="meta-nav">→</span>', 'strip' ), array( 'span' => array( 'class' => array() ) ) ), |
|
58 | - the_title( '<span class="screen-reader-text">"', '"</span>', false ) |
|
57 | + esc_html(__('Continue reading %s <span class="meta-nav">→</span>', 'strip'), array('span' => array('class' => array()))), |
|
58 | + the_title('<span class="screen-reader-text">"', '"</span>', false) |
|
59 | 59 | )); |
60 | 60 | |
61 | 61 | wp_link_pages(array( |
62 | - 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'strip' ) . '</span>', |
|
62 | + 'before' => '<div class="page-links"><span class="page-links-title">' . __('Pages:', 'strip') . '</span>', |
|
63 | 63 | 'after' => '</div>', |
64 | 64 | 'link_before' => '<span>', |
65 | 65 | 'link_after' => '</span>', |
66 | - 'pagelink' => '<span class="screen-reader-text">' . __( 'Page', 'strip' ) . ' </span>%', |
|
66 | + 'pagelink' => '<span class="screen-reader-text">' . __('Page', 'strip') . ' </span>%', |
|
67 | 67 | 'separator' => '<span class="screen-reader-text">, </span>', |
68 | 68 | )); |
69 | 69 | ?> |
@@ -15,8 +15,11 @@ discard block |
||
15 | 15 | <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"> |
16 | 16 | <?php the_post_thumbnail( 'strip-featured-thumbnail' ); ?> |
17 | 17 | </a> |
18 | - <?php else : ?> |
|
19 | - <?php the_post_thumbnail( 'strip-featured-thumbnail' ); ?> |
|
18 | + <?php else { |
|
19 | + : ?> |
|
20 | + <?php the_post_thumbnail( 'strip-featured-thumbnail' ); |
|
21 | +} |
|
22 | +?> |
|
20 | 23 | <?php endif; ?> |
21 | 24 | <?php endif; ?> |
22 | 25 | |
@@ -29,8 +32,10 @@ discard block |
||
29 | 32 | |
30 | 33 | if ( ! is_single() ) : |
31 | 34 | the_title( '<h1 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h1>' ); |
32 | - else : |
|
35 | + else { |
|
36 | + : |
|
33 | 37 | the_title( '<h1 class="entry-title">', '</h1>' ); |
38 | + } |
|
34 | 39 | endif; |
35 | 40 | ?> |
36 | 41 | </header><!-- .entry-header --> |
@@ -49,7 +54,8 @@ discard block |
||
49 | 54 | <div class="entry-summary"> |
50 | 55 | <?php the_excerpt(); ?> |
51 | 56 | </div><!-- .entry-summary --> |
52 | - <?php else : ?> |
|
57 | + <?php else { |
|
58 | + : ?> |
|
53 | 59 | <div class="entry-content"> |
54 | 60 | <?php |
55 | 61 | the_content(sprintf( |
@@ -57,6 +63,7 @@ discard block |
||
57 | 63 | esc_html( __( 'Continue reading %s <span class="meta-nav">→</span>', 'strip' ), array( 'span' => array( 'class' => array() ) ) ), |
58 | 64 | the_title( '<span class="screen-reader-text">"', '"</span>', false ) |
59 | 65 | )); |
66 | +} |
|
60 | 67 | |
61 | 68 | wp_link_pages(array( |
62 | 69 | 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'strip' ) . '</span>', |
@@ -18,7 +18,7 @@ discard block |
||
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 |
||
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 “%s”', 'comments title', 'strip' ), get_the_title() ); |
|
36 | + printf(esc_html_x('One Reply to “%s”', 'comments title', 'strip'), get_the_title()); |
|
37 | 37 | } else { |
38 | 38 | printf( |
39 | 39 | /* translators: 1: number of comments, 2: post title */ |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | 'comments title', |
45 | 45 | 'strip' |
46 | 46 | ), |
47 | - number_format_i18n( $comments_number ), |
|
47 | + number_format_i18n($comments_number), |
|
48 | 48 | get_the_title() |
49 | 49 | ); |
50 | 50 | } |
@@ -53,26 +53,26 @@ discard block |
||
53 | 53 | |
54 | 54 | <ol class="comment-list"> |
55 | 55 | <?php |
56 | - wp_list_comments( array( |
|
56 | + wp_list_comments(array( |
|
57 | 57 | 'avatar_size' => 96, |
58 | 58 | 'style' => 'ol', |
59 | 59 | 'short_ping' => true, |
60 | - 'reply_text' => __( 'Reply', 'strip' ), |
|
61 | - ) ); |
|
60 | + 'reply_text' => __('Reply', 'strip'), |
|
61 | + )); |
|
62 | 62 | ?> |
63 | 63 | </ol> |
64 | 64 | |
65 | - <?php the_comments_pagination( array( |
|
66 | - 'prev_text' => '<span class="screen-reader-text">' . __( 'Previous', 'strip' ) . '</span>', |
|
67 | - 'next_text' => '<span class="screen-reader-text">' . __( 'Next', 'strip' ) . '</span>', |
|
68 | - ) ); |
|
65 | + <?php the_comments_pagination(array( |
|
66 | + 'prev_text' => '<span class="screen-reader-text">' . __('Previous', 'strip') . '</span>', |
|
67 | + 'next_text' => '<span class="screen-reader-text">' . __('Next', 'strip') . '</span>', |
|
68 | + )); |
|
69 | 69 | |
70 | 70 | endif; // Check for have_comments(). |
71 | 71 | |
72 | 72 | // If comments are closed and there are comments, let's leave a little note, shall we? |
73 | - if ( ! comments_open() && get_comments_number() && post_type_supports( get_post_type(), 'comments' ) ) : ?> |
|
73 | + if ( ! comments_open() && get_comments_number() && post_type_supports(get_post_type(), 'comments')) : ?> |
|
74 | 74 | |
75 | - <p class="no-comments"><?php esc_html_e( 'Comments are closed.', 'strip' ); ?></p> |
|
75 | + <p class="no-comments"><?php esc_html_e('Comments are closed.', 'strip'); ?></p> |
|
76 | 76 | <?php |
77 | 77 | endif; |
78 | 78 |
@@ -17,10 +17,10 @@ discard block |
||
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,16 +31,16 @@ discard block |
||
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 | - <?php strip_content_nav( 'nav-below' ); ?> |
|
39 | + <?php strip_content_nav('nav-below'); ?> |
|
40 | 40 | |
41 | 41 | <?php else : ?> |
42 | 42 | |
43 | - <?php get_template_part( 'no-results', 'index' ); ?> |
|
43 | + <?php get_template_part('no-results', 'index'); ?> |
|
44 | 44 | |
45 | 45 | <?php endif; ?> |
46 | 46 |
@@ -38,9 +38,12 @@ |
||
38 | 38 | |
39 | 39 | <?php strip_content_nav( 'nav-below' ); ?> |
40 | 40 | |
41 | - <?php else : ?> |
|
41 | + <?php else { |
|
42 | + : ?> |
|
42 | 43 | |
43 | - <?php get_template_part( 'no-results', 'index' ); ?> |
|
44 | + <?php get_template_part( 'no-results', 'index' ); |
|
45 | +} |
|
46 | +?> |
|
44 | 47 | |
45 | 48 | <?php endif; ?> |
46 | 49 |
@@ -6,7 +6,7 @@ discard block |
||
6 | 6 | * @subpackage Strip |
7 | 7 | */ |
8 | 8 | |
9 | -get_header( 'lite' ); |
|
9 | +get_header('lite'); |
|
10 | 10 | $content_width = 1920; |
11 | 11 | ?> |
12 | 12 | <div id="primary" class="content-area image-attachment"> |
@@ -14,7 +14,7 @@ discard block |
||
14 | 14 | |
15 | 15 | <?php |
16 | 16 | // Start the loop. |
17 | - while ( have_posts() ) : |
|
17 | + while (have_posts()) : |
|
18 | 18 | the_post(); ?> |
19 | 19 | |
20 | 20 | <article id="post-<?php the_ID(); ?>"> |
@@ -30,9 +30,9 @@ discard block |
||
30 | 30 | * |
31 | 31 | * @param string $image_size Image size. Default 'full'. |
32 | 32 | */ |
33 | - $image_size = apply_filters( 'strip_attachment_size', 'full' ); |
|
33 | + $image_size = apply_filters('strip_attachment_size', 'full'); |
|
34 | 34 | |
35 | - echo wp_get_attachment_image( get_the_ID(), $image_size ); |
|
35 | + echo wp_get_attachment_image(get_the_ID(), $image_size); |
|
36 | 36 | |
37 | 37 | ?> |
38 | 38 | |
@@ -41,18 +41,18 @@ discard block |
||
41 | 41 | <?php // image navigation. ?> |
42 | 42 | <nav role="navigation" id="image-navigation" class="image-navigation"> |
43 | 43 | |
44 | - <div class="previous"><?php previous_image_link( false, __( '<span class="meta-nav">←</span> <span class="text-nav">Previous panel</span>', 'strip' ) ); ?></div> |
|
45 | - <div class="next"><?php next_image_link( false, __( '<span class="meta-nav">→</span> <span class="text-nav">Next panel</span>', 'strip' ) ); ?></div> |
|
44 | + <div class="previous"><?php previous_image_link(false, __('<span class="meta-nav">←</span> <span class="text-nav">Previous panel</span>', 'strip')); ?></div> |
|
45 | + <div class="next"><?php next_image_link(false, __('<span class="meta-nav">→</span> <span class="text-nav">Next panel</span>', 'strip')); ?></div> |
|
46 | 46 | |
47 | 47 | <nav class="post-parent-title"> |
48 | - <?php printf( '<a href="%s" class="post-parent-title">%s</a>', |
|
49 | - esc_url( get_permalink( $post->post_parent ) ), |
|
50 | - esc_html( get_the_title( $post->post_parent ) ) |
|
48 | + <?php printf('<a href="%s" class="post-parent-title">%s</a>', |
|
49 | + esc_url(get_permalink($post->post_parent)), |
|
50 | + esc_html(get_the_title($post->post_parent)) |
|
51 | 51 | ); ?> |
52 | 52 | </nav> |
53 | 53 | </nav><!-- #image-navigation --><!-- #image-navigation --> |
54 | 54 | |
55 | - <?php if ( has_excerpt() ) : ?> |
|
55 | + <?php if (has_excerpt()) : ?> |
|
56 | 56 | <div class="entry-caption"> |
57 | 57 | <?php the_excerpt(); ?> |
58 | 58 | </div><!-- .entry-caption --> |
@@ -74,4 +74,4 @@ discard block |
||
74 | 74 | </div><!-- #content --> |
75 | 75 | </div><!-- #primary --> |
76 | 76 | |
77 | -<?php get_footer( 'lite' ); ?> |
|
77 | +<?php get_footer('lite'); ?> |
@@ -7,12 +7,12 @@ discard block |
||
7 | 7 | */ |
8 | 8 | |
9 | 9 | ?> |
10 | -<article id="post-<?php the_ID(); ?>" <?php post_class( 'clear' ); ?>> |
|
10 | +<article id="post-<?php the_ID(); ?>" <?php post_class('clear'); ?>> |
|
11 | 11 | <div class="entry-wrap wrap clear"> |
12 | - <?php if ( '' !== get_the_post_thumbnail() ) : ?> |
|
12 | + <?php if ('' !== get_the_post_thumbnail()) : ?> |
|
13 | 13 | |
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' ); ?> |
|
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 endif; ?> |
18 | 18 | |
@@ -24,36 +24,36 @@ discard block |
||
24 | 24 | |
25 | 25 | <?php // calls each series by get_the_terms, custom taxonomy "story" instead of WP native category. |
26 | 26 | |
27 | - $terms = get_the_terms( $post->ID, 'story' ); |
|
27 | + $terms = get_the_terms($post->ID, 'story'); |
|
28 | 28 | |
29 | - foreach ( $terms as $term ) { |
|
29 | + foreach ($terms as $term) { |
|
30 | 30 | // The $term is an object, so we don't need to specify the $taxonomy. |
31 | - $term_link = get_term_link( $term ); |
|
31 | + $term_link = get_term_link($term); |
|
32 | 32 | // If there was an error, continue to the next term. |
33 | - if ( is_wp_error( $term_link ) ) { |
|
33 | + if (is_wp_error($term_link)) { |
|
34 | 34 | continue; |
35 | 35 | } |
36 | 36 | |
37 | 37 | // We successfully got a link. Print it out. ?> |
38 | 38 | <nav class="categories-links"> |
39 | - <?php printf( '<a href="%s" class="categories-links">%s</a>', |
|
40 | - esc_url( $term_link ) , |
|
41 | - esc_html( $term->name ) |
|
39 | + <?php printf('<a href="%s" class="categories-links">%s</a>', |
|
40 | + esc_url($term_link), |
|
41 | + esc_html($term->name) |
|
42 | 42 | ); |
43 | 43 | } ?> |
44 | 44 | </nav> |
45 | 45 | |
46 | - <?php edit_post_link( __( 'Edit Comic', 'strip' ), '<span class="edit-link">', '</span>' ); |
|
46 | + <?php edit_post_link(__('Edit Comic', 'strip'), '<span class="edit-link">', '</span>'); |
|
47 | 47 | |
48 | - if ( ! is_single() ) : |
|
49 | - the_title( '<h1 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h1>' ); |
|
48 | + if ( ! is_single()) : |
|
49 | + the_title('<h1 class="entry-title"><a href="' . esc_url(get_permalink()) . '" rel="bookmark">', '</a></h1>'); |
|
50 | 50 | else : |
51 | - the_title( '<h1 class="entry-title">', '</h1>' ); |
|
51 | + the_title('<h1 class="entry-title">', '</h1>'); |
|
52 | 52 | endif; ?> |
53 | 53 | |
54 | 54 | </header><!-- .entry-header --> |
55 | 55 | |
56 | - <?php if ( is_search() ) : // Only display Excerpts for Search — implement search for custom taxonomies. ?> |
|
56 | + <?php if (is_search()) : // Only display Excerpts for Search — implement search for custom taxonomies. ?> |
|
57 | 57 | |
58 | 58 | <div class="entry-summary"> |
59 | 59 | |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | <?php else : ?> |
64 | 64 | |
65 | 65 | <div class="entry-comic"> |
66 | - <?php the_content( __( 'Continue watching <span class="meta-nav">→</span>', 'strip' ) ); ?> |
|
66 | + <?php the_content(__('Continue watching <span class="meta-nav">→</span>', 'strip')); ?> |
|
67 | 67 | |
68 | 68 | <?php endif; ?> |
69 | 69 | </div><!-- .entry-content --> |
@@ -47,8 +47,10 @@ discard block |
||
47 | 47 | |
48 | 48 | if ( ! is_single() ) : |
49 | 49 | the_title( '<h1 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h1>' ); |
50 | - else : |
|
50 | + else { |
|
51 | + : |
|
51 | 52 | the_title( '<h1 class="entry-title">', '</h1>' ); |
53 | + } |
|
52 | 54 | endif; ?> |
53 | 55 | |
54 | 56 | </header><!-- .entry-header --> |
@@ -60,10 +62,13 @@ discard block |
||
60 | 62 | <?php the_excerpt(); ?> |
61 | 63 | </div><!-- .entry-summary --> |
62 | 64 | |
63 | - <?php else : ?> |
|
65 | + <?php else { |
|
66 | + : ?> |
|
64 | 67 | |
65 | 68 | <div class="entry-comic"> |
66 | - <?php the_content( __( 'Continue watching <span class="meta-nav">→</span>', 'strip' ) ); ?> |
|
69 | + <?php the_content( __( 'Continue watching <span class="meta-nav">→</span>', 'strip' ) ); |
|
70 | +} |
|
71 | +?> |
|
67 | 72 | |
68 | 73 | <?php endif; ?> |
69 | 74 | </div><!-- .entry-content --> |
@@ -81,8 +81,8 @@ discard block |
||
81 | 81 | add_filter( 'the_content', 'filter_ptags_on_images' ); |
82 | 82 | |
83 | 83 | /** |
84 | - * This theme uses wp_nav_menu() in one location. |
|
85 | - */ |
|
84 | + * This theme uses wp_nav_menu() in one location. |
|
85 | + */ |
|
86 | 86 | register_nav_menus(array( |
87 | 87 | 'primary' => __( 'Primary Menu', 'strip' ), |
88 | 88 | )); |
@@ -100,8 +100,8 @@ discard block |
||
100 | 100 | ) ); |
101 | 101 | |
102 | 102 | /** |
103 | - * Enable support for Post Formats |
|
104 | - */ |
|
103 | + * Enable support for Post Formats |
|
104 | + */ |
|
105 | 105 | add_theme_support( 'post-formats', array( |
106 | 106 | 'aside', |
107 | 107 | 'image', |
@@ -122,9 +122,9 @@ discard block |
||
122 | 122 | } |
123 | 123 | |
124 | 124 | /** |
125 | - * This theme styles the visual editor to resemble the theme style, |
|
126 | - * specifically font, colors, icons, and column width. |
|
127 | - */ |
|
125 | + * This theme styles the visual editor to resemble the theme style, |
|
126 | + * specifically font, colors, icons, and column width. |
|
127 | + */ |
|
128 | 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. |
@@ -9,11 +9,11 @@ discard block |
||
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,31 +28,31 @@ discard block |
||
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 | /** |
41 | 41 | * Add default posts and comments RSS feed links to head |
42 | 42 | */ |
43 | - add_theme_support( 'automatic-feed-links' ); |
|
43 | + add_theme_support('automatic-feed-links'); |
|
44 | 44 | |
45 | 45 | /** |
46 | 46 | * Enable support for title-tag. Allows themes to add document title tag to HTML <head> (since version 4.1.). |
47 | 47 | */ |
48 | - add_theme_support( 'title-tag' ); |
|
48 | + add_theme_support('title-tag'); |
|
49 | 49 | |
50 | 50 | /** |
51 | 51 | * Enable support for custom logo. |
52 | 52 | * |
53 | 53 | * @since strip 1.0 |
54 | 54 | */ |
55 | - add_theme_support( 'custom-logo', array( |
|
55 | + add_theme_support('custom-logo', array( |
|
56 | 56 | 'height' => 156, |
57 | 57 | 'width' => 312, |
58 | 58 | 'flex-height' => true, |
@@ -65,9 +65,9 @@ discard block |
||
65 | 65 | * |
66 | 66 | * @link https://developer.wordpress.org/themes/functionality/featured-images-post-thumbnails/ |
67 | 67 | */ |
68 | - add_theme_support( 'post-thumbnails' ); |
|
69 | - set_post_thumbnail_size( 1920, 0 ); // was using add_image_size. |
|
70 | - add_image_size( 'story-thumb', 312, 156, true ); // cropped. |
|
68 | + add_theme_support('post-thumbnails'); |
|
69 | + set_post_thumbnail_size(1920, 0); // was using add_image_size. |
|
70 | + add_image_size('story-thumb', 312, 156, true); // cropped. |
|
71 | 71 | |
72 | 72 | /** |
73 | 73 | * See https://css-tricks.com/snippets/wordpress/remove-paragraph-tags-from-around-images/ |
@@ -75,34 +75,34 @@ discard block |
||
75 | 75 | * |
76 | 76 | * @param $strings $content filter_ptags_on_images. |
77 | 77 | */ |
78 | - function filter_ptags_on_images( $content ) { |
|
79 | - return preg_replace( '/<p>\s*(<a .*>)?\s*(<img .* \/>)\s*(<\/a>)?\s*<\/p>/iU', '\1\2\3', $content ); |
|
78 | + function filter_ptags_on_images($content) { |
|
79 | + return preg_replace('/<p>\s*(<a .*>)?\s*(<img .* \/>)\s*(<\/a>)?\s*<\/p>/iU', '\1\2\3', $content); |
|
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 | + )); |
|
101 | 101 | |
102 | 102 | /** |
103 | 103 | * Enable support for Post Formats |
104 | 104 | */ |
105 | - add_theme_support( 'post-formats', array( |
|
105 | + add_theme_support('post-formats', array( |
|
106 | 106 | 'aside', |
107 | 107 | 'image', |
108 | 108 | 'video', |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | 'status', |
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( |
@@ -125,22 +125,22 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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(), '20120206', true ); |
|
225 | + if (has_nav_menu('primary')) { |
|
226 | + wp_enqueue_script('strip-navigation', get_template_directory_uri() . '/assets/js/min/navigation-min.js', array(), '20120206', 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(), '20130115', true ); |
|
233 | + wp_enqueue_script('strip-skip-link-focus-fix', get_template_directory_uri() . '/assets/js/min/skip-link-focus-fix-min.js', array(), '20130115', true); |
|
234 | 234 | |
235 | 235 | // toggle comments js. |
236 | - wp_enqueue_script( 'strip-toggle-comments', get_template_directory_uri() . '/assets/js/min/toggle-comments-min.js', array( 'jquery' ), '20160401', false ); |
|
236 | + wp_enqueue_script('strip-toggle-comments', get_template_directory_uri() . '/assets/js/min/toggle-comments-min.js', array('jquery'), '20160401', false); |
|
237 | 237 | |
238 | - if ( is_single() && comments_open() && get_option( 'thread_comments' ) ) { |
|
239 | - wp_enqueue_script( 'comment-reply' ); |
|
238 | + if (is_single() && comments_open() && get_option('thread_comments')) { |
|
239 | + wp_enqueue_script('comment-reply'); |
|
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' ), '20120202' ); |
|
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'), '20120202'); |
|
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. |
@@ -278,24 +278,24 @@ discard block |
||
278 | 278 | * @link https://css-tricks.com/snippets/wordpress/get-the-first-image-from-a-post/ |
279 | 279 | * see https://gist.github.com/tommaitland/8001524 |
280 | 280 | */ |
281 | -function get_first_image( $size = false ) { |
|
281 | +function get_first_image($size = false) { |
|
282 | 282 | global $post, $_wp_additional_image_sizes; |
283 | 283 | $first_img = ''; |
284 | 284 | |
285 | - $output = preg_match_all( '/<img.+src=[\'"]([^\'"]+)[\'"].*>/i', do_shortcode( $post->post_content, 'gallery' ), $matches ); |
|
285 | + $output = preg_match_all('/<img.+src=[\'"]([^\'"]+)[\'"].*>/i', do_shortcode($post->post_content, 'gallery'), $matches); |
|
286 | 286 | $first_img = $matches [1][0]; |
287 | 287 | |
288 | - if ( empty( $first_img ) ) { |
|
288 | + if (empty($first_img)) { |
|
289 | 289 | return get_template_directory_uri() . '/assets/images/empty.png'; // path to default image. |
290 | 290 | } |
291 | - if ( $size && $_wp_additional_image_sizes[ $size ]['crop'] !== 1 ) { |
|
292 | - $size = '-' . $_wp_additional_image_sizes[ $size ]['width'] . 'x' . $_wp_additional_image_sizes[ $size ]['height'] . '.jpg'; |
|
291 | + if ($size && $_wp_additional_image_sizes[$size]['crop'] !== 1) { |
|
292 | + $size = '-' . $_wp_additional_image_sizes[$size]['width'] . 'x' . $_wp_additional_image_sizes[$size]['height'] . '.jpg'; |
|
293 | 293 | $pattern = '/-\d+x\d+\.jpg$/i'; |
294 | - $first_img = preg_replace( $pattern, $size, $first_img ); |
|
294 | + $first_img = preg_replace($pattern, $size, $first_img); |
|
295 | 295 | } |
296 | 296 | return $first_img; |
297 | 297 | } |
298 | - add_filter( 'first_img', 'get_first_image', 'thumbnail' ); |
|
298 | + add_filter('first_img', 'get_first_image', 'thumbnail'); |
|
299 | 299 | |
300 | 300 | /** |
301 | 301 | * Register Custom Post Type for comics |
@@ -303,24 +303,24 @@ discard block |
||
303 | 303 | function comic_post_type() { |
304 | 304 | |
305 | 305 | $labels = array( |
306 | - 'name' => _x( 'Comics', 'Post Type General Name', 'strip' ), |
|
307 | - 'singular_name' => _x( 'Comic', 'Post Type Singular Name', 'strip' ), |
|
308 | - 'menu_name' => _x( 'Comics', 'admin menu', 'strip' ), |
|
309 | - 'name_admin_bar' => _x( 'Comic', 'add new on admin bar', 'strip' ), |
|
310 | - 'parent_item_colon' => __( 'Parent Comic:', 'strip' ), |
|
311 | - 'all_items' => __( 'All Comics', 'strip' ), |
|
312 | - 'add_new_item' => __( 'Add New Comic', 'strip' ), |
|
313 | - 'add_new' => __( 'Add New Comic', 'strip' ), |
|
314 | - 'new_item' => __( 'New Comic', 'strip' ), |
|
315 | - 'edit_item' => __( 'Edit Comic', 'strip' ), |
|
316 | - 'update_item' => __( 'Update Comic', 'strip' ), |
|
317 | - 'view_item' => __( 'View Comic', 'strip' ), |
|
318 | - 'search_items' => __( 'Search Item', 'strip' ), |
|
319 | - 'not_found' => __( 'No Comics found', 'strip' ), |
|
320 | - 'not_found_in_trash' => __( 'No Comics found in Trash', 'strip' ), |
|
321 | - 'items_list' => __( 'Comics list', 'strip' ), |
|
322 | - 'items_list_navigation' => __( 'Comics list navigation', 'strip' ), |
|
323 | - 'filter_items_list' => __( 'Filter Comics list', 'strip' ), |
|
306 | + 'name' => _x('Comics', 'Post Type General Name', 'strip'), |
|
307 | + 'singular_name' => _x('Comic', 'Post Type Singular Name', 'strip'), |
|
308 | + 'menu_name' => _x('Comics', 'admin menu', 'strip'), |
|
309 | + 'name_admin_bar' => _x('Comic', 'add new on admin bar', 'strip'), |
|
310 | + 'parent_item_colon' => __('Parent Comic:', 'strip'), |
|
311 | + 'all_items' => __('All Comics', 'strip'), |
|
312 | + 'add_new_item' => __('Add New Comic', 'strip'), |
|
313 | + 'add_new' => __('Add New Comic', 'strip'), |
|
314 | + 'new_item' => __('New Comic', 'strip'), |
|
315 | + 'edit_item' => __('Edit Comic', 'strip'), |
|
316 | + 'update_item' => __('Update Comic', 'strip'), |
|
317 | + 'view_item' => __('View Comic', 'strip'), |
|
318 | + 'search_items' => __('Search Item', 'strip'), |
|
319 | + 'not_found' => __('No Comics found', 'strip'), |
|
320 | + 'not_found_in_trash' => __('No Comics found in Trash', 'strip'), |
|
321 | + 'items_list' => __('Comics list', 'strip'), |
|
322 | + 'items_list_navigation' => __('Comics list navigation', 'strip'), |
|
323 | + 'filter_items_list' => __('Filter Comics list', 'strip'), |
|
324 | 324 | ); |
325 | 325 | |
326 | 326 | $supports = array( |
@@ -337,11 +337,11 @@ discard block |
||
337 | 337 | ); |
338 | 338 | |
339 | 339 | $args = array( |
340 | - 'label' => __( 'Comic', 'strip' ), |
|
341 | - 'description' => __( 'Publish Comics and Webcomics', 'strip' ), |
|
340 | + 'label' => __('Comic', 'strip'), |
|
341 | + 'description' => __('Publish Comics and Webcomics', 'strip'), |
|
342 | 342 | 'labels' => $labels, |
343 | 343 | 'supports' => $supports, |
344 | - 'taxonomies' => array( 'story', 'story_term', 'draft' ), |
|
344 | + 'taxonomies' => array('story', 'story_term', 'draft'), |
|
345 | 345 | 'hierarchical' => true, |
346 | 346 | 'public' => true, |
347 | 347 | 'show_ui' => true, |
@@ -354,40 +354,40 @@ discard block |
||
354 | 354 | 'has_archive' => true, |
355 | 355 | 'feeds' => true, |
356 | 356 | 'exclude_from_search' => false, |
357 | - 'rewrite' => array( 'slug' => 'stories', 'with_front' => true ), |
|
357 | + 'rewrite' => array('slug' => 'stories', 'with_front' => true), |
|
358 | 358 | 'publicly_queryable' => true, |
359 | 359 | 'capability_type' => 'post', |
360 | 360 | ); |
361 | - register_post_type( 'comic', $args ); |
|
361 | + register_post_type('comic', $args); |
|
362 | 362 | } |
363 | 363 | |
364 | 364 | // Hook into the 'init' action. |
365 | -add_action( 'init', 'comic_post_type', 0 ); // End of register_cpt_comic(). |
|
365 | +add_action('init', 'comic_post_type', 0); // End of register_cpt_comic(). |
|
366 | 366 | |
367 | 367 | /** |
368 | 368 | * Register Custom Taxonomy 'story' |
369 | 369 | */ |
370 | 370 | function comic_story_taxonomy() { |
371 | 371 | $labels = array( |
372 | - 'name' => _x( 'Comic Story', 'Taxonomy General Name', 'strip' ), |
|
373 | - 'singular_name' => _x( 'Comic Story', 'Taxonomy Singular Name', 'strip' ), |
|
374 | - 'menu_name' => __( 'Comic Stories', 'strip' ), |
|
375 | - 'all_items' => __( 'All Comic Stories', 'strip' ), |
|
376 | - 'parent_item' => __( 'Parent Story', 'strip' ), |
|
377 | - 'parent_item_colon' => __( 'Parent Story:', 'strip' ), |
|
378 | - 'new_item_name' => __( 'New Comic Story', 'strip' ), |
|
379 | - 'add_new_item' => __( 'Add New Story', 'strip' ), |
|
380 | - 'edit_item' => __( 'Edit Story', 'strip' ), |
|
381 | - 'update_item' => __( 'Update Story', 'strip' ), |
|
382 | - 'view_item' => __( 'View Item', 'strip' ), |
|
383 | - 'separate_items_with_commas' => __( 'Separate stories with commas', 'strip' ), |
|
384 | - 'add_or_remove_items' => __( 'Add or Remove Stories', 'strip' ), |
|
385 | - 'choose_from_most_used' => __( 'Choose from the most used stories', 'strip' ), |
|
386 | - 'popular_items' => __( 'Popular comic stories', 'strip' ), |
|
387 | - 'search_items' => __( 'Search Stories', 'strip' ), |
|
388 | - 'not_found' => __( 'No comic Stories found', 'strip' ), |
|
389 | - 'items_list' => __( 'Comic Stories list', 'strip' ), |
|
390 | - 'items_list_navigation' => __( 'Comic Stories list navigation', 'strip' ), |
|
372 | + 'name' => _x('Comic Story', 'Taxonomy General Name', 'strip'), |
|
373 | + 'singular_name' => _x('Comic Story', 'Taxonomy Singular Name', 'strip'), |
|
374 | + 'menu_name' => __('Comic Stories', 'strip'), |
|
375 | + 'all_items' => __('All Comic Stories', 'strip'), |
|
376 | + 'parent_item' => __('Parent Story', 'strip'), |
|
377 | + 'parent_item_colon' => __('Parent Story:', 'strip'), |
|
378 | + 'new_item_name' => __('New Comic Story', 'strip'), |
|
379 | + 'add_new_item' => __('Add New Story', 'strip'), |
|
380 | + 'edit_item' => __('Edit Story', 'strip'), |
|
381 | + 'update_item' => __('Update Story', 'strip'), |
|
382 | + 'view_item' => __('View Item', 'strip'), |
|
383 | + 'separate_items_with_commas' => __('Separate stories with commas', 'strip'), |
|
384 | + 'add_or_remove_items' => __('Add or Remove Stories', 'strip'), |
|
385 | + 'choose_from_most_used' => __('Choose from the most used stories', 'strip'), |
|
386 | + 'popular_items' => __('Popular comic stories', 'strip'), |
|
387 | + 'search_items' => __('Search Stories', 'strip'), |
|
388 | + 'not_found' => __('No comic Stories found', 'strip'), |
|
389 | + 'items_list' => __('Comic Stories list', 'strip'), |
|
390 | + 'items_list_navigation' => __('Comic Stories list navigation', 'strip'), |
|
391 | 391 | ); |
392 | 392 | $args = array( |
393 | 393 | 'labels' => $labels, |
@@ -399,14 +399,14 @@ discard block |
||
399 | 399 | 'show_in_nav_menus' => true, |
400 | 400 | 'show_tagcloud' => true, |
401 | 401 | 'query_var' => true, |
402 | - 'rewrite' => array( 'slug' => 'story' ), |
|
402 | + 'rewrite' => array('slug' => 'story'), |
|
403 | 403 | ); |
404 | - register_taxonomy( 'story', array( 'comic' ), $args ); |
|
405 | - register_taxonomy_for_object_type( 'story', 'comic' ); |
|
404 | + register_taxonomy('story', array('comic'), $args); |
|
405 | + register_taxonomy_for_object_type('story', 'comic'); |
|
406 | 406 | } |
407 | 407 | |
408 | 408 | // Hook into the 'init' action. |
409 | -add_action( 'init', 'comic_story_taxonomy', 0 ); |
|
409 | +add_action('init', 'comic_story_taxonomy', 0); |
|
410 | 410 | |
411 | 411 | /** |
412 | 412 | * Function strip rewrite rules. |
@@ -415,31 +415,31 @@ discard block |
||
415 | 415 | flush_rewrite_rules(); |
416 | 416 | } |
417 | 417 | /* Flush rewrite rules for custom post types. */ |
418 | -add_action( 'after_switch_theme', 'strip_rewrite_rules' ); |
|
418 | +add_action('after_switch_theme', 'strip_rewrite_rules'); |
|
419 | 419 | |
420 | 420 | // Add Print taxonomy, NOT hierarchical (like tags) |
421 | 421 | // Register Custom Taxonomy. |
422 | 422 | $labels = array( |
423 | - 'name' => _x( 'Prints', 'Taxonomy General Name', 'strip' ), |
|
424 | - 'singular_name' => _x( 'Print', 'Taxonomy Singular Name', 'strip' ), |
|
425 | - 'menu_name' => __( 'Print', 'strip' ), |
|
426 | - 'all_items' => __( 'All Prints', 'strip' ), |
|
427 | - 'parent_item' => __( 'Parent Print', 'strip' ), |
|
428 | - 'parent_item_colon' => __( 'Parent Print:', 'strip' ), |
|
429 | - 'new_item_name' => __( 'New Print Name', 'strip' ), |
|
430 | - 'add_new_item' => __( 'Add New Print', 'strip' ), |
|
431 | - 'edit_item' => __( 'Edit Print', 'strip' ), |
|
432 | - 'update_item' => __( 'Update Pring', 'strip' ), |
|
433 | - 'view_item' => __( 'View Print', 'strip' ), |
|
434 | - 'separate_items_with_commas' => __( 'Separate prints with commas', 'strip' ), |
|
435 | - 'add_or_remove_items' => __( 'Add or remove prints', 'strip' ), |
|
436 | - 'choose_from_most_used' => __( 'Choose from the most used', 'strip' ), |
|
437 | - 'popular_items' => __( 'Popular Prints', 'strip' ), |
|
438 | - 'search_items' => __( 'Search Prints', 'strip' ), |
|
439 | - 'not_found' => __( 'Not Found', 'strip' ), |
|
440 | - 'no_terms' => __( 'No prints', 'strip' ), |
|
441 | - 'items_list' => __( 'Prints list', 'strip' ), |
|
442 | - 'items_list_navigation' => __( 'Prints list navigation', 'strip' ), |
|
423 | + 'name' => _x('Prints', 'Taxonomy General Name', 'strip'), |
|
424 | + 'singular_name' => _x('Print', 'Taxonomy Singular Name', 'strip'), |
|
425 | + 'menu_name' => __('Print', 'strip'), |
|
426 | + 'all_items' => __('All Prints', 'strip'), |
|
427 | + 'parent_item' => __('Parent Print', 'strip'), |
|
428 | + 'parent_item_colon' => __('Parent Print:', 'strip'), |
|
429 | + 'new_item_name' => __('New Print Name', 'strip'), |
|
430 | + 'add_new_item' => __('Add New Print', 'strip'), |
|
431 | + 'edit_item' => __('Edit Print', 'strip'), |
|
432 | + 'update_item' => __('Update Pring', 'strip'), |
|
433 | + 'view_item' => __('View Print', 'strip'), |
|
434 | + 'separate_items_with_commas' => __('Separate prints with commas', 'strip'), |
|
435 | + 'add_or_remove_items' => __('Add or remove prints', 'strip'), |
|
436 | + 'choose_from_most_used' => __('Choose from the most used', 'strip'), |
|
437 | + 'popular_items' => __('Popular Prints', 'strip'), |
|
438 | + 'search_items' => __('Search Prints', 'strip'), |
|
439 | + 'not_found' => __('Not Found', 'strip'), |
|
440 | + 'no_terms' => __('No prints', 'strip'), |
|
441 | + 'items_list' => __('Prints list', 'strip'), |
|
442 | + 'items_list_navigation' => __('Prints list navigation', 'strip'), |
|
443 | 443 | ); |
444 | 444 | |
445 | 445 | $args = array( |
@@ -451,21 +451,21 @@ discard block |
||
451 | 451 | 'show_in_nav_menus' => true, |
452 | 452 | 'show_tagcloud' => true, |
453 | 453 | ); |
454 | - register_taxonomy( 'print', array( 'comic' ), $args ); |
|
454 | + register_taxonomy('print', array('comic'), $args); |
|
455 | 455 | |
456 | 456 | /* |
457 | 457 | * WooCommerce Hooks |
458 | 458 | * Layout |
459 | 459 | */ |
460 | - remove_action( 'woocommerce_before_main_content', 'woocommerce_breadcrumb', 20, 0 ); |
|
461 | - remove_action( 'woocommerce_before_main_content', 'woocommerce_output_content_wrapper', 10 ); |
|
462 | - remove_action( 'woocommerce_after_main_content', 'woocommerce_output_content_wrapper_end', 10 ); |
|
463 | - remove_action( 'woocommerce_after_shop_loop', 'woocommerce_pagination', 10 ); |
|
464 | - remove_action( 'woocommerce_before_shop_loop', 'woocommerce_result_count', 20 ); |
|
465 | - remove_action( 'woocommerce_before_shop_loop', 'woocommerce_catalog_ordering', 30 ); |
|
460 | + remove_action('woocommerce_before_main_content', 'woocommerce_breadcrumb', 20, 0); |
|
461 | + remove_action('woocommerce_before_main_content', 'woocommerce_output_content_wrapper', 10); |
|
462 | + remove_action('woocommerce_after_main_content', 'woocommerce_output_content_wrapper_end', 10); |
|
463 | + remove_action('woocommerce_after_shop_loop', 'woocommerce_pagination', 10); |
|
464 | + remove_action('woocommerce_before_shop_loop', 'woocommerce_result_count', 20); |
|
465 | + remove_action('woocommerce_before_shop_loop', 'woocommerce_catalog_ordering', 30); |
|
466 | 466 | |
467 | - add_action( 'woocommerce_before_main_content', 'strip_wrapper_start', 10 ); |
|
468 | - add_action( 'woocommerce_after_main_content', 'strip_wrapper_end', 10 ); |
|
467 | + add_action('woocommerce_before_main_content', 'strip_wrapper_start', 10); |
|
468 | + add_action('woocommerce_after_main_content', 'strip_wrapper_end', 10); |
|
469 | 469 | |
470 | 470 | /** |
471 | 471 | * WooCommerce wrapper |
@@ -481,13 +481,13 @@ discard block |
||
481 | 481 | echo '</section>'; |
482 | 482 | } |
483 | 483 | |
484 | - add_action( 'after_setup_theme', 'woocommerce_support' ); |
|
484 | + add_action('after_setup_theme', 'woocommerce_support'); |
|
485 | 485 | /** |
486 | 486 | * Add WooCommerce support |
487 | 487 | * https://docs.woothemes.com/document/third-party-custom-theme-compatibility/* |
488 | 488 | */ |
489 | 489 | function woocommerce_support() { |
490 | - add_theme_support( 'woocommerce' ); |
|
490 | + add_theme_support('woocommerce'); |
|
491 | 491 | } |
492 | 492 | |
493 | 493 | /** |
@@ -495,13 +495,13 @@ discard block |
||
495 | 495 | */ |
496 | 496 | function wp_enqueue_woocommerce_style() { |
497 | 497 | |
498 | - wp_register_style( 'strip-woocommerce', get_template_directory_uri() . '/assets/css/woocommerce-min.css' ); |
|
499 | - if ( class_exists( 'woocommerce' ) ) { |
|
500 | - wp_enqueue_style( 'strip-woocommerce' ); |
|
498 | + wp_register_style('strip-woocommerce', get_template_directory_uri() . '/assets/css/woocommerce-min.css'); |
|
499 | + if (class_exists('woocommerce')) { |
|
500 | + wp_enqueue_style('strip-woocommerce'); |
|
501 | 501 | } |
502 | 502 | } |
503 | 503 | |
504 | - add_action( 'wp_enqueue_scripts', 'wp_enqueue_woocommerce_style' ); |
|
504 | + add_action('wp_enqueue_scripts', 'wp_enqueue_woocommerce_style'); |
|
505 | 505 | |
506 | 506 | /** |
507 | 507 | * Optimize WooCommerce Scripts |
@@ -512,53 +512,53 @@ discard block |
||
512 | 512 | * @link https://gist.github.com/DevinWalker/7621777 |
513 | 513 | * @link http://dessky.com/blog/disable-woocommerce-scripts-and-styles/ |
514 | 514 | */ |
515 | - add_action( 'wp_enqueue_scripts', 'strip_manage_woocommerce_styles', 99 ); |
|
515 | + add_action('wp_enqueue_scripts', 'strip_manage_woocommerce_styles', 99); |
|
516 | 516 | |
517 | 517 | /** |
518 | 518 | * Remove some WooCommerce queries. |
519 | 519 | */ |
520 | 520 | function strip_manage_woocommerce_styles() { |
521 | 521 | // remove generator meta tag. |
522 | - remove_action( 'wp_head', array( 'woocommerce', 'generator' ) ); // this line when used with $GLOBALS['woocommerce'] prompts an error when Woo is deactivated though. |
|
522 | + remove_action('wp_head', array('woocommerce', 'generator')); // this line when used with $GLOBALS['woocommerce'] prompts an error when Woo is deactivated though. |
|
523 | 523 | // first check that woo exists to prevent fatal errors. |
524 | - if ( function_exists( 'is_woocommerce' ) ) { |
|
524 | + if (function_exists('is_woocommerce')) { |
|
525 | 525 | // dequeue scripts and styles, unless we're in the store. |
526 | - if ( ! is_woocommerce() && ! is_page( 'store' ) && ! is_shop() && ! is_product_category() && ! is_product() && ! is_cart() && ! is_checkout() ) { |
|
527 | - wp_dequeue_style( 'woocommerce_frontend_styles' ); |
|
528 | - wp_dequeue_style( 'woocommerce-general' ); |
|
529 | - wp_dequeue_style( 'woocommerce-layout' ); |
|
530 | - wp_dequeue_style( 'woocommerce-smallscreen' ); |
|
531 | - wp_dequeue_style( 'woocommerce_fancybox_styles' ); |
|
532 | - wp_dequeue_style( 'woocommerce_chosen_styles' ); |
|
533 | - wp_dequeue_style( 'woocommerce_prettyPhoto_css' ); |
|
534 | - wp_dequeue_style( 'select2' ); |
|
535 | - wp_dequeue_style( 'strip-woocommerce' ); // the theme's CSS overwrite. |
|
536 | - wp_dequeue_script( 'wc-add-payment-method' ); |
|
537 | - wp_dequeue_script( 'wc-lost-password' ); |
|
538 | - wp_dequeue_script( 'wc_price_slider' ); |
|
539 | - wp_dequeue_script( 'wc-single-product' ); |
|
540 | - wp_dequeue_script( 'wc-add-to-cart' ); |
|
541 | - wp_dequeue_script( 'wc-cart-fragments' ); |
|
542 | - wp_dequeue_script( 'wc-credit-card-form' ); |
|
543 | - wp_dequeue_script( 'wc-checkout' ); |
|
544 | - wp_dequeue_script( 'wc-add-to-cart-variation' ); |
|
545 | - wp_dequeue_script( 'wc-single-product' ); |
|
546 | - wp_dequeue_script( 'wc-cart' ); |
|
547 | - wp_dequeue_script( 'wc-chosen' ); |
|
548 | - wp_dequeue_script( 'woocommerce' ); |
|
549 | - wp_dequeue_script( 'jquery-cookie' ); |
|
550 | - wp_dequeue_script( 'prettyPhoto' ); |
|
551 | - wp_dequeue_script( 'prettyPhoto-init' ); |
|
552 | - wp_dequeue_script( 'jquery-blockui' ); |
|
553 | - wp_dequeue_script( 'jquery-placeholder' ); |
|
554 | - wp_dequeue_script( 'jquery-payment' ); |
|
555 | - wp_dequeue_script( 'fancybox' ); |
|
556 | - wp_dequeue_script( 'jqueryui' ); |
|
526 | + if ( ! is_woocommerce() && ! is_page('store') && ! is_shop() && ! is_product_category() && ! is_product() && ! is_cart() && ! is_checkout()) { |
|
527 | + wp_dequeue_style('woocommerce_frontend_styles'); |
|
528 | + wp_dequeue_style('woocommerce-general'); |
|
529 | + wp_dequeue_style('woocommerce-layout'); |
|
530 | + wp_dequeue_style('woocommerce-smallscreen'); |
|
531 | + wp_dequeue_style('woocommerce_fancybox_styles'); |
|
532 | + wp_dequeue_style('woocommerce_chosen_styles'); |
|
533 | + wp_dequeue_style('woocommerce_prettyPhoto_css'); |
|
534 | + wp_dequeue_style('select2'); |
|
535 | + wp_dequeue_style('strip-woocommerce'); // the theme's CSS overwrite. |
|
536 | + wp_dequeue_script('wc-add-payment-method'); |
|
537 | + wp_dequeue_script('wc-lost-password'); |
|
538 | + wp_dequeue_script('wc_price_slider'); |
|
539 | + wp_dequeue_script('wc-single-product'); |
|
540 | + wp_dequeue_script('wc-add-to-cart'); |
|
541 | + wp_dequeue_script('wc-cart-fragments'); |
|
542 | + wp_dequeue_script('wc-credit-card-form'); |
|
543 | + wp_dequeue_script('wc-checkout'); |
|
544 | + wp_dequeue_script('wc-add-to-cart-variation'); |
|
545 | + wp_dequeue_script('wc-single-product'); |
|
546 | + wp_dequeue_script('wc-cart'); |
|
547 | + wp_dequeue_script('wc-chosen'); |
|
548 | + wp_dequeue_script('woocommerce'); |
|
549 | + wp_dequeue_script('jquery-cookie'); |
|
550 | + wp_dequeue_script('prettyPhoto'); |
|
551 | + wp_dequeue_script('prettyPhoto-init'); |
|
552 | + wp_dequeue_script('jquery-blockui'); |
|
553 | + wp_dequeue_script('jquery-placeholder'); |
|
554 | + wp_dequeue_script('jquery-payment'); |
|
555 | + wp_dequeue_script('fancybox'); |
|
556 | + wp_dequeue_script('jqueryui'); |
|
557 | 557 | } |
558 | 558 | } |
559 | 559 | } |
560 | 560 | |
561 | - add_action( 'pre_get_posts', 'strip_set_posts_per_page' ); |
|
561 | + add_action('pre_get_posts', 'strip_set_posts_per_page'); |
|
562 | 562 | /** |
563 | 563 | * Set posts, WooCommerce products & comics number per archive page |
564 | 564 | * Fixes 404 error on pagination due to CTP conflicting with WordPress posts_per_page default |
@@ -566,17 +566,17 @@ discard block |
||
566 | 566 | * |
567 | 567 | * @param string $query strip_set_posts_per_page. |
568 | 568 | */ |
569 | - function strip_set_posts_per_page( $query ) { |
|
569 | + function strip_set_posts_per_page($query) { |
|
570 | 570 | |
571 | 571 | global $wp_the_query; |
572 | 572 | |
573 | - if ( ( ! is_admin() ) && ( $query === $wp_the_query ) && ( $query->is_home() ) && ( $query->is_search() ) ) { |
|
574 | - $query->set( 'posts_per_page', 12 ); |
|
573 | + if (( ! is_admin()) && ($query === $wp_the_query) && ($query->is_home()) && ($query->is_search())) { |
|
574 | + $query->set('posts_per_page', 12); |
|
575 | 575 | } |
576 | - if ( ( ! is_admin() ) && ( $query === $wp_the_query ) && ( $query->is_post_type_archive( 'product' ) ) && (taxonomy_exists( 'category' ) ) ) { |
|
577 | - $query->set( 'posts_per_page', 8 ); |
|
578 | - } elseif ( ( ! is_admin() ) && ( $query === $wp_the_query ) && ( $query->is_archive() ) && (is_tax( 'story' ) ) ) { |
|
579 | - $query->set( 'posts_per_page', 3 ); |
|
576 | + if (( ! is_admin()) && ($query === $wp_the_query) && ($query->is_post_type_archive('product')) && (taxonomy_exists('category'))) { |
|
577 | + $query->set('posts_per_page', 8); |
|
578 | + } elseif (( ! is_admin()) && ($query === $wp_the_query) && ($query->is_archive()) && (is_tax('story'))) { |
|
579 | + $query->set('posts_per_page', 3); |
|
580 | 580 | } |
581 | 581 | return $query; |
582 | 582 | } |
@@ -588,32 +588,32 @@ discard block |
||
588 | 588 | * @param string $post_id set_default_object_terms. |
589 | 589 | * @param string $post set_default_object_terms. |
590 | 590 | */ |
591 | - function set_default_object_terms( $post_id, $post ) { |
|
592 | - if ( 'publish' === $post->post_status && 'comic' === $post->post_type ) { |
|
591 | + function set_default_object_terms($post_id, $post) { |
|
592 | + if ('publish' === $post->post_status && 'comic' === $post->post_type) { |
|
593 | 593 | $defaults = array( |
594 | - 'story' => array( 'draft' ), |
|
594 | + 'story' => array('draft'), |
|
595 | 595 | ); |
596 | - $taxonomies = get_object_taxonomies( $post->post_type ); |
|
597 | - foreach ( (array) $taxonomies as $taxonomy ) { |
|
598 | - $terms = get_the_terms( $post_id, $taxonomy ); |
|
599 | - if ( empty( $terms ) && array_key_exists( $taxonomy, $defaults ) ) { |
|
600 | - wp_set_object_terms( $post_id, $defaults[ $taxonomy ], $taxonomy ); |
|
596 | + $taxonomies = get_object_taxonomies($post->post_type); |
|
597 | + foreach ((array) $taxonomies as $taxonomy) { |
|
598 | + $terms = get_the_terms($post_id, $taxonomy); |
|
599 | + if (empty($terms) && array_key_exists($taxonomy, $defaults)) { |
|
600 | + wp_set_object_terms($post_id, $defaults[$taxonomy], $taxonomy); |
|
601 | 601 | } |
602 | 602 | } |
603 | 603 | } |
604 | 604 | } |
605 | - add_action( 'save_post', 'set_default_object_terms', 0, 2 ); |
|
605 | + add_action('save_post', 'set_default_object_terms', 0, 2); |
|
606 | 606 | |
607 | 607 | /** |
608 | 608 | * Remove jquery migrate $scripts for enhanced performance. |
609 | 609 | * |
610 | 610 | * @param strings $scripts remove_jquery_migrate. |
611 | 611 | */ |
612 | - function remove_jquery_migrate( $scripts ) { |
|
613 | - if ( is_admin() ) { |
|
612 | + function remove_jquery_migrate($scripts) { |
|
613 | + if (is_admin()) { |
|
614 | 614 | return; |
615 | 615 | } |
616 | - $scripts->remove( 'jquery' ); |
|
617 | - $scripts->add( 'jquery', false, array( 'jquery-core' ), '1.10.2' ); |
|
616 | + $scripts->remove('jquery'); |
|
617 | + $scripts->add('jquery', false, array('jquery-core'), '1.10.2'); |
|
618 | 618 | } |
619 | - add_action( 'wp_default_scripts', 'remove_jquery_migrate' ); |
|
619 | + add_action('wp_default_scripts', 'remove_jquery_migrate'); |
@@ -11,15 +11,15 @@ discard block |
||
11 | 11 | ?><!DOCTYPE html> |
12 | 12 | <html <?php language_attributes(); ?> class="no-js"> |
13 | 13 | <head> |
14 | -<meta charset="<?php bloginfo( 'charset' ); ?>"> |
|
14 | +<meta charset="<?php bloginfo('charset'); ?>"> |
|
15 | 15 | <meta http-equiv="X-UA-Compatible" content="IE=Edge"> |
16 | 16 | <meta name="viewport" content="width=device-width, initial-scale=1"> |
17 | -<meta name="description" content="<?php if ( is_single() ) { |
|
18 | - single_post_title( '', true ); |
|
17 | +<meta name="description" content="<?php if (is_single()) { |
|
18 | + single_post_title('', true); |
|
19 | 19 | } else { |
20 | - bloginfo( 'name' ); |
|
20 | + bloginfo('name'); |
|
21 | 21 | echo ' - '; |
22 | - bloginfo( 'description' ); |
|
22 | + bloginfo('description'); |
|
23 | 23 | } |
24 | 24 | ?>" /> |
25 | 25 | <link rel="profile" href="http://gmpg.org/xfn/11"> |
@@ -32,12 +32,12 @@ discard block |
||
32 | 32 | <div id="page" class="hfeed site"> |
33 | 33 | <header id="masthead" class="site-header" role="banner"> |
34 | 34 | |
35 | - <?php if ( has_nav_menu( 'primary' ) ) : ?> |
|
35 | + <?php if (has_nav_menu('primary')) : ?> |
|
36 | 36 | <nav id="site-navigation" class="main-navigation clear" role="navigation"> |
37 | - <button class="menu-toggle" aria-controls="primary-menu" aria-expanded="false"><?php esc_attr_e( 'discover', 'strip' ); ?></button> |
|
38 | - <div><a class="skip-link screen-reader-text" href="#content"><?php esc_attr_e( 'Skip to content', 'strip' ); ?></a></div> |
|
37 | + <button class="menu-toggle" aria-controls="primary-menu" aria-expanded="false"><?php esc_attr_e('discover', 'strip'); ?></button> |
|
38 | + <div><a class="skip-link screen-reader-text" href="#content"><?php esc_attr_e('Skip to content', 'strip'); ?></a></div> |
|
39 | 39 | |
40 | - <?php wp_nav_menu( array( 'theme_location' => 'primary', 'container_class' => 'wrap' ) ); ?> |
|
40 | + <?php wp_nav_menu(array('theme_location' => 'primary', 'container_class' => 'wrap')); ?> |
|
41 | 41 | </nav><!-- #site-navigation --> |
42 | 42 | <?php endif; ?> |
43 | 43 |
@@ -6,8 +6,8 @@ discard block |
||
6 | 6 | * @subpackage Strip |
7 | 7 | */ |
8 | 8 | |
9 | -if ( post_type_exists( $post_type ) && is_single() ) { |
|
10 | - get_header( 'lite' ); |
|
9 | +if (post_type_exists($post_type) && is_single()) { |
|
10 | + get_header('lite'); |
|
11 | 11 | } else { |
12 | 12 | get_header(); |
13 | 13 | } |
@@ -18,16 +18,16 @@ discard block |
||
18 | 18 | |
19 | 19 | <?php |
20 | 20 | // Start the loop. |
21 | - while ( have_posts() ) : |
|
21 | + while (have_posts()) : |
|
22 | 22 | the_post(); |
23 | - if ( 'comic' === get_post_type() ) : ?> |
|
23 | + if ('comic' === get_post_type()) : ?> |
|
24 | 24 | |
25 | 25 | <div class="entry-comic"> |
26 | 26 | |
27 | - <?php get_template_part( 'content-comic' ); ?> |
|
27 | + <?php get_template_part('content-comic'); ?> |
|
28 | 28 | |
29 | - <?php strip_content_nav( 'nav-below' ); |
|
30 | - set_transient( 'story', $post_type );?> |
|
29 | + <?php strip_content_nav('nav-below'); |
|
30 | + set_transient('story', $post_type); ?> |
|
31 | 31 | |
32 | 32 | </div><!-- #entry-comic --> |
33 | 33 | |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | |
37 | 37 | <?php |
38 | 38 | // If comments are open or we have at least one comment, load up the comment template. |
39 | - if ( comments_open() || '0' !== get_comments_number() ) { |
|
39 | + if (comments_open() || '0' !== get_comments_number()) { |
|
40 | 40 | comments_template(); |
41 | 41 | } |
42 | 42 | ?> |
@@ -46,4 +46,4 @@ discard block |
||
46 | 46 | </main><!-- #content --> |
47 | 47 | </section><!-- #primary --> |
48 | 48 | |
49 | -<?php get_footer( 'lite' ); ?> |
|
49 | +<?php get_footer('lite'); ?> |