Issues (311)

Labels
Severity
1
<?php
2
/**
3
 * Template Name: Portfolio Page
4
 *
5
 * The template for displaying portfolio
6
 *
7
 * This is the template that displays all portfolio items.
8
 * 
9
 * @package DesignFly
10
 * 
11
 * @since 1.0.3
12
 * 
13
 */
14
15
 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

15
 /** @scrutinizer ignore-call */ 
16
 get_header();
Loading history...
16
?>
17
<div id="primary" class="content-area">
18
	<main id="main" class="site-main">
19
20
	<?php
21
	$args = array(
22
		'post_type'      => 'df-portfolio', 
23
		'posts_per_page' => '6',
24
	);
25
26
	$query = new WP_Query( $args );
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...
27
28
	if ( get_theme_mod( 'designfly-home-display-portfolio' ) === true ): ?>
0 ignored issues
show
The function get_theme_mod 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

28
	if ( /** @scrutinizer ignore-call */ get_theme_mod( 'designfly-home-display-portfolio' ) === true ): ?>
Loading history...
29
30
		<div id="portfolio-wrapper_home">
31
	
32
			<!-- top bar -->
33
				<div class="portfolio-wrapper_home-top">
34
					<p class="title"> <?php echo esc_html( get_theme_mod( 'designfly-home-portfolio-title', 'd\'sign is the soul' ) ); ?> </p>
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

34
					<p class="title"> <?php echo /** @scrutinizer ignore-call */ esc_html( get_theme_mod( 'designfly-home-portfolio-title', 'd\'sign is the soul' ) ); ?> </p>
Loading history...
35
					<a href=" <?php echo get_permalink( get_theme_mod( 'designfly-home-portfolio-btn', '#' ) ); ?>" id="portfolio-view-all">
0 ignored issues
show
The function get_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

35
					<a href=" <?php echo /** @scrutinizer ignore-call */ get_permalink( get_theme_mod( 'designfly-home-portfolio-btn', '#' ) ); ?>" id="portfolio-view-all">
Loading history...
36
						<?php esc_html_e( 'view all', 'designfly' ); ?>
0 ignored issues
show
The function esc_html_e 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

36
						<?php /** @scrutinizer ignore-call */ esc_html_e( 'view all', 'designfly' ); ?>
Loading history...
37
					</a>
38
					<hr />
39
				</div>
40
		<?php
41
		if ( $query -> have_posts() ):
42
43
				while ( $query -> have_posts() ):
44
					$query -> the_post();
45
					get_template_part( 'template-parts/content', 'df-portfolio' );  
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

45
					/** @scrutinizer ignore-call */ 
46
     get_template_part( 'template-parts/content', 'df-portfolio' );  
Loading history...
46
				endwhile;
47
				?>
48
			
49
			</div>
50
51
		<?php
52
		else:
53
		?>
54
		<div class="container">
55
			<p>
56
				<?php esc_html_e( 'Sorry, no portfolio items found. Please add some portfolio items in admin-dashboard>Portfolio. 
57
				If you don\'t want to see this message, uncheck \'Show recent portfolio items\' in admin-dashboard>Appearance>Customize>Home Page settings.', 'designfly' ); ?>
58
			</p>
59
		</div>
60
	<?php 
61
		endif;
62
	endif;
63
	?>
64
65
		</main><!-- #main -->
66
	</div><!-- #primary -->
67
68
69
<?php
70
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

70
/** @scrutinizer ignore-call */ 
71
get_footer();
Loading history...
71
?>