Passed
Push — master ( 1c32b3...13e549 )
by Warwick
03:38 queued 11s
created
templates/content-single-team.php 1 patch
Spacing   +66 added lines, -66 removed lines patch added patch discarded remove patch
@@ -7,34 +7,34 @@  discard block
 block discarded – undo
7 7
 <?php
8 8
 	global $lsx_team;
9 9
 
10
-	$thumbnail = $lsx_team->get_thumbnail( get_the_ID(), 'lsx-team-single' );
10
+	$thumbnail = $lsx_team->get_thumbnail(get_the_ID(), 'lsx-team-single');
11 11
 
12
-	$job_title = get_post_meta( get_the_ID(), 'lsx_job_title', true );
12
+	$job_title = get_post_meta(get_the_ID(), 'lsx_job_title', true);
13 13
 
14 14
 	$links = array(
15
-		'facebook'  => get_post_meta( get_the_ID(), 'lsx_facebook', true ),
16
-		'twitter'   => get_post_meta( get_the_ID(), 'lsx_twitter', true ),
17
-		'linkedin'  => get_post_meta( get_the_ID(), 'lsx_linkedin', true ),
18
-		'github'    => get_post_meta( get_the_ID(), 'lsx_github', true ),
19
-		'wordpress' => get_post_meta( get_the_ID(), 'lsx_wordpress', true ),
15
+		'facebook'  => get_post_meta(get_the_ID(), 'lsx_facebook', true),
16
+		'twitter'   => get_post_meta(get_the_ID(), 'lsx_twitter', true),
17
+		'linkedin'  => get_post_meta(get_the_ID(), 'lsx_linkedin', true),
18
+		'github'    => get_post_meta(get_the_ID(), 'lsx_github', true),
19
+		'wordpress' => get_post_meta(get_the_ID(), 'lsx_wordpress', true),
20 20
 	);
21 21
 
22
-	foreach ( $links as $service => $link ) {
23
-		if ( empty( $link ) ) {
24
-			unset( $links[ $service ] );
22
+	foreach ($links as $service => $link) {
23
+		if (empty($link)) {
24
+			unset($links[$service]);
25 25
 		}
26 26
 	}
27 27
 
28
-	$email = get_post_meta( get_the_ID(), 'lsx_email_contact', true );
29
-	$phone = get_post_meta( get_the_ID(), 'lsx_tel', true );
30
-	$skype = get_post_meta( get_the_ID(), 'lsx_skype', true );
28
+	$email = get_post_meta(get_the_ID(), 'lsx_email_contact', true);
29
+	$phone = get_post_meta(get_the_ID(), 'lsx_tel', true);
30
+	$skype = get_post_meta(get_the_ID(), 'lsx_skype', true);
31 31
 
32 32
 	$phone_attr = $phone;
33
-	$phone_attr = str_replace( ' ', '', $phone_attr );
34
-	$phone_attr = str_replace( '+', '', $phone_attr );
35
-	$phone_attr = str_replace( '(', '', $phone_attr );
36
-	$phone_attr = str_replace( ')', '', $phone_attr );
37
-	$phone_attr = str_replace( '.', '', $phone_attr );
33
+	$phone_attr = str_replace(' ', '', $phone_attr);
34
+	$phone_attr = str_replace('+', '', $phone_attr);
35
+	$phone_attr = str_replace('(', '', $phone_attr);
36
+	$phone_attr = str_replace(')', '', $phone_attr);
37
+	$phone_attr = str_replace('.', '', $phone_attr);
38 38
 
39 39
 	// Tabs
40 40
 
@@ -42,13 +42,13 @@  discard block
 block discarded – undo
42 42
 
43 43
 	// Tab Posts
44 44
 
45
-	$site_user = get_post_meta( get_the_ID(), 'lsx_site_user', true );
45
+	$site_user = get_post_meta(get_the_ID(), 'lsx_site_user', true);
46 46
 
47
-	if ( ! empty( $site_user ) ) {
48
-		if ( is_user_member_of_blog( $site_user ) ) {
49
-			$user_posts = count_user_posts( $site_user, 'post' );
47
+	if (!empty($site_user)) {
48
+		if (is_user_member_of_blog($site_user)) {
49
+			$user_posts = count_user_posts($site_user, 'post');
50 50
 
51
-			if ( $user_posts > 0 ) {
51
+			if ($user_posts > 0) {
52 52
 				$params = array(
53 53
 					'post_type' => 'post',
54 54
 					'author' => $site_user,
@@ -76,16 +76,16 @@  discard block
 block discarded – undo
76 76
 					),
77 77
 				);
78 78
 
79
-				$posts_query = new \WP_Query( $params );
79
+				$posts_query = new \WP_Query($params);
80 80
 
81
-				if ( $posts_query->have_posts() ) {
81
+				if ($posts_query->have_posts()) {
82 82
 					$tab_post['post_type'] = 'post';
83
-					$tab_post['title'] = esc_html__( 'Posts', 'lsx-team' );
83
+					$tab_post['title'] = esc_html__('Posts', 'lsx-team');
84 84
 					$tab_post['posts'] = $posts_query->posts;
85 85
 
86
-					if ( ! empty( $tab_post['posts'] ) ) {
87
-						$post_ids = join( ',', $tab_post['posts'] );
88
-						$tab_post['shortcode'] = '[lsx_posts columns="3" limit="9" include="' . $post_ids . '"]';
86
+					if (!empty($tab_post['posts'])) {
87
+						$post_ids = join(',', $tab_post['posts']);
88
+						$tab_post['shortcode'] = '[lsx_posts columns="3" limit="9" include="'.$post_ids.'"]';
89 89
 						$tabs[] = $tab_post;
90 90
 					}
91 91
 				}
@@ -96,24 +96,24 @@  discard block
 block discarded – undo
96 96
 	// Tab Projects
97 97
 
98 98
 	$tab_project['post_type'] = 'project';
99
-	$tab_project['title'] = esc_html__( 'Projects', 'lsx-team' );
100
-	$tab_project['posts'] = get_post_meta( get_the_ID(), 'project_to_team', true );
101
-	if ( is_plugin_active( 'lsx-projects/lsx-projects.php' ) && ( ! empty( $tab_project['posts'] ) ) ) {
102
-		$post_ids = join( ',', $tab_project['posts'] );
103
-		$tab_project['shortcode'] = '[lsx_projects columns="3" include="' . $post_ids . '"]';
99
+	$tab_project['title'] = esc_html__('Projects', 'lsx-team');
100
+	$tab_project['posts'] = get_post_meta(get_the_ID(), 'project_to_team', true);
101
+	if (is_plugin_active('lsx-projects/lsx-projects.php') && (!empty($tab_project['posts']))) {
102
+		$post_ids = join(',', $tab_project['posts']);
103
+		$tab_project['shortcode'] = '[lsx_projects columns="3" include="'.$post_ids.'"]';
104 104
 		$tabs[] = $tab_project;
105 105
 	}
106 106
 
107 107
 	// Tab Services
108 108
 
109
-	if ( is_plugin_active( 'lsx-services/lsx-services.php' ) ) {
109
+	if (is_plugin_active('lsx-services/lsx-services.php')) {
110 110
 		$tab_service['post_type'] = 'service';
111
-		$tab_service['title'] = esc_html__( 'Services', 'lsx-team' );
112
-		$tab_service['posts'] = get_post_meta( get_the_ID(), 'service_to_team', true );
111
+		$tab_service['title'] = esc_html__('Services', 'lsx-team');
112
+		$tab_service['posts'] = get_post_meta(get_the_ID(), 'service_to_team', true);
113 113
 
114
-		if ( ! empty( $tab_service['posts'] ) ) {
115
-			$post_ids = join( ',', $tab_service['posts'] );
116
-			$tab_service['shortcode'] = '[lsx_services columns="3" include="' . $post_ids . '"]';
114
+		if (!empty($tab_service['posts'])) {
115
+			$post_ids = join(',', $tab_service['posts']);
116
+			$tab_service['shortcode'] = '[lsx_services columns="3" include="'.$post_ids.'"]';
117 117
 			$tabs[] = $tab_service;
118 118
 		}
119 119
 	}
@@ -121,18 +121,18 @@  discard block
 block discarded – undo
121 121
 	// Tab Testimonials
122 122
 
123 123
 	$tab_testimonial['post_type'] = 'testimonial';
124
-	$tab_testimonial['title'] = esc_html__( 'Testimonials', 'lsx-team' );
125
-	$tab_testimonial['posts'] = get_post_meta( get_the_ID(), 'testimonial_to_team', true );
124
+	$tab_testimonial['title'] = esc_html__('Testimonials', 'lsx-team');
125
+	$tab_testimonial['posts'] = get_post_meta(get_the_ID(), 'testimonial_to_team', true);
126 126
 
127
-	if ( is_plugin_active( 'lsx-testimonials/lsx-testimonials.php' ) && ( ! empty( $tab_testimonial['posts'] ) ) ) {
128
-		if ( count( $tab_testimonial['posts'] ) <= 2 ) {
129
-			$columns = count( $tab_testimonial['posts'] );
127
+	if (is_plugin_active('lsx-testimonials/lsx-testimonials.php') && (!empty($tab_testimonial['posts']))) {
128
+		if (count($tab_testimonial['posts']) <= 2) {
129
+			$columns = count($tab_testimonial['posts']);
130 130
 		} else {
131 131
 			$columns = 2;
132 132
 		}
133 133
 
134
-		$post_ids = join( ',', $tab_testimonial['posts'] );
135
-		$tab_testimonial['shortcode'] = '[lsx_testimonials columns="' . $columns . '" include="' . $post_ids . '" orderby="date" order="DESC" display="excerpt"]';
134
+		$post_ids = join(',', $tab_testimonial['posts']);
135
+		$tab_testimonial['shortcode'] = '[lsx_testimonials columns="'.$columns.'" include="'.$post_ids.'" orderby="date" order="DESC" display="excerpt"]';
136 136
 		$tabs[] = $tab_testimonial;
137 137
 	}
138 138
 ?>
@@ -146,15 +146,15 @@  discard block
 block discarded – undo
146 146
 	<div class="row">
147 147
 		<div class="col-xs-12 col-sm-6 col-md-4">
148 148
 			<figure class="lsx-team-avatar">
149
-				<?php echo wp_kses_post( $thumbnail ); ?>
149
+				<?php echo wp_kses_post($thumbnail); ?>
150 150
 			</figure>
151 151
 
152
-			<?php if ( count( $links ) > 0 ) : ?>
153
-				<span class="lsx-team-socials-header"><?php echo esc_html__( 'Follow', 'lsx-team' ) . ':'; ?></span>
152
+			<?php if (count($links) > 0) : ?>
153
+				<span class="lsx-team-socials-header"><?php echo esc_html__('Follow', 'lsx-team').':'; ?></span>
154 154
 
155 155
 				<ul class="lsx-team-socials list-inline">
156
-					<?php foreach ( $links as $service => $link ) : ?>
157
-						<li><a href="<?php echo esc_html( $link ); ?>" target="_blank" rel="nofollow noreferrer noopener"><i class="fa fa-<?php echo esc_html( $service ); ?>" aria-hidden="true"></i></a></li>
156
+					<?php foreach ($links as $service => $link) : ?>
157
+						<li><a href="<?php echo esc_html($link); ?>" target="_blank" rel="nofollow noreferrer noopener"><i class="fa fa-<?php echo esc_html($service); ?>" aria-hidden="true"></i></a></li>
158 158
 					<?php endforeach; ?>
159 159
 				</ul>
160 160
 			<?php endif; ?>
@@ -162,39 +162,39 @@  discard block
 block discarded – undo
162 162
 
163 163
 		<div class="col-xs-12 col-sm-6 col-md-8">
164 164
 			<h1 class="lsx-team-name"><?php the_title(); ?></h1>
165
-			<h5 class="lsx-team-job-title"><?php echo esc_html( $job_title ); ?></h5>
165
+			<h5 class="lsx-team-job-title"><?php echo esc_html($job_title); ?></h5>
166 166
 			<div class="lsx-team-content"><?php the_content(); ?></div>
167 167
 
168
-			<?php if ( ! empty( $email ) || ! empty( $phone ) || ! empty( $skype ) ) : ?>
168
+			<?php if (!empty($email) || !empty($phone) || !empty($skype)) : ?>
169 169
 				<ul class="lsx-team-contact list-inline">
170
-					<?php if ( ! empty( $email ) ) : ?>
171
-						<li><a href="mailto:<?php echo esc_attr( $email ); ?>"><i class="fa fa-envelope-o" aria-hidden="true"></i> <?php echo esc_attr( $email ); ?></a></li>
170
+					<?php if (!empty($email)) : ?>
171
+						<li><a href="mailto:<?php echo esc_attr($email); ?>"><i class="fa fa-envelope-o" aria-hidden="true"></i> <?php echo esc_attr($email); ?></a></li>
172 172
 					<?php endif; ?>
173 173
 
174
-					<?php if ( ! empty( $phone ) ) : ?>
175
-						<li><a href="tel:<?php echo esc_attr( $phone_attr ); ?>"><i class="fa fa-phone" aria-hidden="true"></i> <?php echo esc_attr( $phone ); ?></a></li>
174
+					<?php if (!empty($phone)) : ?>
175
+						<li><a href="tel:<?php echo esc_attr($phone_attr); ?>"><i class="fa fa-phone" aria-hidden="true"></i> <?php echo esc_attr($phone); ?></a></li>
176 176
 					<?php endif; ?>
177 177
 
178
-					<?php if ( ! empty( $skype ) ) : ?>
179
-						<li><i class="fa fa-skype" aria-hidden="true"></i> <?php echo esc_attr( $skype ); ?></li>
178
+					<?php if (!empty($skype)) : ?>
179
+						<li><i class="fa fa-skype" aria-hidden="true"></i> <?php echo esc_attr($skype); ?></li>
180 180
 					<?php endif; ?>
181 181
 				</ul>
182 182
 			<?php endif; ?>
183 183
 		</div>
184 184
 	</div>
185 185
 
186
-	<?php if ( count( $tabs ) > 0 ) : ?>
186
+	<?php if (count($tabs) > 0) : ?>
187 187
 		<div class="entry-tabs">
188 188
 			<ul class="nav nav-tabs">
189
-				<?php foreach ( $tabs as $i => $tab ) : ?>
190
-					<li<?php if ( 0 === $i ) echo ' class="active"'; ?>><a data-toggle="tab" href="#<?php echo esc_attr( sanitize_title( $tab['title'] ) ); ?>"><?php echo esc_html( $tab['title'] ); ?></a></li>
189
+				<?php foreach ($tabs as $i => $tab) : ?>
190
+					<li<?php if (0 === $i) echo ' class="active"'; ?>><a data-toggle="tab" href="#<?php echo esc_attr(sanitize_title($tab['title'])); ?>"><?php echo esc_html($tab['title']); ?></a></li>
191 191
 				<?php endforeach; ?>
192 192
 			</ul>
193 193
 
194 194
 			<div class="tab-content">
195
-				<?php foreach ( $tabs as $i => $tab ) : ?>
196
-					<div id="<?php echo esc_attr( sanitize_title( $tab['title'] ) ); ?>" class="tab-pane fade<?php if ( 0 === $i ) echo ' in active'; ?>">
197
-						<?php echo do_shortcode( $tab['shortcode'] ); ?>
195
+				<?php foreach ($tabs as $i => $tab) : ?>
196
+					<div id="<?php echo esc_attr(sanitize_title($tab['title'])); ?>" class="tab-pane fade<?php if (0 === $i) echo ' in active'; ?>">
197
+						<?php echo do_shortcode($tab['shortcode']); ?>
198 198
 					</div>
199 199
 				<?php endforeach; ?>
200 200
 			</div>
Please login to merge, or discard this patch.