lightspeeddevelopment /
lsx
| 1 | <?php |
||||
| 2 | /** |
||||
| 3 | * The template for displaying Archive pages. |
||||
| 4 | * |
||||
| 5 | * @package lsx |
||||
| 6 | */ |
||||
| 7 | |||||
| 8 | get_header(); ?> |
||||
| 9 | |||||
| 10 | <?php lsx_content_wrap_before(); ?> |
||||
| 11 | |||||
| 12 | <div id="primary" class="content-area <?php echo esc_attr( lsx_main_class() ); ?>"> |
||||
| 13 | |||||
| 14 | <?php lsx_content_before(); ?> |
||||
| 15 | |||||
| 16 | <main id="main" class="site-main" role="main"> |
||||
| 17 | |||||
| 18 | <?php lsx_content_top(); ?> |
||||
| 19 | |||||
| 20 | <?php if ( have_posts() ) : ?> |
||||
|
0 ignored issues
–
show
Coding Style
introduced
by
Loading history...
|
|||||
| 21 | |||||
| 22 | <div class="post-wrapper"> |
||||
| 23 | |||||
| 24 | <?php |
||||
| 25 | while ( have_posts() ) : |
||||
|
0 ignored issues
–
show
|
|||||
| 26 | the_post(); |
||||
| 27 | ?> |
||||
| 28 | |||||
| 29 | <?php get_template_part( 'partials/content', get_post_format() ); ?> |
||||
|
0 ignored issues
–
show
It seems like
get_post_format() can also be of type false; however, parameter $name of get_template_part() does only seem to accept string, 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
Loading history...
|
|||||
| 30 | |||||
| 31 | <?php endwhile; ?> |
||||
| 32 | |||||
| 33 | </div> |
||||
| 34 | |||||
| 35 | <?php lsx_paging_nav(); ?> |
||||
| 36 | |||||
| 37 | <?php else : ?> |
||||
|
0 ignored issues
–
show
|
|||||
| 38 | |||||
| 39 | <?php get_template_part( 'partials/content', 'none' ); ?> |
||||
| 40 | |||||
| 41 | <?php endif; ?> |
||||
| 42 | |||||
| 43 | <?php lsx_content_bottom(); ?> |
||||
| 44 | |||||
| 45 | </main><!-- #main --> |
||||
| 46 | |||||
| 47 | <?php lsx_content_after(); ?> |
||||
| 48 | |||||
| 49 | </div><!-- #primary --> |
||||
| 50 | |||||
| 51 | <?php lsx_content_wrap_after(); ?> |
||||
| 52 | |||||
| 53 | <?php get_sidebar(); ?> |
||||
| 54 | |||||
| 55 | <?php |
||||
| 56 | get_footer(); |
||||
| 57 |