Passed
Push — master ( 6ac651...0a307d )
by
unknown
13:21
created
lite/includes/admin/dashboard-widget.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -290,7 +290,7 @@
 block discarded – undo
290 290
 			$this->options = self::wp_parse_args_recursive( get_user_meta( get_current_user_id(), 'monsterinsights_user_preferences', true ), self::$default_options );
291 291
 		}
292 292
 
293
-        // Set interval fixed to last30days on lite plugin.
293
+	// Set interval fixed to last30days on lite plugin.
294 294
 		$this->options['interval'] = 'last30days';
295 295
 
296 296
 		return apply_filters( 'monsterinsights_dashboard_widget_options', $this->options );
Please login to merge, or discard this patch.
lite/includes/emails/summaries.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -214,9 +214,9 @@
 block discarded – undo
214 214
 		$schedule['minute'] = wp_rand( 0, 59 );
215 215
 		$schedule['second'] = wp_rand( 0, 59 );
216 216
 		$schedule['offset'] = ( $schedule['day'] * DAY_IN_SECONDS ) +
217
-		                      ( $schedule['hour'] * HOUR_IN_SECONDS ) +
218
-		                      ( $schedule['minute'] * MINUTE_IN_SECONDS ) +
219
-		                      $schedule['second'];
217
+				      ( $schedule['hour'] * HOUR_IN_SECONDS ) +
218
+				      ( $schedule['minute'] * MINUTE_IN_SECONDS ) +
219
+				      $schedule['second'];
220 220
 		$date               = strtotime( 'next saturday' ) + $schedule['offset'];
221 221
 
222 222
 		return $date;
Please login to merge, or discard this patch.
includes/admin/pages/addons.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -130,12 +130,12 @@
 block discarded – undo
130 130
 function monsterinsights_get_all_addons_data() {
131 131
 
132 132
     $body = array(
133
-        'tgm-updater-action'     => 'get-all-addons-data',
134
-        'tgm-updater-key'        => '',
135
-        'tgm-updater-wp-version' => get_bloginfo( 'version' ),
136
-        'tgm-updater-referer'    => site_url(),
137
-        'tgm-updater-mi-version' => MONSTERINSIGHTS_VERSION,
138
-        'tgm-updater-is-pro'     => false,
133
+	'tgm-updater-action'     => 'get-all-addons-data',
134
+	'tgm-updater-key'        => '',
135
+	'tgm-updater-wp-version' => get_bloginfo( 'version' ),
136
+	'tgm-updater-referer'    => site_url(),
137
+	'tgm-updater-mi-version' => MONSTERINSIGHTS_VERSION,
138
+	'tgm-updater-is-pro'     => false,
139 139
     );
140 140
 
141 141
     return monsterinsights_perform_remote_request( 'verify-key', $body );
Please login to merge, or discard this patch.
includes/admin/admin.php 1 patch
Indentation   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -467,26 +467,26 @@
 block discarded – undo
467 467
     $profile = is_network_admin() ? MonsterInsights()->auth->get_network_analytics_profile() : MonsterInsights()->auth->get_analytics_profile();
468 468
 
469 469
     if ( !empty($profile['ua']) && empty($profile['v4']) && !monsterinsights_is_own_admin_page() ) {
470
-        $title = __('Urgent: Your Website is Not Tracking Any Google Analytics Data!', 'google-analytics-for-wordpress');
471
-        $message = __('Google Analytics 3 (UA) and support was sunset on July 1, 2023. Your website is currently NOT tracking any analytics. </br>Create or connect a new Google Analytics 4 property immediately to start tracking.', 'google-analytics-for-wordpress');
470
+	$title = __('Urgent: Your Website is Not Tracking Any Google Analytics Data!', 'google-analytics-for-wordpress');
471
+	$message = __('Google Analytics 3 (UA) and support was sunset on July 1, 2023. Your website is currently NOT tracking any analytics. </br>Create or connect a new Google Analytics 4 property immediately to start tracking.', 'google-analytics-for-wordpress');
472 472
 
473
-        $wizard_url     = admin_url('admin.php?page=monsterinsights-onboarding');
473
+	$wizard_url     = admin_url('admin.php?page=monsterinsights-onboarding');
474 474
 
475
-        echo '<div class="notice notice-error is-dismissible monsterinsights-notice" data-notice="monsterinsights_ua_sunset">';
476
-        echo '<p><strong>' . $title . '</strong></p>';
477
-        echo '<p>' . $message . '</p>';
478
-        echo '<p>';
479
-        echo '<a href="https://www.monsterinsights.com/docs/connect-google-analytics/"
475
+	echo '<div class="notice notice-error is-dismissible monsterinsights-notice" data-notice="monsterinsights_ua_sunset">';
476
+	echo '<p><strong>' . $title . '</strong></p>';
477
+	echo '<p>' . $message . '</p>';
478
+	echo '<p>';
479
+	echo '<a href="https://www.monsterinsights.com/docs/connect-google-analytics/"
480 480
                    target="_blank" rel="noopener noreferrer">' .
481
-            __( 'Learn How to Create a GA4 Property', 'google-analytics-for-wordpress' ) .
482
-            '</a><br>';
483
-        echo '<a href="' . $wizard_url . '">' .
484
-            __( 'Connect a Property', 'google-analytics-for-wordpress' ) .
485
-            '</a><br>';
486
-        echo '</p>';
487
-        echo '</div>';
488
-
489
-        return;
481
+	    __( 'Learn How to Create a GA4 Property', 'google-analytics-for-wordpress' ) .
482
+	    '</a><br>';
483
+	echo '<a href="' . $wizard_url . '">' .
484
+	    __( 'Connect a Property', 'google-analytics-for-wordpress' ) .
485
+	    '</a><br>';
486
+	echo '</p>';
487
+	echo '</div>';
488
+
489
+	return;
490 490
     }
491 491
 
492 492
 	$is_plugins_page = 'plugins' === get_current_screen()->id;
Please login to merge, or discard this patch.
includes/admin/ajax.php 1 patch
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -332,20 +332,20 @@
 block discarded – undo
332 332
     $site_key = is_network_admin() ? $auth->get_network_key() : $auth->get_key();
333 333
 
334 334
     if ( !hash_equals( $site_key, $key ) ) {
335
-        wp_send_json_error([
336
-            'error'     => __( 'Invalid site key.', 'google-analytics-for-wordpress' )
337
-        ], 401);
335
+	wp_send_json_error([
336
+	    'error'     => __( 'Invalid site key.', 'google-analytics-for-wordpress' )
337
+	], 401);
338 338
     }
339 339
 
340 340
     $v4 = is_network_admin() ? $auth->get_network_v4_id() :  $auth->get_v4_id();
341 341
     $has_secret = is_network_admin() ?
342
-        !empty( $auth->get_network_measurement_protocol_secret() ) :
343
-        !empty( $auth->get_measurement_protocol_secret() );
342
+	!empty( $auth->get_network_measurement_protocol_secret() ) :
343
+	!empty( $auth->get_measurement_protocol_secret() );
344 344
 
345 345
     wp_send_json([
346
-        'v4'                => $v4,
347
-        'has_mp_secret'     => $has_secret,
348
-        'plugin_version'    => MonsterInsights()->version
346
+	'v4'                => $v4,
347
+	'has_mp_secret'     => $has_secret,
348
+	'plugin_version'    => MonsterInsights()->version
349 349
     ]);
350 350
 }
351 351
 
Please login to merge, or discard this patch.
includes/admin/tracking.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -72,10 +72,10 @@  discard block
 block discarded – undo
72 72
 			$usesauth = 'Network';
73 73
 		}
74 74
 
75
-        //  Get auth connection type
76
-        $auth = MonsterInsights()->auth;
75
+	//  Get auth connection type
76
+	$auth = MonsterInsights()->auth;
77 77
 
78
-        $auth_mode = 'v4';
78
+	$auth_mode = 'v4';
79 79
 
80 80
 		$data['php_version']    = phpversion();
81 81
 		$data['mi_version']     = MONSTERINSIGHTS_VERSION;
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
 		$data['usercount']      = function_exists( 'get_user_count' ) ? get_user_count() : 'Not Set';
100 100
 		$data['usesauth']       = $usesauth;
101 101
 		$data['timezoneoffset'] = date( 'P' );
102
-        $data['ga_auth_mode']   = $auth_mode;
102
+	$data['ga_auth_mode']   = $auth_mode;
103 103
 
104 104
 		// Retrieve current plugin information
105 105
 		if ( ! function_exists( 'get_plugins' ) ) {
@@ -168,9 +168,9 @@  discard block
 block discarded – undo
168 168
 			$tracking['minute']   = rand( 0, 59 );
169 169
 			$tracking['second']   = rand( 0, 59 );
170 170
 			$tracking['offset']   = ( $tracking['day'] * DAY_IN_SECONDS ) +
171
-			                        ( $tracking['hour'] * HOUR_IN_SECONDS ) +
172
-			                        ( $tracking['minute'] * MINUTE_IN_SECONDS ) +
173
-			                        $tracking['second'];
171
+						( $tracking['hour'] * HOUR_IN_SECONDS ) +
172
+						( $tracking['minute'] * MINUTE_IN_SECONDS ) +
173
+						$tracking['second'];
174 174
 			$tracking['initsend'] = strtotime( "next sunday" ) + $tracking['offset'];
175 175
 
176 176
 			wp_schedule_event( $tracking['initsend'], 'weekly', 'monsterinsights_usage_tracking_cron' );
Please login to merge, or discard this patch.
includes/admin/api-auth.php 1 patch
Indentation   +28 added lines, -28 removed lines patch added patch discarded remove patch
@@ -128,18 +128,18 @@  discard block
 block discarded – undo
128 128
 
129 129
 		$sitei = $this->get_sitei();
130 130
 
131
-        $auth_request_args = array(
132
-            'tt'        => $this->get_tt(),
133
-            'sitei'     => $sitei,
134
-            'miversion' => MONSTERINSIGHTS_VERSION,
135
-            'ajaxurl'   => admin_url( 'admin-ajax.php' ),
136
-            'network'   => is_network_admin() ? 'network' : 'site',
137
-            'siteurl'   => is_network_admin() ? network_admin_url() : home_url(),
138
-            'return'    => is_network_admin() ? network_admin_url( 'admin.php?page=monsterinsights_network' ) : admin_url( 'admin.php?page=monsterinsights_settings' ),
139
-            'testurl'   => 'https://' . monsterinsights_get_api_url() . 'test/',
140
-        );
141
-
142
-        $auth_request_args = apply_filters('monsterinsights_auth_request_body', $auth_request_args);
131
+	$auth_request_args = array(
132
+	    'tt'        => $this->get_tt(),
133
+	    'sitei'     => $sitei,
134
+	    'miversion' => MONSTERINSIGHTS_VERSION,
135
+	    'ajaxurl'   => admin_url( 'admin-ajax.php' ),
136
+	    'network'   => is_network_admin() ? 'network' : 'site',
137
+	    'siteurl'   => is_network_admin() ? network_admin_url() : home_url(),
138
+	    'return'    => is_network_admin() ? network_admin_url( 'admin.php?page=monsterinsights_network' ) : admin_url( 'admin.php?page=monsterinsights_settings' ),
139
+	    'testurl'   => 'https://' . monsterinsights_get_api_url() . 'test/',
140
+	);
141
+
142
+	$auth_request_args = apply_filters('monsterinsights_auth_request_body', $auth_request_args);
143 143
 
144 144
 		$siteurl = add_query_arg($auth_request_args, $this->get_route( 'https://' . monsterinsights_get_api_url() . 'auth/new/{type}' ) );
145 145
 
@@ -225,7 +225,7 @@  discard block
 block discarded – undo
225 225
 			return;
226 226
 		}
227 227
 
228
-        $code_value = monsterinsights_is_valid_v4_id( $_REQUEST['v4'] ); // phpcs:ignore
228
+	$code_value = monsterinsights_is_valid_v4_id( $_REQUEST['v4'] ); // phpcs:ignore
229 229
 
230 230
 		if ( empty( $code_value ) ) {
231 231
 			return;
@@ -323,20 +323,20 @@  discard block
 block discarded – undo
323 323
 			wp_send_json_error( array( 'message' => $message ) );
324 324
 		}
325 325
 
326
-        $auth_request_args = array(
327
-            'tt'        => $this->get_tt(),
328
-            'sitei'     => $this->get_sitei(),
329
-            'miversion' => MONSTERINSIGHTS_VERSION,
330
-            'ajaxurl'   => admin_url( 'admin-ajax.php' ),
331
-            'network'   => is_network_admin() ? 'network' : 'site',
332
-            'siteurl'   => is_network_admin() ? network_admin_url() : home_url(),
333
-            'key'       => is_network_admin() ? MonsterInsights()->auth->get_network_key() : MonsterInsights()->auth->get_key(),
334
-            'token'     => is_network_admin() ? MonsterInsights()->auth->get_network_token() : MonsterInsights()->auth->get_token(),
335
-            'return'    => is_network_admin() ? network_admin_url( 'admin.php?page=monsterinsights_network' ) : admin_url( 'admin.php?page=monsterinsights_settings' ),
336
-            'testurl'   => 'https://' . monsterinsights_get_api_url() . 'test/',
337
-        );
326
+	$auth_request_args = array(
327
+	    'tt'        => $this->get_tt(),
328
+	    'sitei'     => $this->get_sitei(),
329
+	    'miversion' => MONSTERINSIGHTS_VERSION,
330
+	    'ajaxurl'   => admin_url( 'admin-ajax.php' ),
331
+	    'network'   => is_network_admin() ? 'network' : 'site',
332
+	    'siteurl'   => is_network_admin() ? network_admin_url() : home_url(),
333
+	    'key'       => is_network_admin() ? MonsterInsights()->auth->get_network_key() : MonsterInsights()->auth->get_key(),
334
+	    'token'     => is_network_admin() ? MonsterInsights()->auth->get_network_token() : MonsterInsights()->auth->get_token(),
335
+	    'return'    => is_network_admin() ? network_admin_url( 'admin.php?page=monsterinsights_network' ) : admin_url( 'admin.php?page=monsterinsights_settings' ),
336
+	    'testurl'   => 'https://' . monsterinsights_get_api_url() . 'test/',
337
+	);
338 338
 
339
-        $auth_request_args = apply_filters('monsterinsights_auth_request_body', $auth_request_args);
339
+	$auth_request_args = apply_filters('monsterinsights_auth_request_body', $auth_request_args);
340 340
 
341 341
 		$siteurl = add_query_arg( $auth_request_args, $this->get_route( 'https://' . monsterinsights_get_api_url() . 'auth/reauth/{type}' ) );
342 342
 
@@ -368,7 +368,7 @@  discard block
 block discarded – undo
368 368
 
369 369
 		// Make sure has required params
370 370
 		if (
371
-            empty( $_REQUEST['v4'] ) ||
371
+	    empty( $_REQUEST['v4'] ) ||
372 372
 			empty( $_REQUEST['miview'] ) ||
373 373
 			empty( $_REQUEST['a'] ) ||
374 374
 			empty( $_REQUEST['w'] ) ||
@@ -377,7 +377,7 @@  discard block
 block discarded – undo
377 377
 			return;
378 378
 		}
379 379
 
380
-        $code_value = monsterinsights_is_valid_v4_id( $_REQUEST['v4'] ); // phpcs:ignore
380
+	$code_value = monsterinsights_is_valid_v4_id( $_REQUEST['v4'] ); // phpcs:ignore
381 381
 
382 382
 		if ( empty( $code_value ) ) {
383 383
 			return;
Please login to merge, or discard this patch.
includes/admin/reports/abstract-report.php 1 patch
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -420,15 +420,15 @@
 block discarded – undo
420 420
 
421 421
 		$params = $this->get_ga_report_range( $data );
422 422
 
423
-        $format = 'https://analytics.google.com/analytics/web/#/%1$s/' . ( $is_real_time ? 'realtime' : 'reports' ) . '/%5$s?params=%3$s%4$s&r=%2$s';
424
-
425
-        if ( empty( $v4_name ) ) {
426
-            $report_name = '';
427
-        } else {
428
-            $report_name = $v4_name;
429
-        }
430
-        $extra_params = '&' . $v4_extra_params;
431
-        $endpoint     = $v4_endpoint;
423
+	$format = 'https://analytics.google.com/analytics/web/#/%1$s/' . ( $is_real_time ? 'realtime' : 'reports' ) . '/%5$s?params=%3$s%4$s&r=%2$s';
424
+
425
+	if ( empty( $v4_name ) ) {
426
+	    $report_name = '';
427
+	} else {
428
+	    $report_name = $v4_name;
429
+	}
430
+	$extra_params = '&' . $v4_extra_params;
431
+	$endpoint     = $v4_endpoint;
432 432
 
433 433
 		return sprintf(
434 434
 			$format,
Please login to merge, or discard this patch.
includes/admin/licensing/autoupdate.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@
 block discarded – undo
59 59
 		);
60 60
 		add_filter( "monsterinsights_is_autoupdate_setting_html_filtered_" . $plugin_file, '__return_true' );
61 61
 	} elseif ( $has_permission &&
62
-	           ( $is_main_free || $is_main_pro || ( $is_addon && $is_pro ) )
62
+		   ( $is_main_free || $is_main_pro || ( $is_addon && $is_pro ) )
63 63
 	) {
64 64
 		$text = __( 'Manage auto-updates', 'google-analytics-for-wordpress' );
65 65
 		$html .= '<br>' . sprintf( '<a href="%s"">%s</a>', admin_url( 'admin.php?page=monsterinsights_settings#/advanced' ), $text );
Please login to merge, or discard this patch.