Passed
Push — master ( e110bf...98a9e1 )
by Brian
14:22
created
includes/admin/html-admin-page-addons.php 1 patch
Indentation   +69 added lines, -69 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="' . esc_url( admin_url( 'admin.php?page=wpi-addons&tab=' . $name ) ) . '" class="nav-tab ' . ( $current_tab == $name ? 'nav-tab-active' : '' ) . '">' . esc_html( $label ) . '</a>';
19
-			}
20
-			do_action( 'wpi_addons_tabs' );
21
-			?>
17
+            foreach ( $tabs as $name => $label ) {
18
+                echo '<a href="' . esc_url( admin_url( 'admin.php?page=wpi-addons&tab=' . $name ) ) . '" class="nav-tab ' . ( $current_tab == $name ? 'nav-tab-active' : '' ) . '">' . esc_html( $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><?php esc_html_e( 'Have a membership key?', 'invoicing' ); ?></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, 12351 ) );
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, 12351 ) );
41
+                        ?>
42 42
 					</p>
43 43
 				<?php } ?>
44 44
 
@@ -48,13 +48,13 @@  discard block
 block discarded – undo
48 48
 							<div class="feature-list">
49 49
 								<ul>
50 50
 									<?php
51
-									$addon_obj = new WPInv_Admin_Addons();
52
-									if ( $addons = $addon_obj->get_section_data( 'addons' ) ) {
53
-										foreach ( $addons as $addon ) {
54
-											echo '<li><i class="far fa-check-circle fa-sm"></i> ' . esc_html( $addon->info->title ) . '</li>';
55
-										}
56
-									}
57
-									?>
51
+                                    $addon_obj = new WPInv_Admin_Addons();
52
+                                    if ( $addons = $addon_obj->get_section_data( 'addons' ) ) {
53
+                                        foreach ( $addons as $addon ) {
54
+                                            echo '<li><i class="far fa-check-circle fa-sm"></i> ' . esc_html( $addon->info->title ) . '</li>';
55
+                                        }
56
+                                    }
57
+                                    ?>
58 58
 									</ul>
59 59
 
60 60
 									<div class="feature-cta">
@@ -65,12 +65,12 @@  discard block
 block discarded – undo
65 65
 									<h3><?php esc_html_e( 'Included Gateways:', 'invoicing' ); ?></h3>
66 66
 									<ul>
67 67
 										<?php
68
-										if ( $addons = $addon_obj->get_section_data( 'gateways' ) ) {
69
-											foreach ( $addons as $addon ) {
70
-												echo '<li><i class="far fa-check-circle fa-sm"></i> ' . esc_html( $addon->info->title ) . '</li>';
71
-											}
72
-										}
73
-										?>
68
+                                        if ( $addons = $addon_obj->get_section_data( 'gateways' ) ) {
69
+                                            foreach ( $addons as $addon ) {
70
+                                                echo '<li><i class="far fa-check-circle fa-sm"></i> ' . esc_html( $addon->info->title ) . '</li>';
71
+                                            }
72
+                                        }
73
+                                        ?>
74 74
 								</ul>
75 75
 							</div>
76 76
 
@@ -81,8 +81,8 @@  discard block
 block discarded – undo
81 81
 						<div class="testimonial-content">
82 82
 							<div class="t-image">
83 83
 								<?php
84
-									echo '<img src="' . esc_url( plugins_url( 'images/t-image2.png', dirname( __FILE__ ) ) ) . '" > ';
85
-								?>
84
+                                    echo '<img src="' . esc_url( plugins_url( 'images/t-image2.png', dirname( __FILE__ ) ) ) . '" > ';
85
+                                ?>
86 86
 							</div>
87 87
 							<div class="t-content">
88 88
 								<p>
@@ -101,8 +101,8 @@  discard block
 block discarded – undo
101 101
 						<div class="testimonial-content">
102 102
 							<div class="t-image">
103 103
 								<?php
104
-									echo '<img src="' . esc_url( plugins_url( 'images/t-image1.png', dirname( __FILE__ ) ) ) . '" > ';
105
-								?>
104
+                                    echo '<img src="' . esc_url( plugins_url( 'images/t-image1.png', dirname( __FILE__ ) ) ) . '" > ';
105
+                                ?>
106 106
 							</div>
107 107
 							<div class="t-content">
108 108
 								<p>
@@ -126,26 +126,26 @@  discard block
 block discarded – undo
126 126
 			</div>
127 127
 		</div>
128 128
 			<?php
129
-		} else {
130
-			$installed_plugins = get_plugins();
129
+        } else {
130
+            $installed_plugins = get_plugins();
131 131
             $addon_obj = new WPInv_Admin_Addons();
132
-			if ( $addons = $addon_obj->get_section_data( $current_tab ) ) :
133
-				//print_r($addons);
134
-				?>
132
+            if ( $addons = $addon_obj->get_section_data( $current_tab ) ) :
133
+                //print_r($addons);
134
+                ?>
135 135
 				<ul class="wpi-products">
136 136
                 <?php
137 137
                 foreach ( $addons as $addon ) :
138 138
                         if ( 965 == $addon->info->id ) {
139 139
 continue;}// don't show quote add on
140
-						?>
140
+                        ?>
141 141
                         <li class="wpi-product">
142 142
 								<div class="wpi-product-title">
143 143
 									<h3>
144 144
                                     <?php
145
-										if ( ! empty( $addon->info->excerpt ) ) {
146
-										wpi_help_tip( $addon->info->excerpt, false, false, true );
147
-										}
148
-										echo esc_html( $addon->info->title );
145
+                                        if ( ! empty( $addon->info->excerpt ) ) {
146
+                                        wpi_help_tip( $addon->info->excerpt, false, false, true );
147
+                                        }
148
+                                        echo esc_html( $addon->info->title );
149 149
                                         ?>
150 150
                                         </h3>
151 151
 								</div>
@@ -156,32 +156,32 @@  discard block
 block discarded – undo
156 156
 									<?php
157 157
                                     endif;
158 158
 
159
-									if ( 'stripe-payment-gateway' == $addon->info->slug ) {
160
-										$addon->info->slug = 'getpaid-stripe-payments';
161
-										$addon->info->link = 'https://wordpress.org/plugins/getpaid-stripe-payments/';
162
-									}
163
-
164
-									if ( isset( $addon->info->link ) && substr( $addon->info->link, 0, 21 ) === 'https://wordpress.org' ) {
165
-										echo '<a href="' . esc_url( admin_url( '/plugin-install.php?tab=plugin-information&plugin=' . $addon->info->slug ) ) . '&width=770&height=660&TB_iframe=true" class="thickbox" >';
166
-										echo '<span class="wpi-product-info">' . esc_html__( 'More info', 'invoicing' ) . '</span>';
167
-										echo '</a>';
168
-									} elseif ( isset( $addon->info->link ) && ( substr( $addon->info->link, 0, 23 ) === 'https://wpinvoicing.com' || substr( $addon->info->link, 0, 21 ) === 'https://wpgetpaid.com' ) ) {
169
-										if ( defined( 'WP_EASY_UPDATES_ACTIVE' ) ) {
170
-											$url = admin_url( '/plugin-install.php?tab=plugin-information&plugin=' . $addon->info->slug . '&width=770&height=660&item_id=' . $addon->info->id . '&update_url=https://wpgetpaid.com&TB_iframe=true' );
171
-										} else {
172
-											// if installed show activation link
173
-											if ( isset( $installed_plugins['wp-easy-updates/external-updates.php'] ) ) {
174
-												$url = '#TB_inline?width=600&height=50&inlineId=wpi-wpeu-required-activation';
175
-											} else {
176
-												$url = '#TB_inline?width=600&height=50&inlineId=wpi-wpeu-required-for-external';
177
-											}
178
-										}
179
-										echo '<a href="' . esc_url( $url ) . '" class="thickbox">';
180
-										echo '<span class="wpi-product-info">' . esc_html__( 'More info', 'invoicing' ) . '</span>';
181
-										echo '</a>';
182
-									}
183
-
184
-									?>
159
+                                    if ( 'stripe-payment-gateway' == $addon->info->slug ) {
160
+                                        $addon->info->slug = 'getpaid-stripe-payments';
161
+                                        $addon->info->link = 'https://wordpress.org/plugins/getpaid-stripe-payments/';
162
+                                    }
163
+
164
+                                    if ( isset( $addon->info->link ) && substr( $addon->info->link, 0, 21 ) === 'https://wordpress.org' ) {
165
+                                        echo '<a href="' . esc_url( admin_url( '/plugin-install.php?tab=plugin-information&plugin=' . $addon->info->slug ) ) . '&width=770&height=660&TB_iframe=true" class="thickbox" >';
166
+                                        echo '<span class="wpi-product-info">' . esc_html__( 'More info', 'invoicing' ) . '</span>';
167
+                                        echo '</a>';
168
+                                    } elseif ( isset( $addon->info->link ) && ( substr( $addon->info->link, 0, 23 ) === 'https://wpinvoicing.com' || substr( $addon->info->link, 0, 21 ) === 'https://wpgetpaid.com' ) ) {
169
+                                        if ( defined( 'WP_EASY_UPDATES_ACTIVE' ) ) {
170
+                                            $url = admin_url( '/plugin-install.php?tab=plugin-information&plugin=' . $addon->info->slug . '&width=770&height=660&item_id=' . $addon->info->id . '&update_url=https://wpgetpaid.com&TB_iframe=true' );
171
+                                        } else {
172
+                                            // if installed show activation link
173
+                                            if ( isset( $installed_plugins['wp-easy-updates/external-updates.php'] ) ) {
174
+                                                $url = '#TB_inline?width=600&height=50&inlineId=wpi-wpeu-required-activation';
175
+                                            } else {
176
+                                                $url = '#TB_inline?width=600&height=50&inlineId=wpi-wpeu-required-for-external';
177
+                                            }
178
+                                        }
179
+                                        echo '<a href="' . esc_url( $url ) . '" class="thickbox">';
180
+                                        echo '<span class="wpi-product-info">' . esc_html__( 'More info', 'invoicing' ) . '</span>';
181
+                                        echo '</a>';
182
+                                    }
183
+
184
+                                    ?>
185 185
 
186 186
 								</span>
187 187
 
@@ -189,15 +189,15 @@  discard block
 block discarded – undo
189 189
 								<span class="wpi-product-button">
190 190
 									<?php
191 191
                                     $addon_obj->output_button( $addon );
192
-									?>
192
+                                    ?>
193 193
 								</span>
194 194
 
195 195
 								<span class="wpi-price"><?php //print_r($addon); //echo wp_kses_post( $addon->price ); ?></span></li><?php endforeach; ?></ul>
196 196
 			<?php
197 197
             endif;
198
-		}
198
+        }
199 199
 }
200
-	?>
200
+    ?>
201 201
 
202 202
 
203 203
 	<div class="clearfix" ></div>
@@ -216,8 +216,8 @@  discard block
 block discarded – undo
216 216
 			<input class="wpeu-licence-key" type="text" placeholder="<?php esc_attr_e( 'Enter your licence key', 'invoicing' ); ?>"> <button class="button-primary wpeu-licence-popup-button" ><?php esc_html_e( 'Install', 'invoicing' ); ?></button>
217 217
 			<br>
218 218
 			<?php
219
-			printf( esc_html__( '%1$sFind your licence key here%2$s OR %3$sBuy one here%4$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>' );
220
-			?>
219
+            printf( esc_html__( '%1$sFind your licence key here%2$s OR %3$sBuy one here%4$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>' );
220
+            ?>
221 221
 		</span>
222 222
 	</div>
223 223
 
Please login to merge, or discard this patch.