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 gallery post format |
||
4 | * |
||
5 | * @package WordPress |
||
6 | * @subpackage Strip |
||
7 | */ |
||
8 | |||
9 | ?> |
||
10 | |||
11 | <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> |
||
12 | <div class="entry-wrap wrap clear"> |
||
13 | |||
14 | <?php if ( '' !== get_the_post_thumbnail() ) : |
||
15 | the_post_thumbnail( 'strip-featured-thumbnail' ); |
||
16 | endif; ?> |
||
17 | |||
18 | <header class="entry-header"> |
||
19 | <?php |
||
20 | $categories_list = get_the_category_list( __( ', ', 'strip' ) ); |
||
21 | |||
22 | View Code Duplication | if ( ! is_single() ) : |
|
0 ignored issues
–
show
|
|||
23 | the_title( '<h1 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h1>' ); |
||
24 | else : |
||
25 | the_title( '<h1 class="entry-title">', '</h1>' ); |
||
26 | endif; ?> |
||
27 | |||
28 | <div class="entry-content clear"> |
||
29 | <?php the_content( __( 'Continue reading <span class="meta-nav">→</span>', 'strip' ) ); ?> |
||
30 | |||
31 | </div><!-- .entry-content --> |
||
32 | </header><!-- .entry-header --> |
||
33 | |||
34 | <footer class="entry-meta"> |
||
35 | <?php strip_entry_meta(); ?> |
||
36 | |||
37 | <span class="entry-format"><a href="<?php echo esc_url( get_post_format_link( 'gallery' ) ); ?>" title="<?php echo esc_attr( sprintf( __( 'All %s posts', 'strip' ), get_post_format_string( 'gallery' ) ) ); ?>"><?php echo esc_html( get_post_format_string( 'gallery' ) ); ?></a></span> |
||
38 | |||
39 | <?php edit_post_link( __( 'Edit', 'strip' ), '<span class="edit-link">', '</span>' ); ?> |
||
40 | </footer><!-- .entry-meta --> |
||
41 | |||
42 | <?php if ( has_excerpt() ) : ?> |
||
43 | <div class="entry-summary"> |
||
44 | <?php do_action( 'strip_formatted_posts_excerpt_before' ); ?> |
||
45 | <?php the_excerpt(); ?> |
||
46 | <?php do_action( 'strip_formatted_posts_excerpt_after' ); ?> |
||
47 | </div><!-- .entry-caption --> |
||
48 | <?php endif; ?> |
||
49 | |||
50 | </div><!-- .entry-wrap --> |
||
51 | </article><!-- #post-## --> |
||
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.