Completed
Push — master ( 45dddd...62b20b )
by
unknown
02:55
created
content-none.php 1 patch
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -23,9 +23,12 @@
 block discarded – undo
23 23
 			<p><?php esc_html_e( 'Sorry, but nothing matched your search terms. Please try again with some different keywords.', 'lsx' ); ?></p>
24 24
 			<?php get_search_form(); ?>
25 25
 
26
-		<?php else : ?>
26
+		<?php else {
27
+	: ?>
27 28
 
28
-			<p><?php esc_html_e( 'It seems we can&rsquo;t find what you&rsquo;re looking for. Perhaps searching can help.', 'lsx' ); ?></p>
29
+			<p><?php esc_html_e( 'It seems we can&rsquo;t find what you&rsquo;re looking for. Perhaps searching can help.', 'lsx' );
30
+}
31
+?></p>
29 32
 			<?php get_search_form(); ?>
30 33
 
31 34
 		<?php endif; ?>
Please login to merge, or discard this patch.
search.php 1 patch
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -44,9 +44,12 @@
 block discarded – undo
44 44
 			
45 45
 			<?php lsx_paging_nav(); ?>
46 46
 
47
-		<?php else : ?>
47
+		<?php else {
48
+	: ?>
48 49
 
49
-			<?php get_template_part( 'content', 'none' ); ?>
50
+			<?php get_template_part( 'content', 'none' );
51
+}
52
+?>
50 53
 
51 54
 		<?php endif; ?>
52 55
 
Please login to merge, or discard this patch.
inc/extras.php 1 patch
Braces   +30 added lines, -17 removed lines patch added patch discarded remove patch
@@ -1,5 +1,8 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if ( ! defined( 'ABSPATH' ) ) return; // Exit if accessed directly
2
+if ( ! defined( 'ABSPATH' ) ) {
3
+	return;
4
+}
5
+// Exit if accessed directly
3 6
 
4 7
 /**
5 8
  * Add and remove body_class() classes
@@ -192,10 +195,10 @@  discard block
 block discarded – undo
192 195
 	if(false === $image_src){
193 196
 		$post_id = get_the_ID(); 
194 197
 		$post_thumbnail_id = get_post_thumbnail_id( $post_id );
195
-	}elseif(false != $image_src	){
198
+	} elseif(false != $image_src	){
196 199
 		if(is_numeric($image_src)){
197 200
 			$post_thumbnail_id = $image_src;
198
-		}else{
201
+		} else{
199 202
 			$post_thumbnail_id = lsx_get_attachment_id_from_src($image_src);
200 203
 		}
201 204
 	}
@@ -205,7 +208,7 @@  discard block
 block discarded – undo
205 208
 		$srcset = false;
206 209
 		$img = wp_get_attachment_image_src($post_thumbnail_id,$size);
207 210
 		$img = $img[0];
208
-	}else{
211
+	} else{
209 212
 		$srcset = true;
210 213
 		$img = wp_get_attachment_image_srcset($post_thumbnail_id,$size);
211 214
 		if($img == false) {
@@ -324,18 +327,29 @@  discard block
 block discarded – undo
324 327
 		$http_user_agent = ! empty( $http_user_agent ) ? $http_user_agent : '';
325 328
 
326 329
         global $is_lynx, $is_gecko, $is_IE, $is_opera, $is_NS4, $is_safari, $is_chrome, $is_iphone;
327
-        if($is_lynx) $classes[] = 'lynx';
328
-        elseif($is_gecko) $classes[] = 'gecko';
329
-        elseif($is_opera) $classes[] = 'opera';
330
-        elseif($is_NS4) $classes[] = 'ns4';
331
-        elseif($is_safari) $classes[] = 'safari';
332
-        elseif($is_chrome) $classes[] = 'chrome';
333
-        elseif($is_IE) {
330
+        if($is_lynx) {
331
+        	$classes[] = 'lynx';
332
+        } elseif($is_gecko) {
333
+        	$classes[] = 'gecko';
334
+        } elseif($is_opera) {
335
+        	$classes[] = 'opera';
336
+        } elseif($is_NS4) {
337
+        	$classes[] = 'ns4';
338
+        } elseif($is_safari) {
339
+        	$classes[] = 'safari';
340
+        } elseif($is_chrome) {
341
+        	$classes[] = 'chrome';
342
+        } elseif($is_IE) {
334 343
                 $classes[] = 'ie';
335
-                if(preg_match('/MSIE ([0-9]+)([a-zA-Z0-9.]+)/', $http_user_agent, $browser_version))
336
-                $classes[] = 'ie'.$browser_version[1];
337
-        } else $classes[] = 'unknown';
338
-        if($is_iphone) $classes[] = 'iphone';
344
+                if(preg_match('/MSIE ([0-9]+)([a-zA-Z0-9.]+)/', $http_user_agent, $browser_version)) {
345
+                                $classes[] = 'ie'.$browser_version[1];
346
+                }
347
+        } else {
348
+        	$classes[] = 'unknown';
349
+        }
350
+        if($is_iphone) {
351
+        	$classes[] = 'iphone';
352
+        }
339 353
         if ( stristr( $http_user_agent, "mac") ) {
340 354
                  $classes[] = 'osx';
341 355
            } elseif ( stristr( $http_user_agent, "linux") ) {
@@ -393,8 +407,7 @@  discard block
 block discarded – undo
393 407
 
394 408
 			if ( ! empty( $pagination ) ) {
395 409
 				$excerpt .= $pagination;
396
-			}
397
-			else {
410
+			} else {
398 411
 				$excerpt .= '<p><a class="moretag" href="'.get_permalink().'">'.__('Continue reading','lsx').'</a></p>';
399 412
 			}
400 413
 		}
Please login to merge, or discard this patch.
inc/jetpack.php 1 patch
Braces   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -227,8 +227,9 @@  discard block
 block discarded – undo
227 227
 
228 228
 	$post_type = get_post_type_object( $post->post_type );
229 229
 
230
-	if ( !current_user_can( $post_type->cap->edit_post, $post_id ) )
231
-		return $post_id;
230
+	if ( !current_user_can( $post_type->cap->edit_post, $post_id ) ) {
231
+			return $post_id;
232
+	}
232 233
 
233 234
 
234 235
 	$meta_keys = array('lsx-website','lsx-client');
@@ -239,14 +240,13 @@  discard block
 block discarded – undo
239 240
 
240 241
 		$meta_value = get_post_meta( $post_id, $meta_key, true );
241 242
 
242
-		if ( $new_meta_value && '' == $meta_value )
243
-			add_post_meta( $post_id, $meta_key, $new_meta_value, true );
244
-
245
-		elseif ( $new_meta_value && $new_meta_value != $meta_value )
246
-		update_post_meta( $post_id, $meta_key, $new_meta_value );
247
-
248
-		elseif ( '' == $new_meta_value && $meta_value )
249
-		delete_post_meta( $post_id, $meta_key, $meta_value );
243
+		if ( $new_meta_value && '' == $meta_value ) {
244
+					add_post_meta( $post_id, $meta_key, $new_meta_value, true );
245
+		} elseif ( $new_meta_value && $new_meta_value != $meta_value ) {
246
+				update_post_meta( $post_id, $meta_key, $new_meta_value );
247
+		} elseif ( '' == $new_meta_value && $meta_value ) {
248
+				delete_post_meta( $post_id, $meta_key, $meta_value );
249
+		}
250 250
 
251 251
 	}
252 252
 }
@@ -399,7 +399,7 @@  discard block
 block discarded – undo
399 399
 		
400 400
 		if('jetpack-portfolio' == get_post_type()){
401 401
 			get_template_part( 'content', 'portfolio' );
402
-		}else{
402
+		} else{
403 403
 			get_template_part( 'content', get_post_type() );
404 404
 		}
405 405
 	}
Please login to merge, or discard this patch.
page-templates/template-portfolio.php 1 patch
Braces   +13 added lines, -5 removed lines patch added patch discarded remove patch
@@ -33,8 +33,10 @@  discard block
 block discarded – undo
33 33
 					$paged = get_query_var( 'paged' );
34 34
 				elseif ( get_query_var( 'page' ) ) :
35 35
 					$paged = get_query_var( 'page' );
36
-				else :
36
+				else {
37
+					:
37 38
 					$paged = 1;
39
+				}
38 40
 				endif;
39 41
 
40 42
 				$args = array(
@@ -59,11 +61,14 @@  discard block
 block discarded – undo
59 61
 					</div>
60 62
 				</div><!-- .portfolio-wrapper -->
61 63
 
62
-			<?php else : ?>
64
+			<?php else {
65
+	: ?>
63 66
 
64 67
 				<section class="no-results not-found">
65 68
 					<header class="page-header">
66
-						<h1 class="page-title"><?php esc_html_e( 'Nothing Found', 'lsx' ); ?></h1>
69
+						<h1 class="page-title"><?php esc_html_e( 'Nothing Found', 'lsx' );
70
+}
71
+?></h1>
67 72
 					</header><!-- .page-header -->
68 73
 
69 74
 					<div class="page-content">
@@ -71,9 +76,12 @@  discard block
 block discarded – undo
71 76
 
72 77
 							<p><?php esc_html_e( 'Ready to publish your first project?', 'lsx' ); ?> <a href="<?php echo esc_url( admin_url( 'post-new.php?post_type=jetpack-portfolio' ) ) ?>"><?php esc_html_e( 'Get started here', 'lsx' ); ?></a></p>
73 78
 
74
-						<?php else : ?>
79
+						<?php else {
80
+	: ?>
75 81
 
76
-							<p><?php esc_html_e( 'It seems we can&rsquo;t find what you&rsquo;re looking for. Perhaps searching can help.', 'lsx' ); ?></p>
82
+							<p><?php esc_html_e( 'It seems we can&rsquo;t find what you&rsquo;re looking for. Perhaps searching can help.', 'lsx' );
83
+}
84
+?></p>
77 85
 							<?php get_search_form(); ?>
78 86
 
79 87
 						<?php endif; ?>
Please login to merge, or discard this patch.
inc/wp-bootstrap-navwalker.php 1 patch
Braces   +34 added lines, -21 removed lines patch added patch discarded remove patch
@@ -1,5 +1,8 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if ( ! defined( 'ABSPATH' ) ) return; // Exit if accessed directly
2
+if ( ! defined( 'ABSPATH' ) ) {
3
+	return;
4
+}
5
+// Exit if accessed directly
3 6
 
4 7
 class Lsx_Bootstrap_Navwalker extends Walker_Nav_Menu {
5 8
 
@@ -71,14 +74,17 @@  discard block
 block discarded – undo
71 74
 			
72 75
 			$class_names = join( ' ', $classes );
73 76
 
74
-			if ( $args->has_children )
75
-				$class_names .= ' dropdown';
77
+			if ( $args->has_children ) {
78
+							$class_names .= ' dropdown';
79
+			}
76 80
 
77
-			if ( in_array( 'current-menu-item', $classes ) )
78
-				$class_names .= ' active';
81
+			if ( in_array( 'current-menu-item', $classes ) ) {
82
+							$class_names .= ' active';
83
+			}
79 84
 			
80
-			if ( in_array( 'current-menu-parent', $classes ) )
81
-				$class_names .= ' active';			
85
+			if ( in_array( 'current-menu-parent', $classes ) ) {
86
+							$class_names .= ' active';
87
+			}
82 88
 			
83 89
 			//Check if this is ment to be a "social" type menu
84 90
 			$class_names = $class_names ? ' class="' . esc_attr( $class_names ) . '"' : '';
@@ -159,14 +165,16 @@  discard block
 block discarded – undo
159 165
 	 * @return null Null on failure with no changes to parameters.
160 166
 	 */
161 167
 	public function display_element( $element, &$children_elements, $max_depth, $depth, $args, &$output ) {
162
-        if ( ! $element )
163
-            return;
168
+        if ( ! $element ) {
169
+                    return;
170
+        }
164 171
 
165 172
         $id_field = $this->db_fields['id'];
166 173
 
167 174
         // Display this element.
168
-        if ( is_object( $args[0] ) )
169
-           $args[0]->has_children = ! empty( $children_elements[ $element->$id_field ] );
175
+        if ( is_object( $args[0] ) ) {
176
+                   $args[0]->has_children = ! empty( $children_elements[ $element->$id_field ] );
177
+        }
170 178
 
171 179
         parent::display_element( $element, $children_elements, $max_depth, $depth, $args, $output );
172 180
     }
@@ -189,29 +197,34 @@  discard block
 block discarded – undo
189 197
 			if ( $args['container'] ) {
190 198
 				$fb_output = '<' . $args['container'];
191 199
 
192
-				if ( $args['container_id'] )
193
-					$fb_output .= ' id="' . $args['container_id'] . '"';
200
+				if ( $args['container_id'] ) {
201
+									$fb_output .= ' id="' . $args['container_id'] . '"';
202
+				}
194 203
 
195
-				if ( $args['container_class'] )
196
-					$fb_output .= ' class="' . $args['container_class'] . '"';
204
+				if ( $args['container_class'] ) {
205
+									$fb_output .= ' class="' . $args['container_class'] . '"';
206
+				}
197 207
 
198 208
 				$fb_output .= '>';
199 209
 			}
200 210
 
201 211
 			$fb_output .= '<ul';
202 212
 
203
-			if ( $args['menu_id'] )
204
-				$fb_output .= ' id="' . $args['menu_id'] . '"';
213
+			if ( $args['menu_id'] ) {
214
+							$fb_output .= ' id="' . $args['menu_id'] . '"';
215
+			}
205 216
 
206
-			if ( $args['menu_class'] )
207
-				$fb_output .= ' class="' . $args['menu_class'] . '"';
217
+			if ( $args['menu_class'] ) {
218
+							$fb_output .= ' class="' . $args['menu_class'] . '"';
219
+			}
208 220
 
209 221
 			$fb_output .= '>';
210 222
 			$fb_output .= '<li><a href="' . admin_url( 'nav-menus.php' ) . '">' . esc_html__( 'Add a menu', 'lsx' ) . '</a></li>';
211 223
 			$fb_output .= '</ul>';
212 224
 
213
-			if ( $args['container'] )
214
-				$fb_output .= '</' . $args['container'] . '>';
225
+			if ( $args['container'] ) {
226
+							$fb_output .= '</' . $args['container'] . '>';
227
+			}
215 228
 
216 229
 			echo wp_kses_post( $fb_output );
217 230
 		}
Please login to merge, or discard this patch.