Passed
Push — master ( 98a546...e8e8db )
by Brian
05:59
created
ayecode/wp-ayecode-ui/includes/components/class-aui-component-input.php 1 patch
Braces   +15 added lines, -16 removed lines patch added patch discarded remove patch
@@ -80,10 +80,10 @@  discard block
 block discarded – undo
80 80
 			if($type=='file' ){
81 81
 				$label_after = true; // if type file we need the label after
82 82
 				$args['class'] .= ' custom-file-input ';
83
-			}elseif($type=='checkbox'){
83
+			} elseif($type=='checkbox'){
84 84
 				$label_after = true; // if type file we need the label after
85 85
 				$args['class'] .= ' custom-control-input ';
86
-			}elseif($type=='datepicker' || $type=='timepicker'){
86
+			} elseif($type=='datepicker' || $type=='timepicker'){
87 87
 				$type = 'text';
88 88
 				//$args['class'] .= ' aui-flatpickr bg-initial ';
89 89
 				$args['class'] .= ' bg-initial ';
@@ -167,8 +167,7 @@  discard block
 block discarded – undo
167 167
 
168 168
 			// label
169 169
 			if(!empty($args['label'])){
170
-				if($type == 'file'){$label_args['class'] .= 'custom-file-label';}
171
-				elseif($type == 'checkbox'){$label_args['class'] .= 'custom-control-label';}
170
+				if($type == 'file'){$label_args['class'] .= 'custom-file-label';} elseif($type == 'checkbox'){$label_args['class'] .= 'custom-control-label';}
172 171
 				$label = self::label( $label_args, $type );
173 172
 			}
174 173
 
@@ -189,7 +188,7 @@  discard block
 block discarded – undo
189 188
 					'content' => $output,
190 189
 					'class'   => 'form-group custom-file'
191 190
 				) );
192
-			}elseif($type == 'checkbox'){
191
+			} elseif($type == 'checkbox'){
193 192
 				$wrap_class = $args['switch'] ? 'custom-switch' : 'custom-checkbox';
194 193
 				$output = self::wrap( array(
195 194
 					'content' => $output,
@@ -199,7 +198,7 @@  discard block
 block discarded – undo
199 198
 				if($args['label_type']=='horizontal'){
200 199
 					$output = '<div class="col-sm-2 col-form-label"></div><div class="col-sm-10">' . $output . '</div>';
201 200
 				}
202
-			}elseif($type == 'password' && $args['password_toggle'] && !$args['input_group_right']){
201
+			} elseif($type == 'password' && $args['password_toggle'] && !$args['input_group_right']){
203 202
 
204 203
 
205 204
 				// allow password field to toggle view
@@ -325,7 +324,7 @@  discard block
 block discarded – undo
325 324
 
326 325
 		// label
327 326
 		if(!empty($args['label']) && is_array($args['label'])){
328
-		}elseif(!empty($args['label']) && !$label_after){
327
+		} elseif(!empty($args['label']) && !$label_after){
329 328
 			$label_args = array(
330 329
 				'title'=> $args['label'],
331 330
 				'for'=> $args['id'],
@@ -360,7 +359,7 @@  discard block
 block discarded – undo
360 359
 
361 360
 			wp_editor( $content, $editor_id, $settings );
362 361
 			$output .= ob_get_clean();
363
-		}else{
362
+		} else{
364 363
 
365 364
 			// open
366 365
 			$output .= '<textarea ';
@@ -483,7 +482,7 @@  discard block
 block discarded – undo
483 482
 			// maybe hide labels //@todo set a global option for visibility class
484 483
 			if($type == 'file' || $type == 'checkbox' || $type == 'radio' || !empty($args['label_type']) ){
485 484
 				$class = $args['class'];
486
-			}else{
485
+			} else{
487 486
 				$class = 'sr-only '.$args['class'];
488 487
 			}
489 488
 
@@ -594,7 +593,7 @@  discard block
 block discarded – undo
594 593
 			$output .= '</'.sanitize_html_class($args['type']).'>';
595 594
 
596 595
 
597
-		}else{
596
+		} else{
598 597
 			$output = $args['content'];
599 598
 		}
600 599
 
@@ -657,7 +656,7 @@  discard block
 block discarded – undo
657 656
 		if(!empty($args['select2'])){
658 657
 			$args['class'] .= ' aui-select2';
659 658
 			$is_select2 = true;
660
-		}elseif( strpos($args['class'], 'aui-select2') !== false){
659
+		} elseif( strpos($args['class'], 'aui-select2') !== false){
661 660
 			$is_select2 = true;
662 661
 		}
663 662
 
@@ -676,7 +675,7 @@  discard block
 block discarded – undo
676 675
 
677 676
 		// label
678 677
 		if(!empty($args['label']) && is_array($args['label'])){
679
-		}elseif(!empty($args['label']) && !$label_after){
678
+		} elseif(!empty($args['label']) && !$label_after){
680 679
 			$label_args = array(
681 680
 				'title'=> $args['label'],
682 681
 				'for'=> $args['id'],
@@ -751,7 +750,7 @@  discard block
 block discarded – undo
751 750
 		// placeholder
752 751
 		if(isset($args['placeholder']) && '' != $args['placeholder'] && !$is_select2){
753 752
 			$output .= '<option value="" disabled selected hidden>'.esc_attr($args['placeholder']).'</option>';
754
-		}elseif($is_select2 && !empty($args['placeholder'])){
753
+		} elseif($is_select2 && !empty($args['placeholder'])){
755 754
 			$output .= "<option></option>"; // select2 needs an empty select to fill the placeholder
756 755
 		}
757 756
 
@@ -760,7 +759,7 @@  discard block
 block discarded – undo
760 759
 
761 760
 			if(!is_array($args['options'])){
762 761
 				$output .= $args['options']; // not the preferred way but an option
763
-			}else{
762
+			} else{
764 763
 				foreach($args['options'] as $val => $name){
765 764
 					$selected = '';
766 765
 					if(is_array($name)){
@@ -779,7 +778,7 @@  discard block
 block discarded – undo
779 778
 
780 779
 							$output .= '<option value="' . esc_attr($option_value) . '" ' . $selected . '>' . $option_label . '</option>';
781 780
 						}
782
-					}else{
781
+					} else{
783 782
 						if(!empty($args['value'])){
784 783
 							if(is_array($args['value'])){
785 784
 								$selected = in_array($val,$args['value']) ? 'selected="selected"' : '';
@@ -1002,7 +1001,7 @@  discard block
 block discarded – undo
1002 1001
 
1003 1002
 		// label
1004 1003
 		if(!empty($args['label']) && is_array($args['label'])){
1005
-		}elseif(!empty($args['label'])){
1004
+		} elseif(!empty($args['label'])){
1006 1005
 			$output .= self::label(array('title'=>$args['label'],'for'=>$args['id'].$count,'class'=>'form-check-label'),'radio');
1007 1006
 		}
1008 1007
 
Please login to merge, or discard this patch.
includes/wpinv-template-functions.php 1 patch
Braces   +9 added lines, -6 removed lines patch added patch discarded remove patch
@@ -179,8 +179,9 @@  discard block
 block discarded – undo
179 179
 
180 180
 	// Setup possible parts
181 181
 	$templates = array();
182
-	if ( isset( $name ) )
183
-		$templates[] = $slug . '-' . $name . '.php';
182
+	if ( isset( $name ) ) {
183
+			$templates[] = $slug . '-' . $name . '.php';
184
+	}
184 185
 	$templates[] = $slug . '.php';
185 186
 
186 187
 	// Allow template parts to be filtered
@@ -198,8 +199,9 @@  discard block
 block discarded – undo
198 199
 	foreach ( (array)$template_names as $template_name ) {
199 200
 
200 201
 		// Continue if template is empty
201
-		if ( empty( $template_name ) )
202
-			continue;
202
+		if ( empty( $template_name ) ) {
203
+					continue;
204
+		}
203 205
 
204 206
 		// Trim off any slashes from the template name
205 207
 		$template_name = ltrim( $template_name, '/' );
@@ -218,8 +220,9 @@  discard block
 block discarded – undo
218 220
 		}
219 221
 	}
220 222
 
221
-	if ( ( true == $load ) && ! empty( $located ) )
222
-		load_template( $located, $require_once );
223
+	if ( ( true == $load ) && ! empty( $located ) ) {
224
+			load_template( $located, $require_once );
225
+	}
223 226
 
224 227
 	return $located;
225 228
 }
Please login to merge, or discard this patch.
includes/wpinv-tax-functions.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -256,8 +256,9 @@
 block discarded – undo
256 256
 }
257 257
 
258 258
 function wpinv_cart_needs_tax_address_fields() {
259
-    if( !wpinv_is_cart_taxed() )
260
-        return false;
259
+    if( !wpinv_is_cart_taxed() ) {
260
+            return false;
261
+    }
261 262
 
262 263
     return ! did_action( 'wpinv_after_cc_fields', 'wpinv_default_cc_address_fields' );
263 264
 }
Please login to merge, or discard this patch.
templates/emails/wpinv-email-footer.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,7 +1,8 @@
 block discarded – undo
1 1
 <?php
2 2
 // don't load directly
3
-if ( !defined('ABSPATH') )
3
+if ( !defined('ABSPATH') ) {
4 4
     die('-1');
5
+}
5 6
 
6 7
 $email_footer = apply_filters( 'wpinv_email_footer_text', wpinv_get_option( 'email_footer_text', get_bloginfo( 'name', 'display' ) . ' - ' . __( 'Powered by GetPaid', 'invoicing' ) ) );
7 8
 $email_footer = $email_footer ? wpautop( wp_kses_post( wptexturize( $email_footer ) ) ) : '';
Please login to merge, or discard this patch.
vendor/ayecode/wp-super-duper/wp-super-duper.php 1 patch
Braces   +19 added lines, -20 removed lines patch added patch discarded remove patch
@@ -661,7 +661,7 @@  discard block
 block discarded – undo
661 661
 				<?php
662 662
 				if(! empty( $insert_shortcode_function )){
663 663
 					echo $insert_shortcode_function;
664
-				}else{
664
+				} else{
665 665
 
666 666
 				/**
667 667
 				 * Function for super duper insert shortcode.
@@ -1650,7 +1650,7 @@  discard block
 block discarded – undo
1650 1650
 					var prev_attributes = [];
1651 1651
 
1652 1652
 					var term_query_type = '';
1653
-					var post_type_rest_slugs = <?php if(! empty( $this->arguments ) && isset($this->arguments['post_type']['onchange_rest']['values'])){echo "[".json_encode($this->arguments['post_type']['onchange_rest']['values'])."]";}else{echo "[]";} ?>;
1653
+					var post_type_rest_slugs = <?php if(! empty( $this->arguments ) && isset($this->arguments['post_type']['onchange_rest']['values'])){echo "[".json_encode($this->arguments['post_type']['onchange_rest']['values'])."]";} else{echo "[]";} ?>;
1654 1654
 					const taxonomies_<?php echo str_replace("-","_", $this->id);?> = [{label: "Please wait", value: 0}];
1655 1655
 					const sort_by_<?php echo str_replace("-","_", $this->id);?> = [{label: "Please wait", value: 0}];
1656 1656
 
@@ -1787,7 +1787,7 @@  discard block
 block discarded – undo
1787 1787
 
1788 1788
 								// taxonomies
1789 1789
 								if( $value && 'post_type' in prev_attributes[props.id] && 'category' in prev_attributes[props.id] && run ){
1790
-									wp.apiFetch({path: "<?php if(isset($this->arguments['post_type']['onchange_rest']['path'])){echo $this->arguments['post_type']['onchange_rest']['path'];}else{'/wp/v2/"+$value+"/categories';} ?>"}).then(terms => {
1790
+									wp.apiFetch({path: "<?php if(isset($this->arguments['post_type']['onchange_rest']['path'])){echo $this->arguments['post_type']['onchange_rest']['path'];} else{'/wp/v2/"+$value+"/categories';} ?>"}).then(terms => {
1791 1791
 										while (taxonomies_<?php echo str_replace("-","_", $this->id);?>.length) {
1792 1792
 										taxonomies_<?php echo str_replace("-","_", $this->id);?>.pop();
1793 1793
 									}
@@ -1857,7 +1857,7 @@  discard block
 block discarded – undo
1857 1857
 										'attributes': props.attributes,
1858 1858
 										'post_id': <?php global $post; if ( isset( $post->ID ) ) {
1859 1859
 										echo $post->ID;
1860
-									}else{echo '0';}?>,
1860
+									} else{echo '0';}?>,
1861 1861
 										'_ajax_nonce': '<?php echo wp_create_nonce( 'super_duper_output_shortcode' );?>'
1862 1862
 									};
1863 1863
 
@@ -1966,7 +1966,7 @@  discard block
 block discarded – undo
1966 1966
 									$panel_count ++;
1967 1967
 
1968 1968
 									}
1969
-									}else {
1969
+									} else {
1970 1970
 									?>
1971 1971
 									el(wp.components.PanelBody, {
1972 1972
 											title: '<?php esc_attr_e( "Settings" ); ?>',
@@ -1992,7 +1992,7 @@  discard block
 block discarded – undo
1992 1992
 								// If the user sets block-output array then build it
1993 1993
 								if ( ! empty( $this->options['block-output'] ) ) {
1994 1994
 								$this->block_element( $this->options['block-output'] );
1995
-							}else{
1995
+							} else{
1996 1996
 								// if no block-output is set then we try and get the shortcode html output via ajax.
1997 1997
 								?>
1998 1998
 								el('div', {
@@ -2062,7 +2062,7 @@  discard block
 block discarded – undo
2062 2062
 							?>
2063 2063
 							return content;
2064 2064
 							<?php
2065
-							}else{
2065
+							} else{
2066 2066
 							?>
2067 2067
 							var block_wrap = 'div';
2068 2068
 							if (attr.hasOwnProperty("block_wrap")) {
@@ -2133,7 +2133,7 @@  discard block
 block discarded – undo
2133 2133
 
2134 2134
 					<?php
2135 2135
 					if(false){?></script><?php }
2136
-				}elseif(!empty($args['row']['close'])){
2136
+				} elseif(!empty($args['row']['close'])){
2137 2137
 					if(false){?><script><?php }?>
2138 2138
 						el(
2139 2139
 							'div',
@@ -2142,7 +2142,7 @@  discard block
 block discarded – undo
2142 2142
 							},
2143 2143
 					<?php
2144 2144
 					if(false){?></script><?php }
2145
-				}else{
2145
+				} else{
2146 2146
 					if(false){?><script><?php }?>
2147 2147
 						el(
2148 2148
 							'div',
@@ -2259,8 +2259,7 @@  discard block
 block discarded – undo
2259 2259
                             $key: value
2260 2260
                         });
2261 2261
                     },";
2262
-			}
2263
-			elseif ( $args['type'] == 'checkbox' ) {
2262
+			} elseif ( $args['type'] == 'checkbox' ) {
2264 2263
 				$type = 'CheckboxControl';
2265 2264
 				$extra .= "checked: props.attributes.$key,";
2266 2265
 				$onchange = "props.setAttributes({ $key: ! props.attributes.$key } )";
@@ -2271,9 +2270,9 @@  discard block
 block discarded – undo
2271 2270
 
2272 2271
 				if($args['name'] == 'category' && !empty($args['post_type_linked'])){
2273 2272
 					$options .= "options: taxonomies_".str_replace("-","_", $this->id).",";
2274
-				}elseif($args['name'] == 'sort_by' && !empty($args['post_type_linked'])){
2273
+				} elseif($args['name'] == 'sort_by' && !empty($args['post_type_linked'])){
2275 2274
 					$options .= "options: sort_by_".str_replace("-","_", $this->id).",";
2276
-				}else {
2275
+				} else {
2277 2276
 
2278 2277
 					if ( ! empty( $args['options'] ) ) {
2279 2278
 						$options .= "options: [";
@@ -2288,7 +2287,7 @@  discard block
 block discarded – undo
2288 2287
 				}
2289 2288
 			} elseif ( $args['type'] == 'alignment' ) {
2290 2289
 				$type = 'AlignmentToolbar'; // @todo this does not seem to work but cant find a example
2291
-			}elseif ( $args['type'] == 'margins' ) {
2290
+			} elseif ( $args['type'] == 'margins' ) {
2292 2291
 
2293 2292
 			} else {
2294 2293
 				return;// if we have not implemented the control then don't break the JS.
@@ -2701,7 +2700,7 @@  discard block
 block discarded – undo
2701 2700
 
2702 2701
 				if(empty($instance['widget_title_tag'])){
2703 2702
 					$output = $args['before_title'] . $title . $args['after_title'];
2704
-				}else{
2703
+				} else{
2705 2704
 					$title_tag = esc_attr( $instance['widget_title_tag'] );
2706 2705
 
2707 2706
 					// classes
@@ -2806,9 +2805,9 @@  discard block
 block discarded – undo
2806 2805
 					<div class='row <?php if(!empty($args['row']['class'])){ echo esc_attr($args['row']['class']);} ?>'>
2807 2806
 					<div class='col pr-2'>
2808 2807
 					<?php
2809
-				}elseif(!empty($args['row']['close'])){
2808
+				} elseif(!empty($args['row']['close'])){
2810 2809
 					echo "<div class='col pl-0'>";
2811
-				}else{
2810
+				} else{
2812 2811
 					echo "<div class='col pl-0 pr-2'>";
2813 2812
 				}
2814 2813
 			}
@@ -3026,11 +3025,11 @@  discard block
 block discarded – undo
3026 3025
 		public function get_widget_icon($icon = 'box-top', $title = ''){
3027 3026
 			if($icon=='box-top'){
3028 3027
 				return '<svg title="'.esc_attr($title).'" width="20px" height="20px" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414" role="img" aria-hidden="true" focusable="false"><rect x="2.714" y="5.492" width="1.048" height="9.017" fill="#555D66"></rect><rect x="16.265" y="5.498" width="1.023" height="9.003" fill="#555D66"></rect><rect x="5.518" y="2.186" width="8.964" height="2.482" fill="#272B2F"></rect><rect x="5.487" y="16.261" width="9.026" height="1.037" fill="#555D66"></rect></svg>';
3029
-			}elseif($icon=='box-right'){
3028
+			} elseif($icon=='box-right'){
3030 3029
 				return '<svg title="'.esc_attr($title).'" width="20px" height="20px" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414" role="img" aria-hidden="true" focusable="false"><rect x="2.714" y="5.492" width="1.046" height="9.017" fill="#555D66"></rect><rect x="15.244" y="5.498" width="2.518" height="9.003" fill="#272B2F"></rect><rect x="5.518" y="2.719" width="8.964" height="0.954" fill="#555D66"></rect><rect x="5.487" y="16.308" width="9.026" height="0.99" fill="#555D66"></rect></svg>';
3031
-			}elseif($icon=='box-bottom'){
3030
+			} elseif($icon=='box-bottom'){
3032 3031
 				return '<svg title="'.esc_attr($title).'" width="20px" height="20px" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414" role="img" aria-hidden="true" focusable="false"><rect x="2.714" y="5.492" width="1" height="9.017" fill="#555D66"></rect><rect x="16.261" y="5.498" width="1.027" height="9.003" fill="#555D66"></rect><rect x="5.518" y="2.719" width="8.964" height="0.968" fill="#555D66"></rect><rect x="5.487" y="15.28" width="9.026" height="2.499" fill="#272B2F"></rect></svg>';
3033
-			}elseif($icon=='box-left'){
3032
+			} elseif($icon=='box-left'){
3034 3033
 				return '<svg title="'.esc_attr($title).'" width="20px" height="20px" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414" role="img" aria-hidden="true" focusable="false"><rect x="2.202" y="5.492" width="2.503" height="9.017" fill="#272B2F"></rect><rect x="16.276" y="5.498" width="1.012" height="9.003" fill="#555D66"></rect><rect x="5.518" y="2.719" width="8.964" height="0.966" fill="#555D66"></rect><rect x="5.487" y="16.303" width="9.026" height="0.995" fill="#555D66"></rect></svg>';
3035 3034
 			}
3036 3035
 		}
Please login to merge, or discard this patch.
templates/invoice/invoice-logo.php 1 patch
Braces   +10 added lines, -4 removed lines patch added patch discarded remove patch
@@ -19,12 +19,18 @@
 block discarded – undo
19 19
 
20 20
         <?php if ( ! empty( $logo_width ) && ! empty( $logo_height ) ) : ?>
21 21
             <img class="logo" style="max-width:100%; width:<?php echo absint( $logo_width ); ?>px; height:<?php echo absint( $logo_height ); ?>px;" src="<?php echo esc_url( $logo ); ?>">
22
-        <?php else: ?>
23
-            <img class="logo" style="max-width:100%;" src="<?php echo esc_url( $logo ); ?>">
22
+        <?php else {
23
+    : ?>
24
+            <img class="logo" style="max-width:100%;" src="<?php echo esc_url( $logo );
25
+}
26
+?>">
24 27
         <?php endif; ?>
25 28
 
26
-    <?php else: ?>
27
-        <h1 class="h3"><?php echo esc_html( wpinv_get_business_name() ); ?></h1>
29
+    <?php else {
30
+    : ?>
31
+        <h1 class="h3"><?php echo esc_html( wpinv_get_business_name() );
32
+}
33
+?></h1>
28 34
     <?php endif; ?>
29 35
 
30 36
 </a>
Please login to merge, or discard this patch.
vendor/ayecode/wp-ayecode-ui/includes/ayecode-ui-settings.php 1 patch
Braces   +14 added lines, -6 removed lines patch added patch discarded remove patch
@@ -126,8 +126,12 @@  discard block
 block discarded – undo
126 126
 		public function constants(){
127 127
 			define('AUI_PRIMARY_COLOR_ORIGINAL', "#1e73be");
128 128
 			define('AUI_SECONDARY_COLOR_ORIGINAL', '#6c757d');
129
-			if (!defined('AUI_PRIMARY_COLOR')) define('AUI_PRIMARY_COLOR', AUI_PRIMARY_COLOR_ORIGINAL);
130
-			if (!defined('AUI_SECONDARY_COLOR')) define('AUI_SECONDARY_COLOR', AUI_SECONDARY_COLOR_ORIGINAL);
129
+			if (!defined('AUI_PRIMARY_COLOR')) {
130
+			    define('AUI_PRIMARY_COLOR', AUI_PRIMARY_COLOR_ORIGINAL);
131
+			}
132
+			if (!defined('AUI_SECONDARY_COLOR')) {
133
+			    define('AUI_SECONDARY_COLOR', AUI_SECONDARY_COLOR_ORIGINAL);
134
+			}
131 135
 		}
132 136
 
133 137
 		/**
@@ -233,7 +237,7 @@  discard block
 block discarded – undo
233 237
 
234 238
 			if( is_admin() && !$this->is_aui_screen()){
235 239
 				// don't add wp-admin scripts if not requested to
236
-			}else{
240
+			} else{
237 241
 				$css_setting = current_action() == 'wp_enqueue_scripts' ? 'css' : 'css_backend';
238 242
 
239 243
 				$rtl = is_rtl() ? '-rtl' : '';
@@ -1051,7 +1055,7 @@  discard block
 block discarded – undo
1051 1055
 
1052 1056
 			if( is_admin() && !$this->is_aui_screen()){
1053 1057
 				// don't add wp-admin scripts if not requested to
1054
-			}else {
1058
+			} else {
1055 1059
 
1056 1060
 				$js_setting = current_action() == 'wp_enqueue_scripts' ? 'js' : 'js_backend';
1057 1061
 
@@ -2093,7 +2097,9 @@  discard block
 block discarded – undo
2093 2097
 		 * @return mixed
2094 2098
 		 */
2095 2099
 		public static function minify_js($input) {
2096
-			if(trim($input) === "") return $input;
2100
+			if(trim($input) === "") {
2101
+			    return $input;
2102
+			}
2097 2103
 			return preg_replace(
2098 2104
 				array(
2099 2105
 					// Remove comment(s)
@@ -2125,7 +2131,9 @@  discard block
 block discarded – undo
2125 2131
 		 * @return mixed
2126 2132
 		 */
2127 2133
 		public static function minify_css($input) {
2128
-			if(trim($input) === "") return $input;
2134
+			if(trim($input) === "") {
2135
+			    return $input;
2136
+			}
2129 2137
 			return preg_replace(
2130 2138
 				array(
2131 2139
 					// Remove comment(s)
Please login to merge, or discard this patch.
includes/class-wpinv-addons.php 1 patch
Braces   +11 added lines, -12 removed lines patch added patch discarded remove patch
@@ -45,8 +45,7 @@  discard block
 block discarded – undo
45 45
 
46 46
 		if($section_id=='recommended_plugins'){
47 47
 			$section_data->products = self::get_recommend_wp_plugins_edd_formatted();
48
-		}
49
-		elseif ( ! empty( $section ) ) {
48
+		} elseif ( ! empty( $section ) ) {
50 49
 			if ( false === ( $section_data = get_transient( 'wpi_addons_section_' . $section_id ) ) ) { //@todo restore after testing
51 50
 			//if ( 1==1) {
52 51
 
@@ -119,14 +118,14 @@  discard block
 block discarded – undo
119 118
 			$status = install_plugin_install_status(array("slug"=>$button_args['slug'],"version"=>""));
120 119
 			$button_args['install_status'] = isset($status['status']) ? $status['status'] : 'install';
121 120
 			$button_args['file'] = isset($status['file']) ? $status['file'] : '';
122
-		}elseif( ($current_tab == 'addons' || $current_tab =='gateways') && isset($addon->info->id) && $addon->info->id){
121
+		} elseif( ($current_tab == 'addons' || $current_tab =='gateways') && isset($addon->info->id) && $addon->info->id){
123 122
 			include_once( ABSPATH . 'wp-admin/includes/plugin-install.php' ); //for plugins_api..
124 123
 			if(!empty($addon->licensing->edd_slug)){$button_args['slug'] = $addon->licensing->edd_slug;}
125 124
 			$status = self::install_plugin_install_status($addon);
126 125
 			$button_args['file'] = isset($status['file']) ? $status['file'] : '';
127 126
 			if(isset($status['status'])){$button_args['install_status'] = $status['status'];}
128 127
 			$button_args['update_url'] = "https://wpinvoicing.com";
129
-		}elseif($current_tab == 'themes' && isset($addon->info->id) && $addon->info->id) {
128
+		} elseif($current_tab == 'themes' && isset($addon->info->id) && $addon->info->id) {
130 129
 			if(!empty($addon->licensing->edd_slug)){$button_args['slug'] = $addon->licensing->edd_slug;}
131 130
 			$button_args['installed'] = self::is_theme_installed($addon);
132 131
 			if(!in_array($button_args['slug'],$wp_org_themes)){
@@ -139,7 +138,7 @@  discard block
 block discarded – undo
139 138
 			if(is_object($addon->pricing)){
140 139
 				$prices = (Array)$addon->pricing;
141 140
 				$button_args['price'] = reset($prices);
142
-			}elseif(isset($addon->pricing)){
141
+			} elseif(isset($addon->pricing)){
143 142
 				$button_args['price'] = $addon->pricing;
144 143
 			}
145 144
 		}
@@ -160,7 +159,7 @@  discard block
 block discarded – undo
160 159
 		if($button_args['installed'] && ($button_args['file'] || $button_args['type'] == 'themes')){
161 160
 			if($button_args['type'] != 'themes'){
162 161
 				$button_args['active'] = is_plugin_active($button_args['file']);
163
-			}else{
162
+			} else{
164 163
 				$button_args['active'] = self::is_theme_active($addon);
165 164
 			}
166 165
 		}
@@ -169,27 +168,27 @@  discard block
 block discarded – undo
169 168
 		if($button_args['active']){
170 169
 			$button_args['button_text'] = __('Active','invoicing');
171 170
 			$button_args['class'] = ' button-secondary disabled ';
172
-		}elseif($button_args['installed']){
171
+		} elseif($button_args['installed']){
173 172
 			$button_args['button_text'] = __('Activate','invoicing');
174 173
 
175 174
 			if($button_args['type'] != 'themes'){
176 175
 				if ( current_user_can( 'manage_options' ) ) {
177 176
 					$button_args['url'] = wp_nonce_url(admin_url('plugins.php?action=activate&plugin='.$button_args['file']), 'activate-plugin_' . $button_args['file']);
178
-				}else{
177
+				} else{
179 178
 					$button_args['url'] = '#';
180 179
 				}
181
-			}else{
180
+			} else{
182 181
 				if ( current_user_can( 'switch_themes' ) ) {
183 182
 					$button_args['url'] = self::get_theme_activation_url($addon);
184
-				}else{
183
+				} else{
185 184
 					$button_args['url'] = '#';
186 185
 				}
187 186
 			}
188 187
 
189
-		}else{
188
+		} else{
190 189
 			if($button_args['type'] == 'recommended_plugins'){
191 190
 				$button_args['button_text'] = __('Install','invoicing');
192
-			}else{
191
+			} else{
193 192
 				$button_args['button_text'] = __('Get it','invoicing');
194 193
 
195 194
 				/*if($button_args['type'] == 'themes' && in_array($button_args['slug'],$wp_org_themes) ){
Please login to merge, or discard this patch.