Issues (631)

archive-story.php (22 issues)

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
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

13
/** @scrutinizer ignore-call */ 
14
get_header(); ?>
Loading history...
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 ignore-call  annotation

21
						/** @scrutinizer ignore-call */ 
22
      esc_url( get_post_type_archive_link( 'comic' ) ),
Loading history...
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 ignore-call  annotation

21
						esc_url( /** @scrutinizer ignore-call */ get_post_type_archive_link( 'comic' ) ),
Loading history...
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 ignore-call  annotation

22
						/** @scrutinizer ignore-call */ 
23
      esc_html( get_the_title() )
Loading history...
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 ignore-call  annotation

22
						esc_html( /** @scrutinizer ignore-call */ get_the_title() )
Loading history...
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 ignore-call  annotation

25
				<h1 class="page-title"><?php /** @scrutinizer ignore-call */ the_title(); ?></h1>
Loading history...
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 ignore-call  annotation

32
			$paged = ( /** @scrutinizer ignore-call */ get_query_var( 'paged' ) ) ? get_query_var( 'paged' ) : 1; ?>
Loading history...
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. 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...
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 ignore-call  annotation

53
				<a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php printf( esc_html__( 'Permanent Link to %s', 'strip' ),/** @scrutinizer ignore-call */ the_title_attribute( 'echo=0' ) ); ?>"></a>
Loading history...
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

53
				<a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php printf( /** @scrutinizer ignore-call */ esc_html__( 'Permanent Link to %s', 'strip' ),the_title_attribute( 'echo=0' ) ); ?>"></a>
Loading history...
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 ignore-call  annotation

53
				<a href="<?php /** @scrutinizer ignore-call */ the_permalink(); ?>" rel="bookmark" title="<?php printf( esc_html__( 'Permanent Link to %s', 'strip' ),the_title_attribute( 'echo=0' ) ); ?>"></a>
Loading history...
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 ignore-call  annotation

54
				<?php if ( /** @scrutinizer ignore-call */ get_the_post_thumbnail() !== '' ) {
Loading history...
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 ignore-call  annotation

59
					/** @scrutinizer ignore-call */ 
60
     the_post_thumbnail( 'strip-medium' );
Loading history...
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' ) );
0 ignored issues
show
The call to get_first_image() has too many arguments starting with 'strip-medium'. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

69
	echo esc_html( /** @scrutinizer ignore-call */ get_first_image( 'strip-medium', 'url' ) );

This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue.

If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. Please note the @ignore annotation hint above.

Loading history...
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 ignore-call  annotation

80
			/** @scrutinizer ignore-call */ 
81
   wp_reset_postdata();
Loading history...
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 ignore-call  annotation

85
				$translated = /** @scrutinizer ignore-call */ __( 'Page', 'strip' ); // supply translatable string.
Loading history...
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 ignore-call  annotation

87
				echo wp_kses_post( /** @scrutinizer ignore-call */ paginate_links( // Data validation: wp_kses_post see https://developer.wordpress.org/reference/functions/wp_kses_post/.
Loading history...
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 ignore-call  annotation

87
				echo /** @scrutinizer ignore-call */ wp_kses_post( paginate_links( // Data validation: wp_kses_post see https://developer.wordpress.org/reference/functions/wp_kses_post/.
Loading history...
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 ignore-call  annotation

89
					'base' => str_replace( $big, '%#%', esc_url( /** @scrutinizer ignore-call */ get_pagenum_link( $big ) ) ),
Loading history...
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 ignore-call  annotation

101
			/** @scrutinizer ignore-call */ 
102
   get_template_part( 'no-results', 'archive-comic' );
Loading history...
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 ignore-call  annotation

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

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