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 | if ( $categories_list && strip_categorized_blog() ) { |
||
19 | echo '<span class="categories-links">' . $categories_list . '</span>'; |
||
20 | } |
||
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 | </header><!-- .entry-header --> |
||
29 | |||
30 | <footer class="entry-meta"> |
||
31 | |||
32 | View Code Duplication | <?php if ( ! post_password_required() && ( comments_open() || '0' !== get_comments_number() ) ) : ?> |
|
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. ![]() |
|||
33 | <span class="comments-link"><?php comments_popup_link( __( 'comment', 'strip' ), __( '1 Comment', 'strip' ), __( '% Comments', 'strip' ) ); ?></span> |
||
34 | <?php endif; ?> |
||
35 | |||
36 | <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> |
||
37 | |||
38 | <?php edit_post_link( __( 'Edit', 'strip' ), '<span class="edit-link">', '</span>' ); ?> |
||
39 | </footer><!-- .entry-meta --> |
||
40 | |||
41 | </div><!-- .entry-info --> |
||
42 | |||
43 | <div class="entry-content clear"> |
||
44 | <?php the_content( __( 'Continue reading <span class="meta-nav">→</span>', 'strip' ) ); ?> |
||
45 | |||
46 | </div><!-- .entry-content --> |
||
47 | </div><!-- .entry-wrap --> |
||
48 | </article><!-- #post-## --> |
||
49 |
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.