1 | <?php |
||||||||
2 | /** |
||||||||
3 | * Three Columns Stories Archive |
||||||||
4 | * |
||||||||
5 | * This template archives comic series pages. |
||||||||
6 | * Show the first image of each comic post on a three columns grid. |
||||||||
7 | * T0DO: excerpts enhancements — Use this template as reference during develoment. |
||||||||
8 | * |
||||||||
9 | * @package WordPress |
||||||||
10 | * @subpackage Strip |
||||||||
11 | */ |
||||||||
12 | |||||||||
13 | get_header(); ?> |
||||||||
0 ignored issues
–
show
Bug
introduced
by
![]() |
|||||||||
14 | |||||||||
15 | <section id="primary" |
||||||||
16 | <div class="content" role="main"> |
||||||||
17 | <div class="wrap"> |
||||||||
18 | <header class="entry-header"> |
||||||||
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' ) ), |
||||||||
0 ignored issues
–
show
The function
esc_url was not found. Maybe you did not declare it correctly or list all dependencies?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
![]() The function
get_post_type_archive_link was not found. Maybe you did not declare it correctly or list all dependencies?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
![]() |
|||||||||
22 | esc_html( get_the_title() ) |
||||||||
0 ignored issues
–
show
The function
esc_html was not found. Maybe you did not declare it correctly or list all dependencies?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
![]() The function
get_the_title was not found. Maybe you did not declare it correctly or list all dependencies?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
![]() |
|||||||||
23 | ); ?> |
||||||||
24 | </a></h3> |
||||||||
25 | <h1 class="page-title"><?php the_title(); ?></h1> |
||||||||
0 ignored issues
–
show
The function
the_title was not found. Maybe you did not declare it correctly or list all dependencies?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
![]() |
|||||||||
26 | </header> |
||||||||
27 | |||||||||
28 | <div class="three-columns"> |
||||||||
29 | |||||||||
30 | <?php |
||||||||
31 | // get the correct paged figure on a Custom Page That Isn’t Static Home Page. |
||||||||
32 | $paged = ( get_query_var( 'paged' ) ) ? get_query_var( 'paged' ) : 1; ?> |
||||||||
0 ignored issues
–
show
The function
get_query_var was not found. Maybe you did not declare it correctly or list all dependencies?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
![]() |
|||||||||
33 | |||||||||
34 | |||||||||
35 | <?php |
||||||||
36 | |||||||||
37 | // Call and run loop in descending order. |
||||||||
38 | $loop = new WP_Query( array( |
||||||||
0 ignored issues
–
show
The type
WP_Query was not found. Maybe you did not declare it correctly or list all dependencies?
The issue could also be caused by a filter entry in the build configuration.
If the path has been excluded in your configuration, e.g. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths ![]() |
|||||||||
39 | 'post_type' => 'comic', |
||||||||
40 | 'story' => '', // add story term here if you want this template to only archive a specific story. |
||||||||
41 | 'posts_per_page' => 12, // changes default Blog pages number "reading settings" set in dashboard. |
||||||||
42 | 'paged' => $paged, // you absolutely need this. |
||||||||
43 | 'orderby' => 'title', // order by title or date. |
||||||||
44 | 'order' => 'ASC', |
||||||||
45 | ) ); |
||||||||
46 | |||||||||
47 | // Start the loop. |
||||||||
48 | if ( $loop->have_posts() ) : |
||||||||
49 | while ( $loop->have_posts() ) : |
||||||||
50 | $loop->the_post(); |
||||||||
51 | ?> |
||||||||
52 | <div class="three-column"> |
||||||||
53 | <a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php printf( esc_html__( 'Permanent Link to %s', 'strip' ),the_title_attribute( 'echo=0' ) ); ?>"></a> |
||||||||
0 ignored issues
–
show
The function
the_title_attribute was not found. Maybe you did not declare it correctly or list all dependencies?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
![]() The function
esc_html__ was not found. Maybe you did not declare it correctly or list all dependencies?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
![]() The function
the_permalink was not found. Maybe you did not declare it correctly or list all dependencies?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
![]() |
|||||||||
54 | <?php if ( get_the_post_thumbnail() !== '' ) { |
||||||||
0 ignored issues
–
show
The function
get_the_post_thumbnail was not found. Maybe you did not declare it correctly or list all dependencies?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
![]() |
|||||||||
55 | |||||||||
56 | echo '<a href="'; |
||||||||
57 | the_permalink(); |
||||||||
58 | echo '" class="thumbnail-wrapper">'; |
||||||||
59 | the_post_thumbnail( 'strip-medium' ); |
||||||||
0 ignored issues
–
show
The function
the_post_thumbnail was not found. Maybe you did not declare it correctly or list all dependencies?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
![]() |
|||||||||
60 | |||||||||
61 | echo '</a>'; |
||||||||
62 | |||||||||
63 | } else { |
||||||||
64 | |||||||||
65 | echo '<a href="'; |
||||||||
66 | the_permalink(); |
||||||||
67 | echo '" class="thumbnail-wrapper">'; |
||||||||
68 | echo '<img src="'; |
||||||||
69 | echo esc_html( get_first_image( 'strip-medium', 'url' ) ); |
||||||||
70 | echo '" alt="" />'; |
||||||||
71 | echo '</a>'; |
||||||||
72 | } ?> |
||||||||
73 | |||||||||
74 | <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> |
||||||||
75 | |||||||||
76 | </div><!-- .column --> |
||||||||
77 | <?php endwhile; ?> |
||||||||
78 | </div><!-- .columns --> |
||||||||
79 | <?php |
||||||||
80 | wp_reset_postdata(); |
||||||||
0 ignored issues
–
show
The function
wp_reset_postdata was not found. Maybe you did not declare it correctly or list all dependencies?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
![]() |
|||||||||
81 | ?> |
||||||||
82 | |||||||||
83 | <?php |
||||||||
84 | $big = 999999999; // need an unlikely integer. |
||||||||
85 | $translated = __( 'Page', 'strip' ); // supply translatable string. |
||||||||
0 ignored issues
–
show
The function
__ was not found. Maybe you did not declare it correctly or list all dependencies?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
![]() |
|||||||||
86 | |||||||||
87 | echo wp_kses_post( paginate_links( // Data validation: wp_kses_post see https://developer.wordpress.org/reference/functions/wp_kses_post/. |
||||||||
0 ignored issues
–
show
The function
paginate_links was not found. Maybe you did not declare it correctly or list all dependencies?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
![]() The function
wp_kses_post was not found. Maybe you did not declare it correctly or list all dependencies?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
![]() |
|||||||||
88 | array( |
||||||||
89 | 'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ), |
||||||||
0 ignored issues
–
show
The function
get_pagenum_link was not found. Maybe you did not declare it correctly or list all dependencies?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
![]() |
|||||||||
90 | 'format' => '?paged=%#%', |
||||||||
91 | 'current' => max( 1, get_query_var( 'paged', 1 ) ), |
||||||||
92 | 'total' => $loop->max_num_pages, |
||||||||
93 | 'before_page_number' => '<span class="screen-reader-text">' . $translated . ' </span>', |
||||||||
94 | 'prev_text' => esc_html__( 'Previous', 'strip' ), // If you want to change the previous link text. |
||||||||
95 | 'next_text' => esc_html__( 'Next', 'strip' ), // If you want to change the next link text. |
||||||||
96 | 'type' => 'title', // How you want the return value to be formatted. |
||||||||
97 | 'add_fragment' => '#result', // Your anchor. |
||||||||
98 | ) ) ); |
||||||||
99 | |||||||||
100 | else : |
||||||||
101 | get_template_part( 'no-results', 'archive-comic' ); |
||||||||
0 ignored issues
–
show
The function
get_template_part was not found. Maybe you did not declare it correctly or list all dependencies?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
![]() |
|||||||||
102 | endif; ?> |
||||||||
103 | |||||||||
104 | </div><!-- .wrap --> |
||||||||
105 | </main><!-- #content --> |
||||||||
106 | </section><!-- #primary --> |
||||||||
107 | |||||||||
108 | <?php get_sidebar(); ?> |
||||||||
0 ignored issues
–
show
The function
get_sidebar was not found. Maybe you did not declare it correctly or list all dependencies?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
![]() |
|||||||||
109 | <?php get_footer(); ?> |
||||||||
0 ignored issues
–
show
The function
get_footer was not found. Maybe you did not declare it correctly or list all dependencies?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
![]() |
|||||||||
110 |