Passed
Push — master ( 530be4...68d888 )
by Stiofan
03:40 queued 12s
created
includes/admin/html-admin-page-addons.php 1 patch
Indentation   +51 added lines, -51 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@  discard block
 block discarded – undo
4 4
  *
5 5
  */
6 6
 if ( ! defined( 'ABSPATH' ) ) {
7
-	exit;
7
+    exit;
8 8
 }
9 9
 add_ThickBox();
10 10
 ?>
@@ -14,18 +14,18 @@  discard block
 block discarded – undo
14 14
 	<?php if ( $tabs ){ ?>
15 15
 		<nav class="nav-tab-wrapper wpi-nav-tab-wrapper">
16 16
 			<?php
17
-			foreach ( $tabs as $name => $label ) {
18
-				echo '<a href="' . admin_url( 'admin.php?page=wpi-addons&tab=' . $name ) . '" class="nav-tab ' . ( $current_tab == $name ? 'nav-tab-active' : '' ) . '">' . $label . '</a>';
19
-			}
20
-			do_action( 'wpi_addons_tabs' );
21
-			?>
17
+            foreach ( $tabs as $name => $label ) {
18
+                echo '<a href="' . admin_url( 'admin.php?page=wpi-addons&tab=' . $name ) . '" class="nav-tab ' . ( $current_tab == $name ? 'nav-tab-active' : '' ) . '">' . $label . '</a>';
19
+            }
20
+            do_action( 'wpi_addons_tabs' );
21
+            ?>
22 22
 		</nav>
23 23
 
24 24
 		<?php
25 25
 
26
-		if($current_tab == 'membership'){
26
+        if($current_tab == 'membership'){
27 27
 
28
-			?>
28
+            ?>
29 29
 
30 30
 			<div class="wpi-membership-tab-conatiner">
31 31
 				<div class="membership-content">
@@ -36,9 +36,9 @@  discard block
 block discarded – undo
36 36
 					<h2>Have a membership key?</h2>
37 37
 					<p>
38 38
 						<?php
39
-						$wpeu_admin = new External_Updates_Admin('wpinvoicing.com','1');
40
-						echo $wpeu_admin->render_licence_actions('wpinvoicing.com', 'membership',array(95, 106, 108));
41
-						?>
39
+                        $wpeu_admin = new External_Updates_Admin('wpinvoicing.com','1');
40
+                        echo $wpeu_admin->render_licence_actions('wpinvoicing.com', 'membership',array(95, 106, 108));
41
+                        ?>
42 42
 					</p>
43 43
 				<?php }?>
44 44
 
@@ -89,8 +89,8 @@  discard block
 block discarded – undo
89 89
 						<div class="testimonial-content">
90 90
 							<div class="t-image">
91 91
 								<?php
92
-									echo '<img src="' . plugins_url( 'images/t-image2.png', dirname(__FILE__) ) . '" > ';
93
-								?>
92
+                                    echo '<img src="' . plugins_url( 'images/t-image2.png', dirname(__FILE__) ) . '" > ';
93
+                                ?>
94 94
 							</div>
95 95
 							<div class="t-content">
96 96
 								<p>
@@ -109,8 +109,8 @@  discard block
 block discarded – undo
109 109
 						<div class="testimonial-content">
110 110
 							<div class="t-image">
111 111
 								<?php
112
-									echo '<img src="' . plugins_url( 'images/t-image1.png', dirname(__FILE__) ) . '" > ';
113
-								?>
112
+                                    echo '<img src="' . plugins_url( 'images/t-image1.png', dirname(__FILE__) ) . '" > ';
113
+                                ?>
114 114
 							</div>
115 115
 							<div class="t-content">
116 116
 								<p>
@@ -134,20 +134,20 @@  discard block
 block discarded – undo
134 134
 			</div>
135 135
 		</div>
136 136
 			<?php
137
-		}else{
138
-			$installed_plugins = get_plugins();
137
+        }else{
138
+            $installed_plugins = get_plugins();
139 139
             $addon_obj = new WPInv_Admin_Addons();
140
-			if ($addons = $addon_obj->get_section_data( $current_tab ) ) :
141
-				?>
140
+            if ($addons = $addon_obj->get_section_data( $current_tab ) ) :
141
+                ?>
142 142
 				<ul class="wpi-products"><?php foreach ( $addons as $addon ) :
143 143
                         if(965==$addon->info->id){continue;}// don't show quote add on
144
-						?><li class="wpi-product">
144
+                        ?><li class="wpi-product">
145 145
 								<div class="wpi-product-title">
146 146
 									<h3><?php
147
-										if ( ! empty( $addon->info->excerpt) ){
148
-											echo wpi_help_tip( $addon->info->excerpt );
149
-										}
150
-										echo esc_html( $addon->info->title ); ?></h3>
147
+                                        if ( ! empty( $addon->info->excerpt) ){
148
+                                            echo wpi_help_tip( $addon->info->excerpt );
149
+                                        }
150
+                                        echo esc_html( $addon->info->title ); ?></h3>
151 151
 								</div>
152 152
 
153 153
 								<span class="wpi-product-image">
@@ -155,27 +155,27 @@  discard block
 block discarded – undo
155 155
 										<img src="<?php echo esc_attr( $addon->info->thumbnail ); ?>"/>
156 156
 									<?php endif;
157 157
 
158
-									if(isset($addon->info->link) && substr( $addon->info->link, 0, 21 ) === "https://wordpress.org"){
159
-										echo '<a href="'.admin_url('/plugin-install.php?tab=plugin-information&plugin='.$addon->info->slug).'&TB_iframe=true&width=770&height=660" class="thickbox" >';
160
-										echo '<span class="wpi-product-info">'.__('More info','invoicing').'</span>';
161
-										echo '</a>';
162
-									}elseif(isset($addon->info->link) && substr( $addon->info->link, 0, 23 ) === "https://wpinvoicing.com"){
163
-										if(defined('WP_EASY_UPDATES_ACTIVE')){
164
-											$url = admin_url('/plugin-install.php?tab=plugin-information&plugin='.$addon->info->slug.'&TB_iframe=true&width=770&height=660&item_id='.$addon->info->id.'&update_url=https://wpinvoicing.com');
165
-										}else{
166
-											// if installed show activation link
167
-											if(isset($installed_plugins['wp-easy-updates/external-updates.php'])){
168
-												$url = '#TB_inline?width=600&height=50&inlineId=wpi-wpeu-required-activation';
169
-											}else{
170
-												$url = '#TB_inline?width=600&height=50&inlineId=wpi-wpeu-required-for-external';
171
-											}
172
-										}
173
-										echo '<a href="'.$url.'" class="thickbox">';
174
-										echo '<span class="wpi-product-info">'.__('More info','invoicing').'</span>';
175
-										echo '</a>';
176
-									}
177
-
178
-									?>
158
+                                    if(isset($addon->info->link) && substr( $addon->info->link, 0, 21 ) === "https://wordpress.org"){
159
+                                        echo '<a href="'.admin_url('/plugin-install.php?tab=plugin-information&plugin='.$addon->info->slug).'&TB_iframe=true&width=770&height=660" class="thickbox" >';
160
+                                        echo '<span class="wpi-product-info">'.__('More info','invoicing').'</span>';
161
+                                        echo '</a>';
162
+                                    }elseif(isset($addon->info->link) && substr( $addon->info->link, 0, 23 ) === "https://wpinvoicing.com"){
163
+                                        if(defined('WP_EASY_UPDATES_ACTIVE')){
164
+                                            $url = admin_url('/plugin-install.php?tab=plugin-information&plugin='.$addon->info->slug.'&TB_iframe=true&width=770&height=660&item_id='.$addon->info->id.'&update_url=https://wpinvoicing.com');
165
+                                        }else{
166
+                                            // if installed show activation link
167
+                                            if(isset($installed_plugins['wp-easy-updates/external-updates.php'])){
168
+                                                $url = '#TB_inline?width=600&height=50&inlineId=wpi-wpeu-required-activation';
169
+                                            }else{
170
+                                                $url = '#TB_inline?width=600&height=50&inlineId=wpi-wpeu-required-for-external';
171
+                                            }
172
+                                        }
173
+                                        echo '<a href="'.$url.'" class="thickbox">';
174
+                                        echo '<span class="wpi-product-info">'.__('More info','invoicing').'</span>';
175
+                                        echo '</a>';
176
+                                    }
177
+
178
+                                    ?>
179 179
 
180 180
 								</span>
181 181
 
@@ -183,15 +183,15 @@  discard block
 block discarded – undo
183 183
 								<span class="wpi-product-button">
184 184
 									<?php
185 185
                                     $addon_obj->output_button( $addon );
186
-									?>
186
+                                    ?>
187 187
 								</span>
188 188
 
189 189
 								<span class="wpi-price"><?php //print_r($addon); //echo wp_kses_post( $addon->price ); ?></span></li><?php endforeach; ?></ul>
190 190
 			<?php endif;
191
-		}
191
+        }
192 192
 
193
-	}
194
-	?>
193
+    }
194
+    ?>
195 195
 
196 196
 
197 197
 	<div class="clearfix" ></div>
@@ -210,8 +210,8 @@  discard block
 block discarded – undo
210 210
 			<input class="wpeu-licence-key" type="text" placeholder="<?php _e("Enter your licence key",'invoicing');?>"> <button class="button-primary wpeu-licence-popup-button" ><?php _e("Install",'invoicing');?></button>
211 211
 			<br>
212 212
 			<?php
213
-			echo sprintf( __('%sFind your licence key here%s OR %sBuy one here%s', 'invoicing'), '<a href="https://wpinvoicing.com/your-account/" target="_blank">','</a>','<a class="wpeu-licence-link" href="https://wpinvoicing.com/downloads/category/addons/" target="_blank">','</a>' );
214
-			?>
213
+            echo sprintf( __('%sFind your licence key here%s OR %sBuy one here%s', 'invoicing'), '<a href="https://wpinvoicing.com/your-account/" target="_blank">','</a>','<a class="wpeu-licence-link" href="https://wpinvoicing.com/downloads/category/addons/" target="_blank">','</a>' );
214
+            ?>
215 215
 		</span>
216 216
 	</div>
217 217
 
Please login to merge, or discard this patch.