Completed
Push — master ( bcb77d...aa4fea )
by
unknown
03:19
created
inc/extras.php 2 patches
Doc Comments   +2 added lines patch added patch discarded remove patch
@@ -198,6 +198,7 @@  discard block
 block discarded – undo
198 198
  * @package lsx
199 199
  * @subpackage extras
200 200
  * @category thumbnails
201
+ * @param string $size
201 202
  */
202 203
 function lsx_get_thumbnail($size,$image_src = false){
203 204
 	
@@ -252,6 +253,7 @@  discard block
 block discarded – undo
252 253
  * @package lsx
253 254
  * @subpackage extras
254 255
  * @category thumbnails
256
+ * @param boolean $image_src
255 257
  */
256 258
 function lsx_get_attachment_id_from_src($image_src) {
257 259
 	global $wpdb;
Please login to merge, or discard this 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/layout.php 2 patches
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -5,6 +5,7 @@
 block discarded – undo
5 5
  * Layout hooks
6 6
  *
7 7
  * @package lsx
8
+ * @param string $class
8 9
  */
9 10
 
10 11
 function lsx_layout_selector( $class, $area = 'site' ) {
Please login to merge, or discard this patch.
Braces   +5 added lines, -2 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
  * Layout hooks
@@ -62,7 +65,7 @@  discard block
 block discarded – undo
62 65
 	$show_on_front = get_option('show_on_front');
63 66
 	if('page' == $show_on_front){
64 67
 		return lsx_layout_selector( 'main', 'home' );
65
-	}else{
68
+	} else{
66 69
 		return lsx_layout_selector( 'main', 'site' );
67 70
 	}
68 71
 
Please login to merge, or discard this patch.
inc/lazyload.php 2 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -140,6 +140,9 @@
 block discarded – undo
140 140
 		return self::$noscripts[(int) $match[1]];
141 141
 	}
142 142
 
143
+	/**
144
+	 * @param string $new_class
145
+	 */
143 146
 	static function add_class( $html_string = '', $new_class ) {
144 147
 		$pattern = '/class=[\'"]([^\'"]*)[\'"]/';
145 148
 
Please login to merge, or discard this patch.
Braces   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,5 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if ( ! defined( 'ABSPATH' ) ) return;
2
+if ( ! defined( 'ABSPATH' ) ) {
3
+	return;
4
+}
3 5
 
4 6
 /*
5 7
  * LSX Lazy Load Images Class
@@ -25,8 +27,9 @@  discard block
 block discarded – undo
25 27
 	protected static $noscripts   = array();
26 28
 
27 29
 	static function init() {
28
-		if ( is_admin() )
29
-			return;
30
+		if ( is_admin() ) {
31
+					return;
32
+		}
30 33
 
31 34
 		if ( get_theme_mod( 'lsx_lazyload_status', '1' ) === false ) {
32 35
 			self::$enabled = false;
Please login to merge, or discard this patch.
inc/sanitize.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -97,7 +97,7 @@
 block discarded – undo
97 97
  * @subpackage sanitize
98 98
  *
99 99
  * @param array $input
100
- * @return array $output
100
+ * @return string|false $output
101 101
  */
102 102
 function lsx_sanitize_checkbox( $input ) {
103 103
 	if ( $input ) {
Please login to merge, or discard this patch.
inc/template-tags.php 2 patches
Doc Comments   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -7,7 +7,6 @@  discard block
 block discarded – undo
7 7
  * @author Novrian <[email protected]>
8 8
  * @copyright (c) 2013. Novrian Y.F.
9 9
  * @license MIT License
10
- * @param string $sep Your custom separator
11 10
  */
12 11
 function lsx_breadcrumbs() {
13 12
   if (!function_exists('yoast_breadcrumb') && !function_exists('woocommerce_breadcrumb')) {
@@ -262,7 +261,7 @@  discard block
 block discarded – undo
262 261
 	/**
263 262
 	 * Display navigation to next/previous set of posts when applicable.
264 263
 	 *
265
-	 * @return void
264
+	 * @return null|boolean
266 265
 	 */
267 266
 	function lsx_paging_nav() {
268 267
 		// Don't print empty markup if there's only one page.
Please login to merge, or discard this patch.
Braces   +15 added lines, -11 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
  * Yoast Breadcrumbs on Twitter Bootstrap
@@ -24,7 +27,7 @@  discard block
 block discarded – undo
24 27
   		woocommerce_breadcrumb();
25 28
   		$output = ob_get_clean();
26 29
   		$output = str_replace('woocommerce-breadcrumb', 'woocommerce-breadcrumb breadcrumbs-container', $output);
27
-  }elseif(function_exists('yoast_breadcrumb')){
30
+  } elseif(function_exists('yoast_breadcrumb')){
28 31
 	  	// Default Yoast Breadcrumbs Separator
29 32
 	  	$old_sep = '\&raquo\;';
30 33
 	  	
@@ -272,9 +275,9 @@  discard block
 block discarded – undo
272 275
 		
273 276
 		if(current_theme_supports('infinite-scroll') && class_exists('The_Neverending_Home_Page')){
274 277
 			return true;
275
-		}elseif(function_exists('wp_pagenavi')){
278
+		} elseif(function_exists('wp_pagenavi')){
276 279
 			wp_pagenavi();
277
-		}else{
280
+		} else{
278 281
 			
279 282
 			$labels = array(
280 283
 				'next' 		=> '<span class="meta-nav">&larr;</span> '.__( 'Older posts', 'lsx' ),
@@ -354,9 +357,9 @@  discard block
 block discarded – undo
354 357
 
355 358
 		if ( function_exists('has_custom_logo') && has_custom_logo() ) {
356 359
 			the_custom_logo();
357
-		}elseif ( function_exists( 'jetpack_has_site_logo' ) && jetpack_has_site_logo() ) {
360
+		} elseif ( function_exists( 'jetpack_has_site_logo' ) && jetpack_has_site_logo() ) {
358 361
 			jetpack_the_site_logo();
359
-		}else{
362
+		} else{
360 363
 			// shouldn't show both together.. its just strange
361 364
 			if(true == get_theme_mod('site_logo_header_text',1)){
362 365
 				lsx_site_title();
@@ -498,7 +501,7 @@  discard block
 block discarded – undo
498 501
 		$post_type_object = get_post_type_object($post_type);
499 502
 		if(null != $post_type_object){
500 503
 			$title = $post_type_object->labels->name;
501
-		}else{
504
+		} else{
502 505
 			$title = ucwords($post_type);
503 506
 		}
504 507
 		
@@ -640,8 +643,9 @@  discard block
 block discarded – undo
640 643
  * @category 	urls
641 644
  */
642 645
 function lsx_get_my_url() {
643
-	if ( ! preg_match( '/<a\s[^>]*?href=[\'"](.+?)[\'"]/is', get_the_content(), $matches ) )
644
-		return false;
646
+	if ( ! preg_match( '/<a\s[^>]*?href=[\'"](.+?)[\'"]/is', get_the_content(), $matches ) ) {
647
+			return false;
648
+	}
645 649
 
646 650
 	return esc_url_raw( $matches[1] );
647 651
 }
@@ -658,14 +662,14 @@  discard block
 block discarded – undo
658 662
 	$part = (string) $part;
659 663
 	if ( '' !== $part ){
660 664
 		$template = "{$slug}-{$part}.php";
661
-	}else{
665
+	} else{
662 666
 		$template = "{$slug}.php";
663 667
 	}
664 668
 	$file_path = apply_filters('lsx_content_path',false,$slug,$part);
665 669
 
666 670
 	if ( false !== $file_path && '' == locate_template( array( $template ) ) && file_exists( $file_path.$template) ) {
667 671
 		load_template( $file_path.$template, false );
668
-	}else{
672
+	} else{
669 673
 		get_template_part($slug,$part);
670 674
 	}
671 675
 }
672 676
\ No newline at end of file
Please login to merge, or discard this patch.
inc/wp_bootstrap_navwalker.php 2 patches
Doc Comments   -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,6 @@
 block discarded – undo
30 30
 	 * @param string $output Passed by reference. Used to append additional content.
31 31
 	 * @param object $item Menu item data object.
32 32
 	 * @param int $depth Depth of menu item. Used for padding.
33
-	 * @param int $current_page Menu item ID.
34 33
 	 * @param object $args
35 34
 	 */
36 35
 	public function start_el( &$output, $item, $depth = 0, $args = array(), $id = 0 ) {
Please login to merge, or discard this 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
     }
@@ -192,29 +200,34 @@  discard block
 block discarded – undo
192 200
 			if ( $container ) {
193 201
 				$fb_output = '<' . $container;
194 202
 
195
-				if ( $container_id )
196
-					$fb_output .= ' id="' . $container_id . '"';
203
+				if ( $container_id ) {
204
+									$fb_output .= ' id="' . $container_id . '"';
205
+				}
197 206
 
198
-				if ( $container_class )
199
-					$fb_output .= ' class="' . $container_class . '"';
207
+				if ( $container_class ) {
208
+									$fb_output .= ' class="' . $container_class . '"';
209
+				}
200 210
 
201 211
 				$fb_output .= '>';
202 212
 			}
203 213
 
204 214
 			$fb_output .= '<ul';
205 215
 
206
-			if ( $menu_id )
207
-				$fb_output .= ' id="' . $menu_id . '"';
216
+			if ( $menu_id ) {
217
+							$fb_output .= ' id="' . $menu_id . '"';
218
+			}
208 219
 
209
-			if ( $menu_class )
210
-				$fb_output .= ' class="' . $menu_class . '"';
220
+			if ( $menu_class ) {
221
+							$fb_output .= ' class="' . $menu_class . '"';
222
+			}
211 223
 
212 224
 			$fb_output .= '>';
213 225
 			$fb_output .= '<li><a href="' . admin_url( 'nav-menus.php' ) . '">'.__('Add a menu','lsx').'</a></li>';
214 226
 			$fb_output .= '</ul>';
215 227
 
216
-			if ( $container )
217
-				$fb_output .= '</' . $container . '>';
228
+			if ( $container ) {
229
+							$fb_output .= '</' . $container . '>';
230
+			}
218 231
 
219 232
 			echo $fb_output;
220 233
 		}
Please login to merge, or discard this patch.
sidebar.php 1 patch
Braces   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
 		
23 23
 		if('posts' == $show_on_front && is_home()){
24 24
 			$sidebar = 'home';
25
-		}else{
25
+		} else{
26 26
 			$sidebar = 'sidebar-1';
27 27
 		}
28 28
 	}
@@ -38,9 +38,12 @@  discard block
 block discarded – undo
38 38
 	
39 39
 		<div id="secondary" class="widget-area <?php echo esc_attr(lsx_sidebar_class()); ?>" role="complementary">
40 40
 		
41
-	<?php else : ?>
41
+	<?php else {
42
+	: ?>
42 43
 	
43
-		<div id="secondary" class="widget-area <?php echo esc_attr(lsx_sidebar_class()); ?>" role="complementary">
44
+		<div id="secondary" class="widget-area <?php echo esc_attr(lsx_sidebar_class());
45
+}
46
+?>" role="complementary">
44 47
 		
45 48
 	<?php endif ; ?>
46 49
 
Please login to merge, or discard this patch.
sidebar-sitemap.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
 	$layout = get_theme_mod('lsx_layout','2cr');
13 13
 	if('posts' == $show_on_front && is_home()){
14 14
 		$sidebar = 'home';
15
-	}else{
15
+	} else{
16 16
 		$sidebar = 'sidebar-1';
17 17
 	}
18 18
 	
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 _e( 'Nothing Found', 'lsx' ); ?></h1>
69
+						<h1 class="page-title"><?php _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 printf( __( 'Ready to publish your first project? <a href="%1$s">Get started here</a>.', 'lsx' ), esc_url( admin_url( 'post-new.php?post_type=jetpack-portfolio' ) ) ); ?></p>
73 78
 
74
-						<?php else : ?>
79
+						<?php else {
80
+	: ?>
75 81
 
76
-							<p><?php _e( 'It seems we can&rsquo;t find what you&rsquo;re looking for. Perhaps searching can help.', 'lsx' ); ?></p>
82
+							<p><?php _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.