Passed
Push — master ( cf9d65...a7feb4 )
by Chris
03:29
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>' ); 
@@ -373,7 +375,7 @@  discard block
 block discarded – undo
373 375
     }
374 376
 
375 377
     if ( ! monsterinsights_is_pro_version() && class_exists( 'WooCommerce' ) ) {
376
-        if ( ! isset( $notices['monsterinsights_woocommerce_tracking_available' ] ) ) { 
378
+        if ( ! isset( $notices['monsterinsights_woocommerce_tracking_available' ] ) ) {
377 379
             echo '<div class="notice notice-success is-dismissible monsterinsights-notice monsterinsights-wooedd-upsell-row" data-notice="monsterinsights_woocommerce_tracking_available">';
378 380
                 echo '<div class="monsterinsights-wooedd-upsell-left">';
379 381
                     echo '<p><strong>';
@@ -402,7 +404,7 @@  discard block
 block discarded – undo
402 404
         }
403 405
     }
404 406
     if ( ! monsterinsights_is_pro_version() && class_exists( 'Easy_Digital_Downloads' ) ) {
405
-        if ( ! isset( $notices['monsterinsights_edd_tracking_available' ] ) ) { 
407
+        if ( ! isset( $notices['monsterinsights_edd_tracking_available' ] ) ) {
406 408
             echo '<div class="notice notice-success is-dismissible monsterinsights-notice monsterinsights-wooedd-upsell-row" data-notice="monsterinsights_edd_tracking_available">';
407 409
                 echo '<div class="monsterinsights-wooedd-upsell-left">';
408 410
                     echo '<p><strong>';
Please login to merge, or discard this patch.