Passed
Push — master ( 530be4...68d888 )
by Stiofan
03:40 queued 12s
created
includes/admin/html-admin-page-addons.php 1 patch
Spacing   +41 added lines, -41 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@  discard block
 block discarded – undo
3 3
  * Admin View: Page - Addons
4 4
  *
5 5
  */
6
-if ( ! defined( 'ABSPATH' ) ) {
6
+if (!defined('ABSPATH')) {
7 7
 	exit;
8 8
 }
9 9
 add_ThickBox();
@@ -11,19 +11,19 @@  discard block
 block discarded – undo
11 11
 <div class="wrap wpi_addons_wrap">
12 12
 	<h1><?php echo get_admin_page_title(); ?></h1>
13 13
 
14
-	<?php if ( $tabs ){ ?>
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>';
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 19
 			}
20
-			do_action( 'wpi_addons_tabs' );
20
+			do_action('wpi_addons_tabs');
21 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
 
@@ -32,12 +32,12 @@  discard block
 block discarded – undo
32 32
 <!--
33 33
 				<h2>With our WPInvoicing Membership you get access to all our products!</h2>
34 34
 				<p><a class="button button-primary" href="https://wpinvoicing.com/downloads/membership/">View Memberships</a></p>-->
35
-				<?php if(defined('WP_EASY_UPDATES_ACTIVE')){?>
35
+				<?php if (defined('WP_EASY_UPDATES_ACTIVE')) {?>
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));
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 41
 						?>
42 42
 					</p>
43 43
 				<?php }?>
@@ -89,7 +89,7 @@  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__) ) . '" > ';
92
+									echo '<img src="' . plugins_url('images/t-image2.png', dirname(__FILE__)) . '" > ';
93 93
 								?>
94 94
 							</div>
95 95
 							<div class="t-content">
@@ -109,7 +109,7 @@  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__) ) . '" > ';
112
+									echo '<img src="' . plugins_url('images/t-image1.png', dirname(__FILE__)) . '" > ';
113 113
 								?>
114 114
 							</div>
115 115
 							<div class="t-content">
@@ -134,44 +134,44 @@  discard block
 block discarded – undo
134 134
 			</div>
135 135
 		</div>
136 136
 			<?php
137
-		}else{
137
+		} else {
138 138
 			$installed_plugins = get_plugins();
139 139
             $addon_obj = new WPInv_Admin_Addons();
140
-			if ($addons = $addon_obj->get_section_data( $current_tab ) ) :
140
+			if ($addons = $addon_obj->get_section_data($current_tab)) :
141 141
 				?>
142
-				<ul class="wpi-products"><?php foreach ( $addons as $addon ) :
143
-                        if(965==$addon->info->id){continue;}// don't show quote add on
142
+				<ul class="wpi-products"><?php foreach ($addons as $addon) :
143
+                        if (965 == $addon->info->id) {continue; }// don't show quote add on
144 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 );
147
+										if (!empty($addon->info->excerpt)) {
148
+											echo wpi_help_tip($addon->info->excerpt);
149 149
 										}
150
-										echo esc_html( $addon->info->title ); ?></h3>
150
+										echo esc_html($addon->info->title); ?></h3>
151 151
 								</div>
152 152
 
153 153
 								<span class="wpi-product-image">
154
-									<?php if ( ! empty( $addon->info->thumbnail) ) : ?>
155
-										<img src="<?php echo esc_attr( $addon->info->thumbnail ); ?>"/>
154
+									<?php if (!empty($addon->info->thumbnail)) : ?>
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>';
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 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{
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 166
 											// if installed show activation link
167
-											if(isset($installed_plugins['wp-easy-updates/external-updates.php'])){
167
+											if (isset($installed_plugins['wp-easy-updates/external-updates.php'])) {
168 168
 												$url = '#TB_inline?width=600&height=50&inlineId=wpi-wpeu-required-activation';
169
-											}else{
169
+											} else {
170 170
 												$url = '#TB_inline?width=600&height=50&inlineId=wpi-wpeu-required-for-external';
171 171
 											}
172 172
 										}
173
-										echo '<a href="'.$url.'" class="thickbox">';
174
-										echo '<span class="wpi-product-info">'.__('More info','invoicing').'</span>';
173
+										echo '<a href="' . $url . '" class="thickbox">';
174
+										echo '<span class="wpi-product-info">' . __('More info', 'invoicing') . '</span>';
175 175
 										echo '</a>';
176 176
 									}
177 177
 
@@ -182,7 +182,7 @@  discard block
 block discarded – undo
182 182
 
183 183
 								<span class="wpi-product-button">
184 184
 									<?php
185
-                                    $addon_obj->output_button( $addon );
185
+                                    $addon_obj->output_button($addon);
186 186
 									?>
187 187
 								</span>
188 188
 
@@ -196,21 +196,21 @@  discard block
 block discarded – undo
196 196
 
197 197
 	<div class="clearfix" ></div>
198 198
 
199
-	<?php if($current_tab =='addons'){ ?>
200
-	<p><?php printf( __( 'All of our Invoicing Addons can be found on WPInvoicing.com here: <a href="%s">Invoicing Addons</a>', 'invoicing' ), 'https://wpinvoicing.com/downloads/category/addons/' ); ?></p>
201
-	<?php } if($current_tab =='gateways'){  ?>
202
-    <p><?php printf( __( 'All of our Invoicing Payment Gateways can be found on WPInvoicing.com here: <a href="%s">Invoicing Payment Gateways</a>', 'invoicing' ), 'https://wpinvoicing.com/downloads/category/gateways/' ); ?></p>
199
+	<?php if ($current_tab == 'addons') { ?>
200
+	<p><?php printf(__('All of our Invoicing Addons can be found on WPInvoicing.com here: <a href="%s">Invoicing Addons</a>', 'invoicing'), 'https://wpinvoicing.com/downloads/category/addons/'); ?></p>
201
+	<?php } if ($current_tab == 'gateways') {  ?>
202
+    <p><?php printf(__('All of our Invoicing Payment Gateways can be found on WPInvoicing.com here: <a href="%s">Invoicing Payment Gateways</a>', 'invoicing'), 'https://wpinvoicing.com/downloads/category/gateways/'); ?></p>
203 203
     <?php } ?>
204 204
 
205
-	<div id="wpi-wpeu-required-activation" style="display:none;"><span class="wpi-notification "><?php printf( __("The plugin <a href='https://wpeasyupdates.com/' target='_blank'>WP Easy Updates</a> is required to check for and update some installed plugins/themes, please <a href='%s'>activate</a> it now.",'invoicing'),wp_nonce_url(admin_url('plugins.php?action=activate&plugin=wp-easy-updates/external-updates.php'), 'activate-plugin_wp-easy-updates/external-updates.php'));?></span></div>
206
-	<div id="wpi-wpeu-required-for-external" style="display:none;"><span class="wpi-notification "><?php printf(  __("The plugin <a href='https://wpeasyupdates.com/' target='_blank'>WP Easy Updates</a> is required to check for and update some installed plugins/themes, please <a href='%s' onclick='window.open(\"https://wpeasyupdates.com/wp-easy-updates.zip\", \"_blank\");' >download</a> and install it now.",'invoicing'),admin_url("plugin-install.php?tab=upload&wpeu-install=true"));?></span></div>
205
+	<div id="wpi-wpeu-required-activation" style="display:none;"><span class="wpi-notification "><?php printf(__("The plugin <a href='https://wpeasyupdates.com/' target='_blank'>WP Easy Updates</a> is required to check for and update some installed plugins/themes, please <a href='%s'>activate</a> it now.", 'invoicing'), wp_nonce_url(admin_url('plugins.php?action=activate&plugin=wp-easy-updates/external-updates.php'), 'activate-plugin_wp-easy-updates/external-updates.php')); ?></span></div>
206
+	<div id="wpi-wpeu-required-for-external" style="display:none;"><span class="wpi-notification "><?php printf(__("The plugin <a href='https://wpeasyupdates.com/' target='_blank'>WP Easy Updates</a> is required to check for and update some installed plugins/themes, please <a href='%s' onclick='window.open(\"https://wpeasyupdates.com/wp-easy-updates.zip\", \"_blank\");' >download</a> and install it now.", 'invoicing'), admin_url("plugin-install.php?tab=upload&wpeu-install=true")); ?></span></div>
207 207
 	<div id="wpeu-licence-popup" style="display:none;">
208 208
 		<span class="wpi-notification noti-white">
209
-			<h3 class="wpeu-licence-title"><?php _e("Licence key",'invoicing');?></h3>
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>
209
+			<h3 class="wpeu-licence-title"><?php _e("Licence key", 'invoicing'); ?></h3>
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>' );
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 214
 			?>
215 215
 		</span>
216 216
 	</div>
Please login to merge, or discard this patch.