Completed
Push — master ( 55f18a...0fb8d7 )
by Fernando
05:05 queued 02:16
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.
Indentation   +32 added lines, -32 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
 	
15 15
   // Add post/page slug
16 16
   if (is_single() || is_page() && !is_front_page()) {
17
-    $classes[] = basename(get_permalink());
17
+	$classes[] = basename(get_permalink());
18 18
   }
19 19
   
20 20
   if(!class_exists('Lsx_Banners')){
@@ -38,8 +38,8 @@  discard block
 block discarded – undo
38 38
   // Remove unnecessary classes
39 39
   $home_id_class = 'page-id-' . get_option('page_on_front');
40 40
   $remove_classes = array(
41
-    'page-template-default',
42
-    $home_id_class
41
+	'page-template-default',
42
+	$home_id_class
43 43
   );
44 44
   $classes = array_diff($classes, $remove_classes);
45 45
 
@@ -271,12 +271,12 @@  discard block
 block discarded – undo
271 271
 		 || (is_singular('jetpack-portfolio')) ) { ?>
272 272
 	        
273 273
 	        <?php 
274
-	        	$bg_image = '';
275
-	        	if(has_post_thumbnail()){
276
-	        		$bg_image = wp_get_attachment_image_src(get_post_thumbnail_id(get_the_ID()),'full');
277
-	        		$bg_image = $bg_image[0];
278
-	        	}
279
-	        ?>
274
+				$bg_image = '';
275
+				if(has_post_thumbnail()){
276
+					$bg_image = wp_get_attachment_image_src(get_post_thumbnail_id(get_the_ID()),'full');
277
+					$bg_image = $bg_image[0];
278
+				}
279
+			?>
280 280
 
281 281
 	   		<?php if ( ! empty( $bg_image ) ) : ?>
282 282
 	        
@@ -309,8 +309,8 @@  discard block
 block discarded – undo
309 309
  * @category mobile
310 310
  */
311 311
 function lsx_allow_sms_protocol( $protocols ) {
312
-    $protocols[] = 'sms';
313
-    return $protocols;
312
+	$protocols[] = 'sms';
313
+	return $protocols;
314 314
 }
315 315
 add_filter( 'kses_allowed_protocols', 'lsx_allow_sms_protocol' );
316 316
 
@@ -322,27 +322,27 @@  discard block
 block discarded – undo
322 322
 		$http_user_agent = sanitize_text_field( wp_unslash( $_SERVER['HTTP_USER_AGENT'] ) );
323 323
 		$http_user_agent = ! empty( $http_user_agent ) ? $http_user_agent : '';
324 324
 
325
-        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) {
333
-                $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';
338
-        if ( stristr( $http_user_agent, "mac") ) {
339
-                 $classes[] = 'osx';
340
-           } elseif ( stristr( $http_user_agent, "linux") ) {
341
-                 $classes[] = 'linux';
342
-           } elseif ( stristr( $http_user_agent, "windows") ) {
343
-                 $classes[] = 'windows';
344
-           }
345
-        return $classes;
325
+		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) {
333
+				$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';
338
+		if ( stristr( $http_user_agent, "mac") ) {
339
+				 $classes[] = 'osx';
340
+		   } elseif ( stristr( $http_user_agent, "linux") ) {
341
+				 $classes[] = 'linux';
342
+		   } elseif ( stristr( $http_user_agent, "windows") ) {
343
+				 $classes[] = 'windows';
344
+		   }
345
+		return $classes;
346 346
 }
347 347
 add_filter('body_class','mv_browser_body_class');
348 348
 
Please login to merge, or discard this patch.
inc/layout.php 1 patch
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.
inc/lazyload.php 1 patch
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.
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.
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
  */
12 12
 function lsx_breadcrumbs() {
13 13
   if (!function_exists('yoast_breadcrumb') && !function_exists('woocommerce_breadcrumb')) {
14
-    return null;
14
+	return null;
15 15
   }
16 16
   
17 17
   $show_on_front = get_option('show_on_front');
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
 	 * Displays logo when applicable
69 69
 	 *
70 70
 	 * @return void
71
-	*/
71
+	 */
72 72
 	function lsx_site_title() {
73 73
 		?>
74 74
 			<div class="site-branding">
@@ -418,7 +418,7 @@  discard block
 block discarded – undo
418 418
 		
419 419
 		//print_r(get_nav_menu_locations());
420 420
 
421
-	    if(false != $nav_menu && isset($nav_menu['primary']) && 0 != $nav_menu['primary']){ ?>
421
+		if(false != $nav_menu && isset($nav_menu['primary']) && 0 != $nav_menu['primary']){ ?>
422 422
 			<nav class="primary-navbar collapse navbar-collapse">
423 423
 		    	<?php
424 424
 				wp_nav_menu( array(
@@ -546,9 +546,9 @@  discard block
 block discarded – undo
546 546
 				if(null != $tag_cloud){
547 547
 					printf( '<h2>'.__( '%1$s', 'lsx' ).'</h2>', $taxonomy );
548 548
 					echo '<aside id="'.$taxonomy_id.'" class="widget widget_'.$taxonomy_id.'">'.$tag_cloud.'</aside>';
549
-		        }
550
-	        }
551
-        } 
549
+				}
550
+			}
551
+		} 
552 552
 }
553 553
 
554 554
 /**
@@ -597,11 +597,11 @@  discard block
 block discarded – undo
597 597
 			<div class="container">
598 598
 				<nav class="top-menu">
599 599
 		    		<?php
600
-		    			wp_nav_menu( array(
600
+						wp_nav_menu( array(
601 601
 							'theme_location' => 'top-menu',
602 602
 							'walker' => new lsx_bootstrap_navwalker())
603 603
 						);
604
-		    		?>
604
+					?>
605 605
 		    	</nav>	
606 606
 	    	</div>
607 607
 	    </div>
Please login to merge, or discard this patch.
header.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -60,12 +60,12 @@
 block discarded – undo
60 60
 			    	<strong><?php _e( 'Get your Tourism Establishment Online', 'lsx' ); ?></strong>
61 61
 			    	
62 62
 			    	<?php 
63
-			    	if(is_singular('landing-page')){ 
64
-			    			$email_address = get_post_meta(get_the_ID(),'email_address',true);
65
-			    			if(false === $email_address){
63
+					if(is_singular('landing-page')){ 
64
+							$email_address = get_post_meta(get_the_ID(),'email_address',true);
65
+							if(false === $email_address){
66 66
 								$email_address = '[email protected]';
67 67
 							}
68
-			    	} ?>
68
+					} ?>
69 69
 			    	
70 70
 			    	<span class="email-address"><?php _e( 'Questions? Email Us: ', 'lsx' ); ?><a href="mailto:<?php echo $email_address; ?>"><?php echo $email_address; ?></a></span>
71 71
 			    </div>
Please login to merge, or discard this patch.
inc/jetpack.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -123,11 +123,11 @@  discard block
 block discarded – undo
123 123
  * @category portfolio
124 124
  */
125 125
 function lsx_remove_single_related_posts() {
126
-    if ( is_single() && class_exists( 'Jetpack_RelatedPosts' ) ) {
127
-        $jprp = Jetpack_RelatedPosts::init();
128
-        $callback = array( $jprp, 'filter_add_target_to_dom' );
129
-        remove_filter( 'the_content', $callback, 40 );
130
-    }
126
+	if ( is_single() && class_exists( 'Jetpack_RelatedPosts' ) ) {
127
+		$jprp = Jetpack_RelatedPosts::init();
128
+		$callback = array( $jprp, 'filter_add_target_to_dom' );
129
+		remove_filter( 'the_content', $callback, 40 );
130
+	}
131 131
 }
132 132
 add_filter( 'wp', 'lsx_remove_single_related_posts', 20 );
133 133
 
@@ -311,7 +311,7 @@  discard block
 block discarded – undo
311 311
 		if(is_array($types)){
312 312
 			foreach ($types as $type) {
313 313
 				$content = '<li><a href="#" data-filter=".'.$type->slug.'">';
314
-		    	$content .= $type->name;					
314
+				$content .= $type->name;					
315 315
 				$content .= '</a></li>';
316 316
 				echo $content;
317 317
 				echo "\n";
Please login to merge, or discard this patch.
inc/sensei.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
  * @category styles
126 126
  */
127 127
 function lsx_sensei_styles() {
128
-    wp_enqueue_style( 'sensei', get_template_directory_uri() . '/css/sensei.css' );
128
+	wp_enqueue_style( 'sensei', get_template_directory_uri() . '/css/sensei.css' );
129 129
 }
130 130
 add_action( 'wp_enqueue_scripts', 'lsx_sensei_styles' );
131 131
 
@@ -136,10 +136,10 @@  discard block
 block discarded – undo
136 136
  * @category 	styles
137 137
  */
138 138
 function lsx_sensei_redirect_to_home( $query ){
139
-    if(!is_admin() && is_post_type_archive( 'lesson' ) ) {
140
-         wp_redirect( home_url() . '/courses-overview' );
141
-         exit;
142
-     }
139
+	if(!is_admin() && is_post_type_archive( 'lesson' ) ) {
140
+		 wp_redirect( home_url() . '/courses-overview' );
141
+		 exit;
142
+	 }
143 143
 }
144 144
 add_action( 'parse_query', 'lsx_sensei_redirect_to_home' );
145 145
 
Please login to merge, or discard this patch.
inc/google-font.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
12 12
 
13 13
 	/**
14 14
 	 * Constructor
15
-	**/
15
+	 **/
16 16
 	public function __construct($title, $location, $cssDeclaration, $cssClass)
17 17
 	{
18 18
 		$this->title = $title;
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
 	/**
25 25
 	 * Getters
26 26
 	 * taken from: http://stackoverflow.com/questions/4478661/getter-and-setter
27
-	**/
27
+	 **/
28 28
 	public function __get($property) 
29 29
 	{
30 30
 		if (property_exists($this, $property)) {
Please login to merge, or discard this patch.