These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
1 | <?php |
||
2 | /** |
||
3 | * Template part for displaying the comic series archive pages |
||
4 | * |
||
5 | * @package WordPress |
||
6 | * @subpackage Strip |
||
7 | */ |
||
8 | |||
9 | ?> |
||
10 | <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> |
||
11 | |||
12 | <div class="wrap"> |
||
13 | View Code Duplication | <?php if ( '' !== get_the_post_thumbnail() ) : ?> |
|
0 ignored issues
–
show
|
|||
14 | |||
15 | <a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( sprintf( __( 'Permalink to %s', 'strip' ), the_title_attribute( 'echo=0' ) ) ); ?>" rel="<?php the_ID(); ?>" class="strip-featured-thumbnail"> |
||
16 | <?php the_post_thumbnail( 'strip-featured-thumbnail' ); ?> |
||
17 | </a> |
||
18 | <?php endif; ?> |
||
19 | |||
20 | <footer class="entry-meta"> |
||
21 | <a href="<?php the_permalink(); ?>"><?php echo get_the_date(); ?></a> |
||
22 | </footer><!-- .entry-meta --> |
||
23 | |||
24 | <header class="entry-header"> |
||
25 | |||
26 | <?php |
||
27 | edit_post_link( __( 'Edit Comic', 'strip' ), '<span class="edit-link">', '</span>' ); |
||
28 | |||
29 | View Code Duplication | if ( ! is_single() ) : |
|
0 ignored issues
–
show
This code seems to be duplicated across your project.
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation. You can also find more detailed suggestions in the “Code” section of your repository. ![]() |
|||
30 | the_title( '<h1 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h1>' ); |
||
31 | else : |
||
32 | the_title( '<h1 class="entry-title">', '</h1>' ); |
||
33 | endif; ?> |
||
34 | |||
35 | </header><!-- .entry-header --> |
||
36 | |||
37 | <?php if ( is_search() ) : // Only display Excerpts for Search — implement search for custom taxonomies. ?> |
||
38 | |||
39 | <div class="entry-summary"> |
||
40 | <?php the_excerpt(); ?> |
||
41 | </div><!-- .entry-summary --> |
||
42 | |||
43 | <?php else : ?> |
||
44 | |||
45 | <div class="entry-comic"> |
||
46 | <?php the_content(); ?> |
||
47 | |||
48 | <?php endif; ?> |
||
49 | </div><!-- .entry-content --> |
||
50 | </div><!-- .entry-wrap --> |
||
51 | </article> |
||
52 |
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.