This project does not seem to handle request data directly as such no vulnerable execution paths were found.
include
, or for example
via PHP's auto-loading mechanism.
1 | <?php |
||||
2 | /** |
||||
3 | * The template used for displaying page content in page.php |
||||
4 | * |
||||
5 | * @package lsx |
||||
6 | */ |
||||
7 | |||||
8 | ?> |
||||
9 | |||||
10 | <?php lsx_entry_before(); ?> |
||||
11 | |||||
12 | <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> |
||||
13 | |||||
14 | <?php //lsx_entry_top(); ?> |
||||
0 ignored issues
–
show
Coding Style
introduced
by
![]() Unused Code
Comprehensibility
introduced
by
75% of this comment could be valid code. Did you maybe forget this after debugging?
Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it. The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production. This check looks for comments that seem to be mostly valid code and reports them. ![]() |
|||||
15 | |||||
16 | <?php |
||||
17 | // On the cover page template, output the cover header. |
||||
18 | $cover_header_style = ''; |
||||
19 | $cover_header_classes = ''; |
||||
20 | |||||
21 | $color_overlay_style = ''; |
||||
22 | $color_overlay_classes = ''; |
||||
23 | |||||
24 | $image_url = ! post_password_required() ? get_the_post_thumbnail_url( get_the_ID(), 'full' ) : ''; |
||||
0 ignored issues
–
show
It seems like
get_the_ID() can also be of type false ; however, parameter $post of get_the_post_thumbnail_url() does only seem to accept WP_Post|integer , maybe add an additional type check?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
![]() |
|||||
25 | |||||
26 | if ( $image_url ) { |
||||
27 | $cover_header_style .= 'background-image: url( ' . esc_url( $image_url ) . ' );'; |
||||
28 | $cover_header_classes = ' bg-image'; |
||||
29 | } |
||||
30 | |||||
31 | // Get the color used for the color overlay. |
||||
32 | $color_cover_color = get_theme_mod( 'lsx_cover_template_cover_background_color' ); |
||||
33 | if ( $color_cover_color ) { |
||||
34 | $cover_header_style .= ' background-color: ' . esc_attr( $color_cover_color ) . ';'; |
||||
35 | } else { |
||||
36 | $cover_header_style .= ' background-color: #27639e;'; |
||||
37 | } |
||||
38 | |||||
39 | // Get the color used for the color overlay. |
||||
40 | $color_overlay_color = get_theme_mod( 'lsx_cover_template_overlay_background_color' ); |
||||
41 | if ( $color_overlay_color ) { |
||||
42 | $color_overlay_style = ' style="color: ' . esc_attr( $color_overlay_color ) . ';"'; |
||||
43 | } else { |
||||
44 | $color_overlay_style = ''; |
||||
45 | } |
||||
46 | |||||
47 | // Get the fixed background attachment option. |
||||
48 | if ( get_theme_mod( 'lsx_cover_template_fixed_background', true ) ) { |
||||
49 | $cover_header_classes .= ' bg-attachment-fixed'; |
||||
50 | } |
||||
51 | |||||
52 | // Get the opacity of the color overlay. |
||||
53 | $color_overlay_opacity = get_theme_mod( 'lsx_cover_template_overlay_opacity' ); |
||||
54 | $color_overlay_opacity = ( false === $color_overlay_opacity ) ? 80 : $color_overlay_opacity; |
||||
55 | $color_overlay_classes .= ' opacity-' . $color_overlay_opacity; |
||||
56 | ?> |
||||
57 | |||||
58 | <div class="cover-header <?php echo esc_html( $cover_header_classes ); ?>" style="<?php echo wp_kses_post( $cover_header_style ); ?>"> |
||||
59 | <div class="cover-header-inner-wrapper"> |
||||
60 | <div class="cover-header-inner"> |
||||
61 | <div class="cover-color-overlay color-accent<?php echo esc_attr( $color_overlay_classes ); ?>"<?php echo wp_kses_post( $color_overlay_style ); ?>></div> |
||||
62 | |||||
63 | <header class="entry-header has-text-align-center"> |
||||
64 | <div class="entry-header-inner section-inner"> |
||||
65 | |||||
66 | <?php |
||||
67 | |||||
68 | if ( has_category() ) { |
||||
69 | ?> |
||||
70 | |||||
71 | <div class="entry-categories"> |
||||
72 | <div class="entry-categories-inner"> |
||||
73 | <?php the_category( ' ' ); ?> |
||||
74 | </div> |
||||
75 | </div> |
||||
76 | |||||
77 | <?php |
||||
78 | } |
||||
79 | |||||
80 | the_title( '<h1 class="entry-title">', '</h1>' ); |
||||
81 | |||||
82 | if ( is_page() ) { |
||||
83 | if ( has_excerpt() ) { |
||||
84 | ?> |
||||
85 | |||||
86 | <div class="the-excerpt-wrapper"> |
||||
87 | |||||
88 | <?php the_excerpt(); ?> |
||||
89 | |||||
90 | </div> |
||||
91 | |||||
92 | <?php |
||||
93 | } |
||||
94 | ?> |
||||
95 | |||||
96 | <div class="to-the-content-wrapper"> |
||||
97 | |||||
98 | <a href="#post-inner" class="to-the-content"> |
||||
99 | <i class="fa fa-arrow-circle-down" aria-hidden="true"></i> |
||||
100 | </a> |
||||
101 | |||||
102 | </div> |
||||
103 | |||||
104 | <?php |
||||
105 | } else { |
||||
106 | |||||
107 | if ( has_excerpt() ) { |
||||
108 | ?> |
||||
109 | |||||
110 | <div class="intro-text section-inner"> |
||||
111 | <?php the_excerpt(); ?> |
||||
112 | </div> |
||||
113 | |||||
114 | <?php |
||||
115 | } |
||||
116 | |||||
117 | ?> |
||||
118 | <div class="entry-meta"> |
||||
119 | <?php lsx_post_meta_list_top(); ?> |
||||
120 | </div><!-- .entry-meta --> |
||||
121 | <?php |
||||
122 | |||||
123 | } |
||||
124 | ?> |
||||
125 | |||||
126 | </div> |
||||
127 | </header> |
||||
128 | </div> |
||||
129 | </div> |
||||
130 | </div> |
||||
131 | |||||
132 | <div id="post-inner" class="entry-content"> |
||||
133 | |||||
134 | <?php lsx_entry_inside_top(); ?> |
||||
135 | |||||
136 | <?php |
||||
137 | the_content(); |
||||
138 | |||||
139 | wp_link_pages( array( |
||||
0 ignored issues
–
show
|
|||||
140 | 'before' => '<div class="lsx-postnav-wrapper"><div class="lsx-postnav">', |
||||
141 | 'after' => '</div></div>', |
||||
142 | 'link_before' => '<span>', |
||||
143 | 'link_after' => '</span>', |
||||
144 | ) ); |
||||
0 ignored issues
–
show
For multi-line function calls, the closing parenthesis should be on a new line.
If a function call spawns multiple lines, the coding standard suggests to move the closing parenthesis to a new line: someFunctionCall(
$firstArgument,
$secondArgument,
$thirdArgument
); // Closing parenthesis on a new line.
![]() |
|||||
145 | ?> |
||||
146 | </div><!-- .entry-content --> |
||||
147 | |||||
148 | <footer class="footer-meta clearfix"> |
||||
149 | <?php if ( has_tag() || class_exists( 'LSX_Sharing' ) || ( function_exists( 'sharing_display' ) || class_exists( 'Jetpack_Likes' ) ) ) : ?> |
||||
150 | <div class="post-tags-wrapper"> |
||||
151 | <?php lsx_content_post_tags(); ?> |
||||
152 | |||||
153 | <?php |
||||
154 | if ( class_exists( 'LSX_Sharing' ) ) { |
||||
155 | lsx_content_sharing(); |
||||
156 | } else { |
||||
157 | if ( function_exists( 'sharing_display' ) ) { |
||||
158 | sharing_display( '', true ); |
||||
159 | } |
||||
160 | |||||
161 | if ( class_exists( 'Jetpack_Likes' ) ) { |
||||
162 | $custom_likes = new Jetpack_Likes(); |
||||
0 ignored issues
–
show
The type
Jetpack_Likes 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 ![]() |
|||||
163 | echo wp_kses_post( $custom_likes->post_likes( '' ) ); |
||||
164 | } |
||||
165 | } |
||||
166 | ?> |
||||
167 | <?php endif ?> |
||||
168 | </footer><!-- .footer-meta --> |
||||
169 | |||||
170 | <?php lsx_entry_bottom(); ?> |
||||
171 | |||||
172 | </article><!-- #post-## --> |
||||
173 | |||||
174 | <?php |
||||
175 | lsx_entry_after(); |
||||
176 |