Completed
Push — master ( 0e00e1...c8b83c )
by Fernando
06:22
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.
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.
inc/extras.php 1 patch
Braces   +29 added lines, -16 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
 	}
@@ -323,18 +326,29 @@  discard block
 block discarded – undo
323 326
 		$http_user_agent = ! empty( $http_user_agent ) ? $http_user_agent : '';
324 327
 
325 328
         global $is_lynx, $is_gecko, $is_ie, $is_opera, $is_ns4, $is_safari, $is_chrome, $is_iphone;
326
-        if($is_lynx) $classes[] = 'lynx';
327
-        elseif($is_gecko) $classes[] = 'gecko';
328
-        elseif($is_opera) $classes[] = 'opera';
329
-        elseif($is_ns4) $classes[] = 'ns4';
330
-        elseif($is_safari) $classes[] = 'safari';
331
-        elseif($is_chrome) $classes[] = 'chrome';
332
-        elseif($is_ie) {
329
+        if($is_lynx) {
330
+        	$classes[] = 'lynx';
331
+        } elseif($is_gecko) {
332
+        	$classes[] = 'gecko';
333
+        } elseif($is_opera) {
334
+        	$classes[] = 'opera';
335
+        } elseif($is_ns4) {
336
+        	$classes[] = 'ns4';
337
+        } elseif($is_safari) {
338
+        	$classes[] = 'safari';
339
+        } elseif($is_chrome) {
340
+        	$classes[] = 'chrome';
341
+        } elseif($is_ie) {
333 342
                 $classes[] = 'ie';
334
-                if(preg_match('/MSIE ([0-9]+)([a-zA-Z0-9.]+)/', $http_user_agent, $browser_version))
335
-                $classes[] = 'ie'.$browser_version[1];
336
-        } else $classes[] = 'unknown';
337
-        if($is_iphone) $classes[] = 'iphone';
343
+                if(preg_match('/MSIE ([0-9]+)([a-zA-Z0-9.]+)/', $http_user_agent, $browser_version)) {
344
+                                $classes[] = 'ie'.$browser_version[1];
345
+                }
346
+        } else {
347
+        	$classes[] = 'unknown';
348
+        }
349
+        if($is_iphone) {
350
+        	$classes[] = 'iphone';
351
+        }
338 352
         if ( stristr( $http_user_agent, "mac") ) {
339 353
                  $classes[] = 'osx';
340 354
            } elseif ( stristr( $http_user_agent, "linux") ) {
@@ -392,8 +406,7 @@  discard block
 block discarded – undo
392 406
 
393 407
 			if ( ! empty( $pagination ) ) {
394 408
 				$excerpt .= $pagination;
395
-			}
396
-			else {
409
+			} else {
397 410
 				$excerpt .= '<p><a class="moretag" href="'.get_permalink().'">'.__('Continue reading','lsx').'</a></p>';
398 411
 			}
399 412
 		}
Please login to merge, or discard this patch.
inc/jetpack.php 1 patch
Braces   +8 added lines, -9 removed lines patch added patch discarded remove patch
@@ -243,14 +243,13 @@  discard block
 block discarded – undo
243 243
 
244 244
 		$meta_value = get_post_meta( $post_id, $meta_key, true );
245 245
 
246
-		if ( $new_meta_value && '' == $meta_value )
247
-			add_post_meta( $post_id, $meta_key, $new_meta_value, true );
248
-
249
-		elseif ( $new_meta_value && $new_meta_value != $meta_value )
250
-		update_post_meta( $post_id, $meta_key, $new_meta_value );
251
-
252
-		elseif ( '' == $new_meta_value && $meta_value )
253
-		delete_post_meta( $post_id, $meta_key, $meta_value );
246
+		if ( $new_meta_value && '' == $meta_value ) {
247
+					add_post_meta( $post_id, $meta_key, $new_meta_value, true );
248
+		} elseif ( $new_meta_value && $new_meta_value != $meta_value ) {
249
+				update_post_meta( $post_id, $meta_key, $new_meta_value );
250
+		} elseif ( '' == $new_meta_value && $meta_value ) {
251
+				delete_post_meta( $post_id, $meta_key, $meta_value );
252
+		}
254 253
 	}
255 254
 }
256 255
 
@@ -402,7 +401,7 @@  discard block
 block discarded – undo
402 401
 		
403 402
 		if('jetpack-portfolio' == get_post_type()){
404 403
 			get_template_part( 'content', 'portfolio' );
405
-		}else{
404
+		} else{
406 405
 			get_template_part( 'content', get_post_type() );
407 406
 		}
408 407
 	}
Please login to merge, or discard this patch.