Issues (1066)

templates/content-archive-projects.php (23 issues)

1
<?php
2
/**
0 ignored issues
show
Missing short description in doc comment
Loading history...
3
 * @package lsx-projects
4
 */
0 ignored issues
show
There must be exactly one blank line after the file comment
Loading history...
5
?>
6
7
<?php
8
	global $lsx_projects_frontend;
9
10
	$groups = '';
0 ignored issues
show
Equals sign not aligned with surrounding assignments; expected 7 spaces but found 1 space

This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.

To visualize

$a = "a";
$ab = "ab";
$abc = "abc";

will produce issues in the first and second line, while this second example

$a   = "a";
$ab  = "ab";
$abc = "abc";

will produce no issues.

Loading history...
11
	$groups_class = '';
12
	$terms = get_the_terms( get_the_ID(), 'project-group' );
0 ignored issues
show
Equals sign not aligned with surrounding assignments; expected 8 spaces but found 1 space

This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.

To visualize

$a = "a";
$ab = "ab";
$abc = "abc";

will produce issues in the first and second line, while this second example

$a   = "a";
$ab  = "ab";
$abc = "abc";

will produce no issues.

Loading history...
13
14
	if ( $terms && ! is_wp_error( $terms ) ) {
0 ignored issues
show
Expected 0 spaces after opening bracket; 1 found
Loading history...
Expected 0 spaces before closing bracket; 1 found
Loading history...
15
		$groups = array();
0 ignored issues
show
Equals sign not aligned with surrounding assignments; expected 7 spaces but found 1 space

This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.

To visualize

$a = "a";
$ab = "ab";
$abc = "abc";

will produce issues in the first and second line, while this second example

$a   = "a";
$ab  = "ab";
$abc = "abc";

will produce no issues.

Loading history...
16
		$groups_class = array();
17
18
		foreach ( $terms as $term ) {
0 ignored issues
show
Expected 0 spaces after opening bracket; 1 found
Loading history...
Expected 0 spaces before closing bracket; 1 found
Loading history...
19
			$groups[] = '<a href="' . get_term_link( $term ) . '">' . $term->name . '</a>';
0 ignored issues
show
Equals sign not aligned with surrounding assignments; expected 7 spaces but found 1 space

This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.

To visualize

$a = "a";
$ab = "ab";
$abc = "abc";

will produce issues in the first and second line, while this second example

$a   = "a";
$ab  = "ab";
$abc = "abc";

will produce no issues.

Loading history...
20
			$groups_class[] = 'filter-' . $term->slug;
21
		}
22
23
		$groups = join( ', ', $groups );
0 ignored issues
show
Equals sign not aligned with surrounding assignments; expected 7 spaces but found 1 space

This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.

To visualize

$a = "a";
$ab = "ab";
$abc = "abc";

will produce issues in the first and second line, while this second example

$a   = "a";
$ab  = "ab";
$abc = "abc";

will produce no issues.

Loading history...
24
		$groups_class = join( ' ', $groups_class );
25
	}
26
?>
27
28
<div class="col-xs-12 col-sm-6 col-md-6 lsx-projects-column <?php echo esc_attr( $groups_class ); ?>">
29
	<article class="lsx-projects-slot">
30
		<?php if ( ! empty( lsx_get_thumbnail( 'lsx-thumbnail-single' ) ) ) : ?>
0 ignored issues
show
Expected 0 spaces after opening bracket; 1 found
Loading history...
Expected 0 spaces before closing bracket; 1 found
Loading history...
31
			<?php if ( ! isset( $lsx_projects_frontend->options['display'] ) || ! isset( $lsx_projects_frontend->options['display']['team_disable_single'] ) ) : ?>
0 ignored issues
show
Expected 0 spaces after opening bracket; 1 found
Loading history...
Expected 0 spaces before closing bracket; 1 found
Loading history...
32
				<a href="<?php the_permalink(); ?>"><figure class="lsx-projects-avatar"><?php lsx_thumbnail( 'lsx-thumbnail-single' ); ?></figure></a>
33
			<?php else : ?>
34
				<figure class="lsx-projects-avatar"><?php lsx_thumbnail( 'lsx-thumbnail-single' ); ?></figure>
35
			<?php endif; ?>
36
		<?php endif; ?>
37
38
		<?php
39
		if ( empty( lsx_get_thumbnail( 'lsx-thumbnail-single' ) ) ) {
0 ignored issues
show
Expected 0 spaces after opening bracket; 1 found
Loading history...
Expected 0 spaces before closing bracket; 1 found
Loading history...
40
			if ( ! empty( projects_get_option( 'projects_placeholder' ) ) ) {
0 ignored issues
show
Expected 0 spaces after opening bracket; 1 found
Loading history...
Expected 0 spaces before closing bracket; 1 found
Loading history...
41
				echo wp_kses_post( '<img src="' . projects_get_option( 'projects_placeholder' ) . '" width="auto" alt="placeholder" />' );
42
			}
43
		}
44
		?>
45
46
		<h5 class="lsx-projects-title">
47
			<?php if ( ! isset( $lsx_projects_frontend->options['display'] ) || ! isset( $lsx_projects_frontend->options['display']['team_disable_single'] ) ) : ?>
0 ignored issues
show
Expected 0 spaces after opening bracket; 1 found
Loading history...
Expected 0 spaces before closing bracket; 1 found
Loading history...
48
				<a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
49
			<?php else : ?>
50
				<?php the_title(); ?>
51
			<?php endif; ?>
52
		</h5>
53
54
		<?php if ( ! empty( $groups ) ) : ?>
0 ignored issues
show
Expected 0 spaces after opening bracket; 1 found
Loading history...
Expected 0 spaces before closing bracket; 1 found
Loading history...
55
			<p class="lsx-projects-groups"><?php echo wp_kses_post( $groups ); ?></p>
56
		<?php endif; ?>
57
58
		<!--<div class="lsx-projects-content"><?php the_excerpt(); ?></div>-->
59
		<div class="lsx-projects-content"><a href="<?php the_permalink(); ?>" class="moretag"><?php esc_html_e( 'View more', 'lsx-projects' ); ?></a></div>
60
	</article>
61
</div>
62