Passed
Push — master ( a7feb4...77da65 )
by Chris
04:45
created
includes/admin/admin.php 1 patch
Braces   +9 added lines, -7 removed lines patch added patch discarded remove patch
@@ -221,9 +221,11 @@  discard block
 block discarded – undo
221 221
     }
222 222
 
223 223
     $upgrade = get_option( 'monsterinsights_version_upgraded_from' );
224
-    if( ! $upgrade ) { // First time install
224
+    if( ! $upgrade ) {
225
+// First time install
225 226
         //wp_safe_redirect( admin_url( 'admin.php?page=monsterinsights_settings#monsterinsights-main-tab-general' ) ); exit;
226
-    } else { // Update
227
+    } else {
228
+// Update
227 229
         return;
228 230
         //wp_safe_redirect( admin_url( 'admin.php?page=monsterinsights_settings#monsterinsights-main-tab-general' ) ); exit;
229 231
     }
@@ -289,7 +291,7 @@  discard block
 block discarded – undo
289 291
     // 3. License key not valid/okay for pro
290 292
     if ( monsterinsights_is_pro_version() ) {
291 293
         $message = '';
292
-        if ( MonsterInsights()->license->get_site_license_key() ){
294
+        if ( MonsterInsights()->license->get_site_license_key() ) {
293 295
             if ( MonsterInsights()->license->site_license_expired() ) {
294 296
                 $message = sprintf( esc_html__( 'Your license key for MonsterInsights has expired. %1$sPlease click here to renew your license key.%2$s', 'google-analytics-for-wordpress' ), '<a href="https://www.monsterinsights.com/login/" target="_blank" rel="noopener noreferrer" referrer="no-referrer">', '</a>' );
295 297
             } else if ( MonsterInsights()->license->site_license_disabled() ) {
@@ -348,7 +350,7 @@  discard block
 block discarded – undo
348 350
     $authed   = MonsterInsights()->auth->is_authed() || MonsterInsights()->auth->is_network_authed();
349 351
     $url      = is_network_admin() ? network_admin_url( 'admin.php?page=monsterinsights_network' ) : admin_url( 'admin.php?page=monsterinsights_settings' );
350 352
 
351
-    if ( empty( $authed ) && ! isset( $notices['monsterinsights_auth_not_manual' ] ) ) { 
353
+    if ( empty( $authed ) && ! isset( $notices['monsterinsights_auth_not_manual' ] ) ) {
352 354
         echo '<div class="notice notice-info is-dismissible monsterinsights-notice" data-notice="monsterinsights_auth_not_manual">';
353 355
             echo '<p>';
354 356
             echo sprintf( esc_html__( 'Important: You are currently using manual UA code output. We highly recommend %1$sauthenticating with MonsterInsights%2$s so that you can access our new reporting area and take advantage of new MonsterInsights features.', 'google-analytics-for-wordpress' ), '<a href="' . $url .'">', '</a>' ); 
@@ -362,7 +364,7 @@  discard block
 block discarded – undo
362 364
         $updates   = monsterinsights_get_option( 'automatic_updates', false );
363 365
         $url       = admin_url( 'admin.php?page=monsterinsights_settings' );
364 366
 
365
-        if ( empty( $updates) && ! isset( $notices['monsterinsights_automatic_updates' ] ) ) { 
367
+        if ( empty( $updates) && ! isset( $notices['monsterinsights_automatic_updates' ] ) ) {
366 368
             echo '<div class="notice notice-info is-dismissible monsterinsights-notice" data-notice="monsterinsights_automatic_updates">';
367 369
                 echo '<p>';
368 370
                 echo sprintf( esc_html__( 'Important: Please %1$sconfigure the Automatic Updates Settings%2$s in MonsterInsights.', 'google-analytics-for-wordpress' ), '<a href="' . $url .'">', '</a>' ); 
@@ -374,7 +376,7 @@  discard block
 block discarded – undo
374 376
 
375 377
     // 7. WooUpsell
376 378
     if ( ! monsterinsights_is_pro_version() && class_exists( 'WooCommerce' ) ) {
377
-        if ( ! isset( $notices['monsterinsights_woocommerce_tracking_available' ] ) ) { 
379
+        if ( ! isset( $notices['monsterinsights_woocommerce_tracking_available' ] ) ) {
378 380
             echo '<div class="notice notice-success is-dismissible monsterinsights-notice monsterinsights-wooedd-upsell-row" data-notice="monsterinsights_woocommerce_tracking_available">';
379 381
                 echo '<div class="monsterinsights-wooedd-upsell-left">';
380 382
                     echo '<p><strong>';
@@ -405,7 +407,7 @@  discard block
 block discarded – undo
405 407
 
406 408
     // 8. EDDUpsell
407 409
     if ( ! monsterinsights_is_pro_version() && class_exists( 'Easy_Digital_Downloads' ) ) {
408
-        if ( ! isset( $notices['monsterinsights_edd_tracking_available' ] ) ) { 
410
+        if ( ! isset( $notices['monsterinsights_edd_tracking_available' ] ) ) {
409 411
             echo '<div class="notice notice-success is-dismissible monsterinsights-notice monsterinsights-wooedd-upsell-row" data-notice="monsterinsights_edd_tracking_available">';
410 412
                 echo '<div class="monsterinsights-wooedd-upsell-left">';
411 413
                     echo '<p><strong>';
Please login to merge, or discard this patch.