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