These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
1 | <?php |
||
2 | /** |
||
3 | * @package lsx |
||
4 | */ |
||
5 | ?> |
||
6 | |||
7 | <?php lsx_entry_before(); ?> |
||
8 | |||
9 | <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> |
||
10 | |||
11 | <?php lsx_entry_top(); ?> |
||
12 | |||
13 | <?php |
||
14 | $format = get_post_format(); |
||
15 | if ( false === $format ) { |
||
16 | $format = 'standard'; |
||
17 | } |
||
18 | $format_link = get_post_format_link($format); |
||
19 | $format = lsx_translate_format_to_fontawesome($format); |
||
20 | ?> |
||
21 | |||
22 | View Code Duplication | <?php if ( ! is_single() ) { ?> |
|
0 ignored issues
–
show
|
|||
23 | <header class="entry-header"> |
||
24 | <h1 class="entry-title"> |
||
25 | <?php if ( has_post_thumbnail() ) { ?> |
||
26 | <a href="<?php echo esc_url($format_link) ?>" class="format-link has-thumb fa fa-<?php echo $format ?>"></a> |
||
27 | <?php } else { ?> |
||
28 | <a href="<?php echo esc_url($format_link) ?>" class="format-link fa fa-<?php echo $format ?>"></a> |
||
29 | <?php } ?> |
||
30 | |||
31 | <span><?php the_title(); ?></span> |
||
32 | </h1> |
||
33 | </header><!-- .entry-header --> |
||
34 | <?php } ?> |
||
35 | |||
36 | <div class="entry-meta"> |
||
37 | <?php lsx_post_meta(); ?> |
||
38 | </div><!-- .footer-meta --> |
||
39 | |||
40 | <div class="entry-content"> |
||
41 | <?php |
||
42 | View Code Duplication | if ( ! is_singular() ) { |
|
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. ![]() |
|||
43 | the_excerpt(); |
||
44 | } else { |
||
45 | the_content(); |
||
46 | |||
47 | wp_link_pages( array( |
||
48 | 'before' => '<div class="lsx-postnav-wrapper"><div class="lsx-postnav">', |
||
49 | 'after' => '</div></div>', |
||
50 | 'link_before' => '<span>', |
||
51 | 'link_after' => '</span>' |
||
52 | ) ); |
||
53 | } ?> |
||
54 | </div><!-- .entry-content --> |
||
55 | |||
56 | <footer class="footer-meta"> |
||
57 | View Code Duplication | <?php if ( has_tag() || ( function_exists( 'sharing_display' ) || class_exists( 'Jetpack_Likes' ) ) ) : ?> |
|
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. ![]() |
|||
58 | <div class="post-tags-wrapper"> |
||
59 | <?php if ( has_tag() ) : ?> |
||
60 | <div class="post-tags"> |
||
61 | <span><?php _e('Tagged as:','lsx'); ?></span> <?php echo get_the_tag_list(''); ?> |
||
62 | </div> |
||
63 | <?php endif ?> |
||
64 | |||
65 | <?php |
||
66 | if ( function_exists( 'sharing_display' ) ) { |
||
67 | sharing_display( '', true ); |
||
68 | } |
||
69 | |||
70 | if ( class_exists( 'Jetpack_Likes' ) ) { |
||
71 | $custom_likes = new Jetpack_Likes; |
||
72 | echo $custom_likes->post_likes( '' ); |
||
73 | } |
||
74 | ?> |
||
75 | </div> |
||
76 | <?php endif ?> |
||
77 | |||
78 | <?php |
||
79 | // If comments are open or we have at least one comment, load up the comment template |
||
80 | View Code Duplication | if ( 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. ![]() |
|||
81 | <a class="comments-link post-meta-link" data-toggle="collapse" href="#comments-collapse"><strong><?php echo get_comments_number() ?></strong> <?php _e('Comments','lsx'); ?> <span class="fa fa-chevron-down"></span></a> |
||
82 | |||
83 | <div class="collapse" id="comments-collapse"> |
||
84 | <?php |
||
85 | comments_template(); |
||
86 | ?> |
||
87 | </div> |
||
88 | <?php endif; ?> |
||
89 | </footer><!-- .footer-meta --> |
||
90 | |||
91 | <?php edit_post_link( __( 'Edit', 'lsx' ), '<footer class="entry-meta"><span class="edit-link">', '</span></footer>' ); ?> |
||
92 | |||
93 | <?php lsx_portfolio_related_posts(); ?> |
||
94 | |||
95 | <?php lsx_entry_bottom(); ?> |
||
96 | |||
97 | </article><!-- #post-## --> |
||
98 | |||
99 | <?php lsx_entry_after(); |
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.