Completed
Push — master ( 0e00e1...c8b83c )
by Fernando
06:22
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   +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/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.
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.
author.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.
footer.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
 											if(has_nav_menu('footer-menu')){
26 26
 												wp_nav_menu(array('theme_location' => 'footer-menu'));
27 27
 											}
28
-										}else{
28
+										} else{
29 29
 											if(has_nav_menu('footer_logged_in')){
30 30
 												wp_nav_menu(array('theme_location' => 'footer_logged_in'));
31 31
 											}
Please login to merge, or discard this patch.