Completed
Push — master ( 296a4e...80da17 )
by Fernando
05:58
created

content-post.php (3 issues)

Upgrade to new PHP Analysis Engine

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
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.

Loading history...
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 esc_attr( $format ) ?>"></a>
27
				<?php } else { ?>
28
					<a href="<?php echo esc_url($format_link) ?>" class="format-link fa fa-<?php echo esc_attr( $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.

Loading history...
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
		<?php if ( has_tag() || ( function_exists( 'sharing_display' ) || class_exists( 'Jetpack_Likes' ) ) ) : ?>
58
			<div class="post-tags-wrapper">
59
				<?php lsx_content_post_tags(); ?>
60
61
				<?php
62
					if ( function_exists( 'sharing_display' ) ) {
63
						sharing_display( '', true );
64
					}
65
66
					if ( class_exists( 'Jetpack_Likes' ) ) {
67
						$custom_likes = new Jetpack_Likes;
68
						echo wp_kses_post( $custom_likes->post_likes( '' ) );
69
					}
70
				?>
71
			</div>
72
		<?php endif ?>
73
74
		<?php
75
			// If comments are open or we have at least one comment, load up the comment template
76 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.

Loading history...
77
				<a class="comments-link post-meta-link" data-toggle="collapse" href="#comments-collapse"><strong><?php echo esc_html( get_comments_number() ) ?></strong> <?php esc_html_e('Comments','lsx'); ?> <span class="fa fa-chevron-down"></span></a>
78
79
				<div class="collapse" id="comments-collapse">
80
					<?php 
81
						comments_template();
82
					?>
83
				</div>
84
		<?php endif; ?>
85
	</footer><!-- .footer-meta -->
86
	
87
	<?php edit_post_link( esc_html__( 'Edit', 'lsx' ), '<footer class="entry-meta"><span class="edit-link">', '</span></footer>' ); ?>
88
89
	<?php lsx_entry_bottom(); ?>
90
91
</article><!-- #post-## -->
92
93
<?php lsx_entry_after();