@@ -6,7 +6,7 @@ discard block |
||
6 | 6 | * @subpackage Strip |
7 | 7 | */ |
8 | 8 | |
9 | -if ( ! is_active_sidebar( 'sidebar' ) ) { |
|
9 | +if ( ! is_active_sidebar('sidebar')) { |
|
10 | 10 | return; |
11 | 11 | } |
12 | 12 | ?> |
@@ -17,7 +17,7 @@ discard block |
||
17 | 17 | |
18 | 18 | <div class="main-sidebar"> |
19 | 19 | |
20 | - <?php dynamic_sidebar( 'sidebar' ); ?> |
|
20 | + <?php dynamic_sidebar('sidebar'); ?> |
|
21 | 21 | |
22 | 22 | </div> |
23 | 23 | </div><!-- .widget-wrap --> |
@@ -16,21 +16,21 @@ discard block |
||
16 | 16 | <div id="primary" |
17 | 17 | <main id="content" class="wrap" role="main"> |
18 | 18 | |
19 | - <?php if ( have_posts() ) : ?> |
|
19 | + <?php if (have_posts()) : ?> |
|
20 | 20 | <header class="page-header"> |
21 | 21 | </br> |
22 | 22 | <?php |
23 | 23 | // Show an optional term description. |
24 | 24 | $term_description = term_description(); |
25 | - if ( ! empty( $term_description ) ) : |
|
26 | - printf( '<div class="taxonomy-description">%s</div>', $term_description, 'strip' ); // WPCS: XSS OK. |
|
25 | + if ( ! empty($term_description)) : |
|
26 | + printf('<div class="taxonomy-description">%s</div>', $term_description, 'strip'); // WPCS: XSS OK. |
|
27 | 27 | endif; ?> |
28 | 28 | <h4 class="comic-blurb">Here are your uncategorized comics. To order them, go to Add New Comic, then + Add New Story and write a series title of your choice, or check an existing series box, if you had one. To write your own custom taxonomies, clone taxonomy-story-draft.php and replace "draft" by your own story name.</h4> |
29 | 29 | </header><!-- .page-header --> |
30 | 30 | |
31 | 31 | <?php // Create and run first loop in reverse order. |
32 | 32 | $comic = new WP_Query(); |
33 | - $comic->query( array( |
|
33 | + $comic->query(array( |
|
34 | 34 | 'post_type' => 'comic', |
35 | 35 | 'showposts' => -1, |
36 | 36 | 'story' => 'draft', |
@@ -39,9 +39,9 @@ discard block |
||
39 | 39 | ) |
40 | 40 | ); |
41 | 41 | |
42 | -while ( $comic->have_posts() ) : $comic->the_post(); |
|
42 | +while ($comic->have_posts()) : $comic->the_post(); |
|
43 | 43 | |
44 | - get_template_part( 'content-comic' ); ?> |
|
44 | + get_template_part('content-comic'); ?> |
|
45 | 45 | |
46 | 46 | <?php endwhile; ?> |
47 | 47 | <?php |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | ?> |
50 | 50 | <?php else : ?> |
51 | 51 | |
52 | - <?php get_template_part( 'no-results', 'archive-comic' ); ?> |
|
52 | + <?php get_template_part('no-results', 'archive-comic'); ?> |
|
53 | 53 | |
54 | 54 | <?php endif; ?> |
55 | 55 |
@@ -14,34 +14,34 @@ |
||
14 | 14 | <div class="entry-info"> |
15 | 15 | <header class="entry-header"> |
16 | 16 | <?php |
17 | - $categories_list = get_the_category_list( __( ', ', 'strip' ) ); |
|
18 | - if ( $categories_list && strip_categorized_blog() ) { |
|
17 | + $categories_list = get_the_category_list(__(', ', 'strip')); |
|
18 | + if ($categories_list && strip_categorized_blog()) { |
|
19 | 19 | echo '<span class="categories-links">' . $categories_list . '</span>'; |
20 | 20 | } |
21 | 21 | |
22 | - if ( ! is_single() ) : |
|
23 | - the_title( '<h1 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h1>' ); |
|
22 | + if ( ! is_single()) : |
|
23 | + the_title('<h1 class="entry-title"><a href="' . esc_url(get_permalink()) . '" rel="bookmark">', '</a></h1>'); |
|
24 | 24 | else : |
25 | - the_title( '<h1 class="entry-title">', '</h1>' ); |
|
25 | + the_title('<h1 class="entry-title">', '</h1>'); |
|
26 | 26 | endif; |
27 | 27 | ?> |
28 | 28 | </header><!-- .entry-header --> |
29 | 29 | |
30 | 30 | <footer class="entry-meta"> |
31 | 31 | |
32 | - <?php if ( ! post_password_required() && ( comments_open() || '0' !== get_comments_number() ) ) : ?> |
|
33 | - <span class="comments-link"><?php comments_popup_link( __( 'comment', 'strip' ), __( '1 Comment', 'strip' ), __( '% Comments', 'strip' ) ); ?></span> |
|
32 | + <?php if ( ! post_password_required() && (comments_open() || '0' !== get_comments_number())) : ?> |
|
33 | + <span class="comments-link"><?php comments_popup_link(__('comment', 'strip'), __('1 Comment', 'strip'), __('% Comments', 'strip')); ?></span> |
|
34 | 34 | <?php endif; ?> |
35 | 35 | |
36 | - <span class="entry-format"><a href="<?php echo esc_url( get_post_format_link( 'audio' ) ); ?>" title="<?php echo esc_attr( sprintf( __( 'All %s posts', 'strip' ), get_post_format_string( 'audio' ) ) ); ?>"><?php echo esc_html( get_post_format_string( 'audio' ) ); ?></a></span> |
|
36 | + <span class="entry-format"><a href="<?php echo esc_url(get_post_format_link('audio')); ?>" title="<?php echo esc_attr(sprintf(__('All %s posts', 'strip'), get_post_format_string('audio'))); ?>"><?php echo esc_html(get_post_format_string('audio')); ?></a></span> |
|
37 | 37 | |
38 | - <?php edit_post_link( __( 'Edit', 'strip' ), '<span class="edit-link">', '</span>' ); ?> |
|
38 | + <?php edit_post_link(__('Edit', 'strip'), '<span class="edit-link">', '</span>'); ?> |
|
39 | 39 | </footer><!-- .entry-meta --> |
40 | 40 | |
41 | 41 | </div><!-- .entry-info --> |
42 | 42 | |
43 | 43 | <div class="entry-content clear"> |
44 | - <?php the_content( __( 'Continue reading <span class="meta-nav">→</span>', 'strip' ) ); ?> |
|
44 | + <?php the_content(__('Continue reading <span class="meta-nav">→</span>', 'strip')); ?> |
|
45 | 45 | |
46 | 46 | </div><!-- .entry-content --> |
47 | 47 | </div><!-- .entry-wrap --> |
@@ -14,13 +14,13 @@ discard block |
||
14 | 14 | |
15 | 15 | <header class="page-header"> |
16 | 16 | |
17 | - <h1 class="page-title"><?php single_term_title( 'All episodes: ' ); ?></h1> |
|
17 | + <h1 class="page-title"><?php single_term_title('All episodes: '); ?></h1> |
|
18 | 18 | |
19 | 19 | <?php |
20 | 20 | // Show an optional term description. |
21 | 21 | $term_description = term_description(); |
22 | - if ( ! empty( $term_description ) ) : |
|
23 | - echo apply_filters( 'taxonomy_archive_meta', '<div class="taxonomy-description">' . $term_description . '</div>' ); |
|
22 | + if ( ! empty($term_description)) : |
|
23 | + echo apply_filters('taxonomy_archive_meta', '<div class="taxonomy-description">' . $term_description . '</div>'); |
|
24 | 24 | endif; |
25 | 25 | ?> |
26 | 26 | |
@@ -28,10 +28,10 @@ discard block |
||
28 | 28 | |
29 | 29 | <?php |
30 | 30 | // get the correct paged figure on a static page. |
31 | - if ( get_query_var( 'paged' ) ) { |
|
32 | - $paged = get_query_var( 'paged' ); |
|
33 | - } elseif ( get_query_var( 'page' ) ) { |
|
34 | - $paged = get_query_var( 'page' ); |
|
31 | + if (get_query_var('paged')) { |
|
32 | + $paged = get_query_var('paged'); |
|
33 | + } elseif (get_query_var('page')) { |
|
34 | + $paged = get_query_var('page'); |
|
35 | 35 | } else { |
36 | 36 | $paged = 1; |
37 | 37 | } |
@@ -47,12 +47,12 @@ discard block |
||
47 | 47 | 'order' => 'ASC', |
48 | 48 | ); |
49 | 49 | |
50 | - $loop = new WP_Query( $args ); |
|
50 | + $loop = new WP_Query($args); |
|
51 | 51 | // Start the loop. |
52 | - if ( $loop->have_posts() ) : |
|
53 | - while ( $loop->have_posts() ) : $loop->the_post(); |
|
52 | + if ($loop->have_posts()) : |
|
53 | + while ($loop->have_posts()) : $loop->the_post(); |
|
54 | 54 | |
55 | - get_template_part( 'content-series' ); ?> |
|
55 | + get_template_part('content-series'); ?> |
|
56 | 56 | |
57 | 57 | <?php endwhile; |
58 | 58 | wp_reset_postdata(); ?> |
@@ -61,13 +61,13 @@ discard block |
||
61 | 61 | global $wp_query; |
62 | 62 | |
63 | 63 | $big = 999999999; // need an unlikely integer. |
64 | - $translated = __( 'Page', 'strip' ); // supply translatable string. |
|
64 | + $translated = __('Page', 'strip'); // supply translatable string. |
|
65 | 65 | |
66 | 66 | echo paginate_links( |
67 | 67 | array( |
68 | - 'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ), |
|
68 | + 'base' => str_replace($big, '%#%', esc_url(get_pagenum_link($big))), |
|
69 | 69 | 'format' => '?paged=%#%', |
70 | - 'current' => max( 1, get_query_var( 'paged' ) ), |
|
70 | + 'current' => max(1, get_query_var('paged')), |
|
71 | 71 | 'total' => $loop->max_num_pages, |
72 | 72 | 'before_page_number' => '<span class="screen-reader-text">' . $translated . ' </span>', |
73 | 73 | ) |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | |
76 | 76 | |
77 | 77 | else : |
78 | - get_template_part( 'no-results', 'archive-comic' ); |
|
78 | + get_template_part('no-results', 'archive-comic'); |
|
79 | 79 | endif; ?> |
80 | 80 | |
81 | 81 | </main><!-- #content --> |
@@ -17,9 +17,9 @@ discard block |
||
17 | 17 | <div class="wrap"> |
18 | 18 | <header class="entry-header"> |
19 | 19 | <h3 class="taxonomy-description"> |
20 | - <?php printf( '<a href="%s" class="post-parent-title">%s</a>', |
|
21 | - esc_url( get_post_type_archive_link( 'comic' ) ), |
|
22 | - esc_html( get_the_title() ) |
|
20 | + <?php printf('<a href="%s" class="post-parent-title">%s</a>', |
|
21 | + esc_url(get_post_type_archive_link('comic')), |
|
22 | + esc_html(get_the_title()) |
|
23 | 23 | ); ?> |
24 | 24 | </a></h3> |
25 | 25 | <h1 class="page-title"><?php the_title(); ?></h1> |
@@ -28,32 +28,32 @@ discard block |
||
28 | 28 | <div class="columns"> |
29 | 29 | |
30 | 30 | <?php |
31 | - if ( get_query_var( 'paged' ) ) { |
|
32 | - $paged = get_query_var( 'paged' ); |
|
33 | - } elseif ( get_query_var( 'page' ) ) { |
|
34 | - $paged = get_query_var( 'page' ); |
|
31 | + if (get_query_var('paged')) { |
|
32 | + $paged = get_query_var('paged'); |
|
33 | + } elseif (get_query_var('page')) { |
|
34 | + $paged = get_query_var('page'); |
|
35 | 35 | } else { |
36 | 36 | $paged = 1; |
37 | 37 | } |
38 | 38 | |
39 | 39 | // Call and run loop in descending order. |
40 | - $loop = new WP_Query( array( |
|
40 | + $loop = new WP_Query(array( |
|
41 | 41 | 'post_type' => 'comic', |
42 | 42 | 'story' => '', // add story term here if you want this template to only archive a specific story. |
43 | 43 | 'posts_per_page' => 12, // changes default Blog pages number "reading settings" set in dashboard. |
44 | 44 | 'paged' => $paged, // you absolutely need this. |
45 | 45 | 'orderby' => 'title', // order by title or date. |
46 | 46 | 'order' => 'DESC', |
47 | - ) ); |
|
47 | + )); |
|
48 | 48 | |
49 | 49 | // Start the loop. |
50 | - if ( $loop->have_posts() ) : |
|
51 | - while ( $loop->have_posts() ) : |
|
50 | + if ($loop->have_posts()) : |
|
51 | + while ($loop->have_posts()) : |
|
52 | 52 | $loop->the_post(); |
53 | 53 | ?> |
54 | 54 | <div class="column"> |
55 | - <a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php printf( esc_html__( 'Permanent Link to %s', 'strip' ),the_title_attribute( 'echo=0' ) ); ?>"></a> |
|
56 | - <?php if ( get_the_post_thumbnail() !== '' ) { |
|
55 | + <a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php printf(esc_html__('Permanent Link to %s', 'strip'), the_title_attribute('echo=0')); ?>"></a> |
|
56 | + <?php if (get_the_post_thumbnail() !== '') { |
|
57 | 57 | |
58 | 58 | echo '<a href="'; |
59 | 59 | the_permalink(); |
@@ -68,12 +68,12 @@ discard block |
||
68 | 68 | the_permalink(); |
69 | 69 | echo '" class="thumbnail-wrapper">'; |
70 | 70 | echo '<img src="'; |
71 | - echo esc_html( get_first_image() ); |
|
71 | + echo esc_html(get_first_image()); |
|
72 | 72 | echo '" alt="" />'; |
73 | 73 | echo '</a>'; |
74 | 74 | } ?> |
75 | 75 | |
76 | -<h2 class="series-title"><a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php printf( esc_html__( 'Permanent Link to %s', 'strip' ), the_title_attribute( 'echo=0' ) ); ?>"><?php the_title(); ?></a></h2> |
|
76 | +<h2 class="series-title"><a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php printf(esc_html__('Permanent Link to %s', 'strip'), the_title_attribute('echo=0')); ?>"><?php the_title(); ?></a></h2> |
|
77 | 77 | |
78 | 78 | </div><!-- .column --> |
79 | 79 | <?php endwhile; ?> |
@@ -86,10 +86,10 @@ discard block |
||
86 | 86 | // get_next_posts_link() usage with max_num_pages. ?> |
87 | 87 | <nav class="paging-navigation"> |
88 | 88 | <div class="nav-previous-page"> |
89 | -<?php next_posts_link( esc_html_x( 'Previous episodes', 'Next posts link', 'strip' ), $loop->max_num_pages ); ?> |
|
89 | +<?php next_posts_link(esc_html_x('Previous episodes', 'Next posts link', 'strip'), $loop->max_num_pages); ?> |
|
90 | 90 | </div> |
91 | 91 | <div class="nav-next-page"> |
92 | - <?php previous_posts_link( esc_html_x( 'Recent episodes' , 'Previous post link', 'strip' ) ); ?> |
|
92 | + <?php previous_posts_link(esc_html_x('Recent episodes', 'Previous post link', 'strip')); ?> |
|
93 | 93 | </div> |
94 | 94 | </nav> |
95 | 95 | <?php // clean up after the query and pagination. |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | ?> |
98 | 98 | <?php |
99 | 99 | else : |
100 | - get_template_part( 'no-results', 'archive-comic' ); |
|
100 | + get_template_part('no-results', 'archive-comic'); |
|
101 | 101 | endif; ?> |
102 | 102 | |
103 | 103 | </div><!-- .wrap --> |
@@ -11,35 +11,35 @@ |
||
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 | - strip_content_nav( 'nav-below' ); |
|
28 | + strip_content_nav('nav-below'); |
|
29 | 29 | |
30 | 30 | else : ?> |
31 | 31 | |
32 | 32 | <article id="post-0" class="no-results"> |
33 | 33 | <header class="page-header"> |
34 | - <h1 class="page-title"><?php esc_html_e( 'Nothing Found', 'strip' ); ?></h1> |
|
34 | + <h1 class="page-title"><?php esc_html_e('Nothing Found', 'strip'); ?></h1> |
|
35 | 35 | </header><!-- .page-header --> |
36 | 36 | <div class="entry-content"> |
37 | - <p> <?php esc_html_e( 'Bummer, I cannot find what you are looking for. |
|
38 | - Would you like to search in the', 'strip' ); ?> |
|
37 | + <p> <?php esc_html_e('Bummer, I cannot find what you are looking for. |
|
38 | + Would you like to search in the', 'strip'); ?> |
|
39 | 39 | |
40 | - <a href="<?php echo esc_url( get_post_type_archive_link( 'comic' ) ); ?>">Comics Archive</a>? Great stuff there.</p> |
|
40 | + <a href="<?php echo esc_url(get_post_type_archive_link('comic')); ?>">Comics Archive</a>? Great stuff there.</p> |
|
41 | 41 | |
42 | - <p><?php esc_html_e( 'Or do you prefer trying another search with different keywords?', 'strip' ); ?></p> |
|
42 | + <p><?php esc_html_e('Or do you prefer trying another search with different keywords?', 'strip'); ?></p> |
|
43 | 43 | |
44 | 44 | <?php get_search_form(); ?> |
45 | 45 |
@@ -13,15 +13,15 @@ |
||
13 | 13 | <section id="primary"> |
14 | 14 | <main id="content" role="main"> |
15 | 15 | |
16 | - <?php while ( have_posts() ) : the_post(); ?> |
|
16 | + <?php while (have_posts()) : the_post(); ?> |
|
17 | 17 | |
18 | - <?php get_template_part( 'content', get_post_format() ); ?> |
|
18 | + <?php get_template_part('content', get_post_format()); ?> |
|
19 | 19 | |
20 | - <?php strip_content_nav( 'nav-below' ); ?> |
|
20 | + <?php strip_content_nav('nav-below'); ?> |
|
21 | 21 | |
22 | 22 | <?php |
23 | 23 | // If comments are open or we have at least one comment, load up the comment template. |
24 | - if ( comments_open() || '0' !== get_comments_number() ) { |
|
24 | + if (comments_open() || '0' !== get_comments_number()) { |
|
25 | 25 | comments_template(); |
26 | 26 | } |
27 | 27 | ?> |
@@ -12,16 +12,16 @@ discard block |
||
12 | 12 | <section id="primary" |
13 | 13 | <main id="content" role="main"> |
14 | 14 | |
15 | - <?php if ( '' !== get_the_post_thumbnail() ) : ?> |
|
15 | + <?php if ('' !== get_the_post_thumbnail()) : ?> |
|
16 | 16 | |
17 | - <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"> |
|
18 | - <?php the_post_thumbnail( 'strip-featured-thumbnail' ); ?> |
|
17 | + <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"> |
|
18 | + <?php the_post_thumbnail('strip-featured-thumbnail'); ?> |
|
19 | 19 | </a> |
20 | 20 | <?php endif; ?> |
21 | 21 | |
22 | 22 | <header class="entry-header"> |
23 | 23 | |
24 | - <?php the_title( '<h1 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h1>' ); ?> |
|
24 | + <?php the_title('<h1 class="entry-title"><a href="' . esc_url(get_permalink()) . '" rel="bookmark">', '</a></h1>'); ?> |
|
25 | 25 | |
26 | 26 | <?php // call the series by title and list them. ?> |
27 | 27 | |
@@ -30,9 +30,9 @@ discard block |
||
30 | 30 | <?php |
31 | 31 | $args = array( |
32 | 32 | 'post_type' => 'comic', |
33 | - 'title_li' => esc_html_e( 'All Episodes', 'strip' ), |
|
33 | + 'title_li' => esc_html_e('All Episodes', 'strip'), |
|
34 | 34 | ); |
35 | - wp_list_pages( $args ); |
|
35 | + wp_list_pages($args); |
|
36 | 36 | ?> |
37 | 37 | </h2> |
38 | 38 | <br> |
@@ -13,14 +13,14 @@ |
||
13 | 13 | <footer id="colophon" class="site-footer" role="contentinfo"> |
14 | 14 | |
15 | 15 | <div class="site-info"> |
16 | - © <span class="site-name"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></span> <?php |
|
16 | + © <span class="site-name"><a href="<?php echo esc_url(home_url('/')); ?>" rel="home"><?php bloginfo('name'); ?></a></span> <?php |
|
17 | 17 | $from_year = 2013; |
18 | - $this_year = (int) date( 'Y' ); |
|
19 | - echo esc_html( $from_year . (($from_year !== $this_year) ? '-' . $this_year : '') );?> |
|
18 | + $this_year = (int) date('Y'); |
|
19 | + echo esc_html($from_year . (($from_year !== $this_year) ? '-' . $this_year : '')); ?> |
|
20 | 20 | <span class="sep"> | </span> |
21 | - <?php do_action( 'strip_credits' ); |
|
21 | + <?php do_action('strip_credits'); |
|
22 | 22 | ?> |
23 | - <a href="<?php echo esc_url( __( 'https://github.com/SilentComics/Strip', 'strip' ) ); ?>"><?php printf( esc_html__( 'Theme: %1$s by %2$s.', 'strip' ), 'strip', 'Hoa' ); ?></a> |
|
23 | + <a href="<?php echo esc_url(__('https://github.com/SilentComics/Strip', 'strip')); ?>"><?php printf(esc_html__('Theme: %1$s by %2$s.', 'strip'), 'strip', 'Hoa'); ?></a> |
|
24 | 24 | </div><!-- .site-info --> |
25 | 25 | </footer><!-- #colophon --> |
26 | 26 | </div><!-- #page --> |