Passed
Push — master ( 1b85a4...393c08 )
by SILENT
01:25
created

archive-comic.php (17 issues)

1
<?php
2
/**
3
 * Template Name: Archive all comics
4
 *
5
 * The template for displaying comic Archives pages
6
 * An overview to peruse all stories — has links to custom comic posts in a second loop
7
 *
8
 * @package WordPress
9
 * @subpackage Strip
10
 */
11
12
get_header(); ?>
0 ignored issues
show
The function get_header 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 ignore-call  annotation

12
/** @scrutinizer ignore-call */ 
13
get_header(); ?>
Loading history...
13
	<section id="primary"
14
		<main id="content" role="main">
15
16
			<?php if ( have_posts() ) : ?>
0 ignored issues
show
The function have_posts 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 ignore-call  annotation

16
			<?php if ( /** @scrutinizer ignore-call */ have_posts() ) : ?>
Loading history...
17
18
				<header class="page-header">
19
					<h1 class="page-title">
20
						<?php
21
							printf(
22
								esc_html( 'STORIES %s', 'strip' ), '<span>' .
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 ignore-call  annotation

22
								/** @scrutinizer ignore-call */ 
23
        esc_html( 'STORIES %s', 'strip' ), '<span>' .
Loading history...
23
								single_cat_title( '', false ) . '</span>'
0 ignored issues
show
The function single_cat_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 ignore-call  annotation

23
								/** @scrutinizer ignore-call */ 
24
        single_cat_title( '', false ) . '</span>'
Loading history...
24
							);
25
						?>
26
					</h1>
27
28
				<?php
29
					// Show an optional term description.
30
					$term_description = term_description();
0 ignored issues
show
The function term_description 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 ignore-call  annotation

30
					$term_description = /** @scrutinizer ignore-call */ term_description();
Loading history...
31
				if ( ! empty( $term_description ) ) :
32
					'<div class="taxonomy-description"' . printf( esc_html( '%s', $term_description ) ) . '</div>';
33
				endif;
34
				?>
35
			</header><!-- .page-header -->
36
37
<?php
38
	// Create and run first loop in reverse order.
39
	$comic = new WP_Query();
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. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
40
	$comic = new WP_Query(
41
		array(
42
					'post_type'      => 'comic',
43
					'posts_per_page' => 12, // optional, changes default Blog pages number "reading settings" set in dashboard.
44
					'paged'          => $paged,
45
					'orderby'        => 'title',
46
					'order'          => 'DESC',
47
		)
48
	);
49
50
while ( $comic->have_posts() ) : $comic->the_post();
51
	get_template_part( 'content-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 ignore-call  annotation

51
	/** @scrutinizer ignore-call */ 
52
 get_template_part( 'content-comic' );
Loading history...
52
	// change to 'content' to style it like the blog entry page.
53
		?>
54
	<?php endwhile;
55
						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 ignore-call  annotation

55
						/** @scrutinizer ignore-call */ 
56
      wp_reset_postdata(); ?>
Loading history...
56
57
						<div class="wrap">
58
								<?php the_posts_pagination( array(
0 ignored issues
show
The function the_posts_pagination 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 ignore-call  annotation

58
								<?php /** @scrutinizer ignore-call */ the_posts_pagination( array(
Loading history...
59
									'prev_text' => _x( '&#8592;', 'Previous page link', 'strip' ) . '<span class="screen-reader-text">' . __( 'Previous page', 'strip' ) . '</span>',
0 ignored issues
show
Expected a sanitizing function (see Codex for 'Data Validation'), but instead saw '__'
Loading history...
The function _x 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 ignore-call  annotation

59
									'prev_text' => /** @scrutinizer ignore-call */ _x( '&#8592;', 'Previous page link', 'strip' ) . '<span class="screen-reader-text">' . __( 'Previous page', 'strip' ) . '</span>',
Loading history...
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 ignore-call  annotation

59
									'prev_text' => _x( '&#8592;', 'Previous page link', 'strip' ) . '<span class="screen-reader-text">' . /** @scrutinizer ignore-call */ __( 'Previous page', 'strip' ) . '</span>',
Loading history...
60
									'next_text' => '<span class="screen-reader-text">' . __( 'Next page', 'strip' ) . '</span>' . _x( '&#8594;', 'Next post link', 'strip' ),
0 ignored issues
show
Expected a sanitizing function (see Codex for 'Data Validation'), but instead saw '__'
Loading history...
Expected a sanitizing function (see Codex for 'Data Validation'), but instead saw '_x'
Loading history...
61
									'before_page_number' => '<span class="meta-nav screen-reader-text">' . __( 'Page', 'strip' ) . ' </span>',
0 ignored issues
show
Expected a sanitizing function (see Codex for 'Data Validation'), but instead saw '__'
Loading history...
62
								) ); ?>
63
				</div>
64
65
	<?php else : ?>
66
67
	<?php get_template_part( 'no-results', 'archive-comic' ); ?>
68
69
	<?php endif;
70
			wp_reset_postdata(); ?>
71
72
		</main><!-- #content -->
73
	</section><!-- #primary -->
74
75
<?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 ignore-call  annotation

75
<?php /** @scrutinizer ignore-call */ get_sidebar(); ?>
Loading history...
76
<?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 ignore-call  annotation

76
<?php /** @scrutinizer ignore-call */ get_footer(); ?>
Loading history...
77