Passed
Push — master ( 5624f1...cf9d65 )
by Chris
03:54
created
includes/admin/settings/register-settings.php 1 patch
Spacing   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -172,13 +172,13 @@  discard block
 block discarded – undo
172 172
 			)
173 173
 		),
174 174
 		/** Demographics Settings */
175
-		'demographics' => apply_filters('monsterinsights_settings_demographics',
175
+		'demographics' => apply_filters( 'monsterinsights_settings_demographics',
176 176
 			array(
177 177
 				'demographics' => array(
178 178
 					'id'          => 'demographics',
179 179
 					'name'        => __( 'Enable Demographics and Interests Reports for Remarketing and Advertising', 'google-analytics-for-wordpress' ),
180 180
 					'desc'        => sprintf( esc_html__( 'Check this setting to add the Demographics and Remarketing features to your Google Analytics tracking code. Make sure to enable Demographics and Remarketing in your Google Analytics account. We have a guide for how to do that in our %1$sknowledge base%2$s. For more information about Remarketing, we refer you to %3$sGoogle\'s documentation%2$s. Note that usage of this function is affected by privacy and cookie laws around the world. Be sure to follow the laws that affect your target audience.', 'google-analytics-for-wordpress' ), '<a href="https://www.monsterinsights.com/docs/enable-demographics-and-interests-report-in-google-analytics/#utm_medium=kb-link&amp;utm_source=gawp-config&amp;utm_campaign=wpgaplugin" target="_blank" rel="noopener noreferrer" referrer="no-referrer">',
181
-									'</a>','<a href="https://support.google.com/analytics/answer/2444872?hl=' . get_locale() . '" target="_blank" rel="noopener noreferrer" referrer="no-referrer">'
181
+									'</a>', '<a href="https://support.google.com/analytics/answer/2444872?hl=' . get_locale() . '" target="_blank" rel="noopener noreferrer" referrer="no-referrer">'
182 182
 					),
183 183
 					'type' 		  => 'checkbox',
184 184
 				),
@@ -191,7 +191,7 @@  discard block
 block discarded – undo
191 191
 			)
192 192
 		),
193 193
 		/** Enhanced Link Attribution Settings */
194
-		'links' => apply_filters('monsterinsights_settings_links',
194
+		'links' => apply_filters( 'monsterinsights_settings_links',
195 195
 			array(
196 196
 				'enhanced_link_attribution' => array(
197 197
 					'id'          => 'enhanced_link_attribution',
@@ -226,7 +226,7 @@  discard block
 block discarded – undo
226 226
 			)
227 227
 		),
228 228
 		/** File Download Settings */
229
-		'files' => apply_filters('monsterinsights_settings_files',
229
+		'files' => apply_filters( 'monsterinsights_settings_files',
230 230
 			array(
231 231
 				'track_download_as' => array(
232 232
 					'id'          => 'track_download_as',
@@ -248,7 +248,7 @@  discard block
 block discarded – undo
248 248
 			)
249 249
 		),
250 250
 		/** Affiliate Tracking Settings */
251
-		'affiliates' => apply_filters('monsterinsights_settings_affiliates',
251
+		'affiliates' => apply_filters( 'monsterinsights_settings_affiliates',
252 252
 			array(
253 253
 				'track_internal_as_outbound' => array(
254 254
 					'id'          => 'track_internal_as_outbound',
@@ -265,68 +265,68 @@  discard block
 block discarded – undo
265 265
 			)
266 266
 		),
267 267
 		/** Social Tracking Settings */
268
-		'social' => apply_filters('monsterinsights_settings_social',
268
+		'social' => apply_filters( 'monsterinsights_settings_social',
269 269
 			array()
270 270
 		),
271 271
 		/** Ad Tracking Settings */
272
-		'ads' => apply_filters('monsterinsights_settings_ads',
272
+		'ads' => apply_filters( 'monsterinsights_settings_ads',
273 273
 			array()
274 274
 		),
275 275
 		/** Forms Tracking Settings */
276
-		'forms' => apply_filters('monsterinsights_settings_forms',
276
+		'forms' => apply_filters( 'monsterinsights_settings_forms',
277 277
 			array()
278 278
 		),
279 279
 		/** eCommerce Tracking Settings */
280
-		'ecommerce' => apply_filters('monsterinsights_settings_ecommerce',
280
+		'ecommerce' => apply_filters( 'monsterinsights_settings_ecommerce',
281 281
 			array()
282 282
 		),
283 283
 		/** Media Tracking Settings */
284
-		'media' => apply_filters('monsterinsights_settings_media',
284
+		'media' => apply_filters( 'monsterinsights_settings_media',
285 285
 			array()
286 286
 		),
287 287
 		/** Members Tracking Settings */
288
-		'memberships' => apply_filters('monsterinsights_settings_memberships',
288
+		'memberships' => apply_filters( 'monsterinsights_settings_memberships',
289 289
 			array()
290 290
 		),
291 291
 		/** Dimensions Tracking Settings */
292
-		'dimensions' => apply_filters('monsterinsights_settings_dimensions',
292
+		'dimensions' => apply_filters( 'monsterinsights_settings_dimensions',
293 293
 			array()
294 294
 		),
295 295
 		/** Performance Tracking Settings */
296
-		'performance' => apply_filters('monsterinsights_settings_performance',
296
+		'performance' => apply_filters( 'monsterinsights_settings_performance',
297 297
 			array()
298 298
 		),
299 299
 		/** AMP Tracking Settings */
300
-		'amp' => apply_filters('monsterinsights_settings_amp',
300
+		'amp' => apply_filters( 'monsterinsights_settings_amp',
301 301
 			array()
302 302
 		),
303 303
 		/** Google Optimize Tracking Settings */
304
-		'goptimize' => apply_filters('monsterinsights_settings_goptimize',
304
+		'goptimize' => apply_filters( 'monsterinsights_settings_goptimize',
305 305
 			array()
306 306
 		),
307 307
 		/** Facebook Instant Articles Tracking Settings */
308
-		'fbia' => apply_filters('monsterinsights_settings_fbia',
308
+		'fbia' => apply_filters( 'monsterinsights_settings_fbia',
309 309
 			array()
310 310
 		),
311 311
 		/** Bounce Reduction Settings */
312
-		'bounce' => apply_filters('monsterinsights_settings_bounce',
312
+		'bounce' => apply_filters( 'monsterinsights_settings_bounce',
313 313
 			array()
314 314
 		),
315 315
 		/** Reporting Tracking Settings */
316
-		'reporting' => apply_filters('monsterinsights_settings_reporting',
316
+		'reporting' => apply_filters( 'monsterinsights_settings_reporting',
317 317
 			array()
318 318
 		),
319 319
 		/** Notifications Tracking Settings */
320
-		'notifications' => apply_filters('monsterinsights_settings_notifications',
320
+		'notifications' => apply_filters( 'monsterinsights_settings_notifications',
321 321
 			array()
322 322
 		),
323 323
 		/** Compatibility Tracking Settings */
324
-		'compatibility' => apply_filters('monsterinsights_settings_compatibility',
324
+		'compatibility' => apply_filters( 'monsterinsights_settings_compatibility',
325 325
 			array(
326 326
 				'subdomain_tracking' => array(
327 327
 					'id'          => 'subdomain_tracking',
328 328
 					'name'        => __( 'Domain to track as:', 'google-analytics-for-wordpress' ),
329
-					'desc'        => sprintf( esc_html__( 'This allows you to %1$sset the domain%2$s that\'s used for tracking. Only is used if set to a value, else defaults to automatic determination. It is very rare that you would need to use this setting.', 'google-analytics-for-wordpress' ), '<a href="https://developers.google.com/analytics/devguides/collection/analyticsjs/tracking-snippet-reference" target="_blank" rel="noopener noreferrer" referrer="no-referrer">' ,'</a>' ),
329
+					'desc'        => sprintf( esc_html__( 'This allows you to %1$sset the domain%2$s that\'s used for tracking. Only is used if set to a value, else defaults to automatic determination. It is very rare that you would need to use this setting.', 'google-analytics-for-wordpress' ), '<a href="https://developers.google.com/analytics/devguides/collection/analyticsjs/tracking-snippet-reference" target="_blank" rel="noopener noreferrer" referrer="no-referrer">', '</a>' ),
330 330
 					'type' 		  => 'text',
331 331
 				),
332 332
 				'custom_code' => array(
@@ -338,18 +338,18 @@  discard block
 block discarded – undo
338 338
 				'debug_mode' => array(
339 339
 					'id'          => 'debug_mode',
340 340
 					'name'        => __( 'Enable Debug Mode', 'google-analytics-for-wordpress' ),
341
-					'desc'        => __( 'Turns on debugging in JS events tracking, logging of eCommerce requests and enables debug settings.', 'google-analytics-for-wordpress'),
341
+					'desc'        => __( 'Turns on debugging in JS events tracking, logging of eCommerce requests and enables debug settings.', 'google-analytics-for-wordpress' ),
342 342
 					'type' 		  => 'checkbox',
343 343
 				),
344 344
 			)
345 345
 		),
346 346
 		/** Permissions Tracking Settings */
347
-		'permissions' => apply_filters('monsterinsights_settings_permissions',
347
+		'permissions' => apply_filters( 'monsterinsights_settings_permissions',
348 348
 			array(
349 349
 				'view_reports' => array(
350 350
 					'id'          => 'view_reports',
351 351
 					'name'        => __( 'Let these user roles see reports (and the dashboard):', 'google-analytics-for-wordpress' ),
352
-					'desc'        => sprintf( esc_html( 'Users that have at least one of these roles will be able to view the reports and dashboard, along with any user with the %s capability.', 'google-analytics-for-wordpress' ), '<code>manage_options</code>'),
352
+					'desc'        => sprintf( esc_html( 'Users that have at least one of these roles will be able to view the reports and dashboard, along with any user with the %s capability.', 'google-analytics-for-wordpress' ), '<code>manage_options</code>' ),
353 353
 					'type'        => 'select',
354 354
 					'options'     => monsterinsights_get_roles(),
355 355
 					'select2'     => true,
@@ -359,7 +359,7 @@  discard block
 block discarded – undo
359 359
 				'save_settings' => array(
360 360
 					'id'          => 'save_settings',
361 361
 					'name'        => __( 'Let these user roles save settings:', 'google-analytics-for-wordpress' ),
362
-					'desc'        => sprintf( esc_html__( 'Users that have at least one of these roles will be able to view and save the settings panel, along with any user with the %s capability.', 'google-analytics-for-wordpress'), '<code>manage_options</code>' ),
362
+					'desc'        => sprintf( esc_html__( 'Users that have at least one of these roles will be able to view and save the settings panel, along with any user with the %s capability.', 'google-analytics-for-wordpress' ), '<code>manage_options</code>' ),
363 363
 					'type'        => 'select',
364 364
 					'options'     => monsterinsights_get_roles(),
365 365
 					'select2'     => true,
Please login to merge, or discard this patch.
includes/admin/tracking.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
 		$data['usercount']     = get_user_count();
75 75
 
76 76
 		// Retrieve current plugin information
77
-		if( ! function_exists( 'get_plugins' ) ) {
77
+		if ( ! function_exists( 'get_plugins' ) ) {
78 78
 			include ABSPATH . '/wp-admin/includes/plugin.php';
79 79
 		}
80 80
 
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
 		foreach ( $plugins as $key => $plugin ) {
85 85
 			if ( in_array( $plugin, $active_plugins ) ) {
86 86
 				// Remove active plugins from list so we can show active and inactive separately
87
-				unset( $plugins[ $key ] );
87
+				unset( $plugins[$key] );
88 88
 			}
89 89
 		}
90 90
 
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
 			return false;
103 103
 		}
104 104
 
105
-		if( ! $this->tracking_allowed() && ! $override ) {
105
+		if ( ! $this->tracking_allowed() && ! $override ) {
106 106
 			return false;
107 107
 		}
108 108
 
@@ -134,15 +134,15 @@  discard block
 block discarded – undo
134 134
 	public function schedule_send() {
135 135
 		if ( ! wp_next_scheduled( 'monsterinsights_usage_tracking_cron' ) ) {
136 136
 			$tracking             = array();
137
-			$tracking['day']      = rand( 0, 6  );
137
+			$tracking['day']      = rand( 0, 6 );
138 138
 			$tracking['hour']     = rand( 0, 23 );
139 139
 			$tracking['minute']   = rand( 0, 59 );
140 140
 			$tracking['second']   = rand( 0, 59 );
141
-			$tracking['offset']   = ( $tracking['day']    * DAY_IN_SECONDS    ) +
142
-									( $tracking['hour']   * HOUR_IN_SECONDS   ) +
141
+			$tracking['offset']   = ( $tracking['day'] * DAY_IN_SECONDS ) +
142
+									( $tracking['hour'] * HOUR_IN_SECONDS ) +
143 143
 									( $tracking['minute'] * MINUTE_IN_SECONDS ) +
144 144
 									 $tracking['second'];
145
-			$tracking['initsend'] = strtotime("next sunday") + $tracking['offset'];
145
+			$tracking['initsend'] = strtotime( "next sunday" ) + $tracking['offset'];
146 146
 
147 147
 			wp_schedule_event( $tracking['initsend'], 'weekly', 'monsterinsights_usage_tracking_cron' );
148 148
 			update_option( 'monsterinsights_usage_tracking_config', $tracking );
Please login to merge, or discard this patch.
includes/admin/api-auth.php 1 patch
Spacing   +48 added lines, -48 removed lines patch added patch discarded remove patch
@@ -28,16 +28,16 @@  discard block
 block discarded – undo
28 28
 	public function __construct() {
29 29
 
30 30
 		// Authentication Actions
31
-		add_action( 'wp_ajax_monsterinsights_maybe_authenticate',    array( $this, 'maybe_authenticate' ) );
32
-		add_action( 'wp_ajax_monsterinsights_maybe_reauthenticate',  array( $this, 'maybe_reauthenticate' ) );
33
-		add_action( 'wp_ajax_monsterinsights_maybe_verify',          array( $this, 'maybe_verify' ) );
34
-		add_action( 'wp_ajax_monsterinsights_maybe_delete',          array( $this, 'maybe_delete' ) );
31
+		add_action( 'wp_ajax_monsterinsights_maybe_authenticate', array( $this, 'maybe_authenticate' ) );
32
+		add_action( 'wp_ajax_monsterinsights_maybe_reauthenticate', array( $this, 'maybe_reauthenticate' ) );
33
+		add_action( 'wp_ajax_monsterinsights_maybe_verify', array( $this, 'maybe_verify' ) );
34
+		add_action( 'wp_ajax_monsterinsights_maybe_delete', array( $this, 'maybe_delete' ) );
35 35
 
36
-		add_action( 'admin_init',          							 array( $this, 'authenticate_listener' ) );
37
-		add_action( 'admin_init',          							 array( $this, 'reauthenticate_listener' ) );
36
+		add_action( 'admin_init', array( $this, 'authenticate_listener' ) );
37
+		add_action( 'admin_init', array( $this, 'reauthenticate_listener' ) );
38 38
 	}
39 39
 
40
-	public function get_tt(){
40
+	public function get_tt() {
41 41
 		$tt = is_network_admin() ? get_site_option( 'monsterinsights_network_tt', '' ) : get_option( 'monsterinsights_site_tt', '' );
42 42
 		if ( empty( $tt ) ) {
43 43
 			// if TT is empty, generate a new one, save it and then return it
@@ -47,12 +47,12 @@  discard block
 block discarded – undo
47 47
 		return $tt;
48 48
 	}
49 49
 	
50
-	public function rotate_tt(){
50
+	public function rotate_tt() {
51 51
 		$tt = $this->generate_tt();
52 52
 		is_network_admin() ? update_site_option( 'monsterinsights_network_tt', $tt ) : update_option( 'monsterinsights_site_tt', $tt );
53 53
 	}
54 54
 
55
-	public function generate_tt(){
55
+	public function generate_tt() {
56 56
 		return hash( 'sha512', wp_generate_password( 128, true, true ) . AUTH_SALT . uniqid( "", true ) );
57 57
 	}
58 58
 
@@ -61,14 +61,14 @@  discard block
 block discarded – undo
61 61
 		return hash_equals( $tt, $passed_tt );
62 62
 	}
63 63
 
64
-	public function maybe_authenticate(){
64
+	public function maybe_authenticate() {
65 65
 
66 66
 		// Check nonce
67 67
 		check_ajax_referer( 'mi-admin-nonce', 'nonce' );
68 68
 
69 69
 		// current user can authenticate
70 70
 		if ( ! current_user_can( 'monsterinsights_save_settings' ) ) {
71
-			wp_send_json_error( array(	'message' => __( "You don't have permission to authenticate MonsterInsights.", 'google-analytics-for-wordpress' ) ) );
71
+			wp_send_json_error( array( 'message' => __( "You don't have permission to authenticate MonsterInsights.", 'google-analytics-for-wordpress' ) ) );
72 72
 		}
73 73
 
74 74
 		if ( ! empty( $_REQUEST['isnetwork'] ) && $_REQUEST['isnetwork'] ) {
@@ -78,14 +78,14 @@  discard block
 block discarded – undo
78 78
 		// Only for Pro users, require a license key to be entered first so we can link to things.
79 79
 		$valid = is_network_admin() ? MonsterInsights()->license->is_network_licensed() : MonsterInsights()->license->is_site_licensed();
80 80
 		if ( monsterinsights_is_pro_version() && ! $valid ) {
81
-			wp_send_json_error( array(	'message' => __( "Cannot authenticate. Please enter a valid, active license key for MonsterInsights Pro into the settings.", 'google-analytics-for-wordpress' ) ) );
81
+			wp_send_json_error( array( 'message' => __( "Cannot authenticate. Please enter a valid, active license key for MonsterInsights Pro into the settings.", 'google-analytics-for-wordpress' ) ) );
82 82
 		}
83 83
 
84 84
 		// we do not have a current auth
85 85
 		if ( ! $this->is_network_admin() && MonsterInsights()->auth->is_authed() ) {
86
-			wp_send_json_error( array(	'message' => __( "Cannot authenticate. Please re-authenticate.", 'google-analytics-for-wordpress' ) ) );
86
+			wp_send_json_error( array( 'message' => __( "Cannot authenticate. Please re-authenticate.", 'google-analytics-for-wordpress' ) ) );
87 87
 		} else if ( $this->is_network_admin() && MonsterInsights()->auth->is_network_authed() ) {
88
-			wp_send_json_error( array(	'message' => __( "Cannot network authenticate. Please re-authenticate on the network settings panel.", 'google-analytics-for-wordpress' ) ) );
88
+			wp_send_json_error( array( 'message' => __( "Cannot network authenticate. Please re-authenticate on the network settings panel.", 'google-analytics-for-wordpress' ) ) );
89 89
 		}
90 90
 
91 91
 		$siteurl = add_query_arg( array(
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
 	}
107 107
 
108 108
 
109
-	public function authenticate_listener(){
109
+	public function authenticate_listener() {
110 110
 		// Make sure it's for us
111 111
 		if ( empty( $_REQUEST['mi-oauth-action'] ) || $_REQUEST['mi-oauth-action'] !== 'auth' ) {
112 112
 			return;
@@ -124,12 +124,12 @@  discard block
 block discarded – undo
124 124
 		}
125 125
 
126 126
 		// Make sure has required params
127
-		if ( empty( $_REQUEST['key'] )      ||
128
-			 empty( $_REQUEST['token'] )    ||
129
-			 empty( $_REQUEST['ua'] )       ||
130
-			 empty( $_REQUEST['miview'] )   ||
131
-			 empty( $_REQUEST['a'] )        ||
132
-			 empty( $_REQUEST['w'] )        ||
127
+		if ( empty( $_REQUEST['key'] ) ||
128
+			 empty( $_REQUEST['token'] ) ||
129
+			 empty( $_REQUEST['ua'] ) ||
130
+			 empty( $_REQUEST['miview'] ) ||
131
+			 empty( $_REQUEST['a'] ) ||
132
+			 empty( $_REQUEST['w'] ) ||
133 133
 			 empty( $_REQUEST['p'] )
134 134
 		) {
135 135
 			return;
@@ -166,7 +166,7 @@  discard block
 block discarded – undo
166 166
 		$where = $this->is_network_admin() ? 'network' : 'site';
167 167
 		MonsterInsights()->reporting->delete_aggregate_data( $where );
168 168
 
169
-		$url = $this->is_network_admin() ? network_admin_url( 'admin.php?page=monsterinsights_network' )  : admin_url( 'admin.php?page=monsterinsights_settings' ) ;
169
+		$url = $this->is_network_admin() ? network_admin_url( 'admin.php?page=monsterinsights_network' ) : admin_url( 'admin.php?page=monsterinsights_settings' );
170 170
 		$url = add_query_arg( array(
171 171
 			 'mi_action' => 'auth',
172 172
 			 'success'   => 'true',
@@ -175,14 +175,14 @@  discard block
 block discarded – undo
175 175
 		exit;
176 176
 	}
177 177
 
178
-	public function maybe_reauthenticate(){
178
+	public function maybe_reauthenticate() {
179 179
 
180 180
 		// Check nonce
181 181
 		check_ajax_referer( 'mi-admin-nonce', 'nonce' );
182 182
 
183 183
 		// current user can authenticate
184 184
 		if ( ! current_user_can( 'monsterinsights_save_settings' ) ) {
185
-			wp_send_json_error( array(	'message' => __( "You don't have permission to re-authenticate MonsterInsights.", 'google-analytics-for-wordpress' ) ) );
185
+			wp_send_json_error( array( 'message' => __( "You don't have permission to re-authenticate MonsterInsights.", 'google-analytics-for-wordpress' ) ) );
186 186
 		}
187 187
 
188 188
 		if ( ! empty( $_REQUEST['isnetwork'] ) && $_REQUEST['isnetwork'] ) {
@@ -192,14 +192,14 @@  discard block
 block discarded – undo
192 192
 		// Only for Pro users, require a license key to be entered first so we can link to things.
193 193
 		$valid = is_network_admin() ? MonsterInsights()->license->is_network_licensed() : MonsterInsights()->license->is_site_licensed();
194 194
 		if ( monsterinsights_is_pro_version() && ! $valid ) {
195
-			wp_send_json_error( array(	'message' => __( "Cannot re-authenticate. Please enter a valid, active license key for MonsterInsights Pro into the settings.", 'google-analytics-for-wordpress' ) ) );
195
+			wp_send_json_error( array( 'message' => __( "Cannot re-authenticate. Please enter a valid, active license key for MonsterInsights Pro into the settings.", 'google-analytics-for-wordpress' ) ) );
196 196
 		}
197 197
 
198 198
 		// we do have a current auth
199 199
 		if ( ! $this->is_network_admin() && ! MonsterInsights()->auth->is_authed() ) {
200
-			wp_send_json_error( array(	'message' => __( "Cannot re-authenticate. Please authenticate.", 'google-analytics-for-wordpress' ) ) );
200
+			wp_send_json_error( array( 'message' => __( "Cannot re-authenticate. Please authenticate.", 'google-analytics-for-wordpress' ) ) );
201 201
 		} else if ( $this->is_network_admin() && ! MonsterInsights()->auth->is_network_authed() ) {
202
-			wp_send_json_error( array(	'message' => __( "Cannot re-authenticate the network. Please authenticate on the network settings panel.", 'google-analytics-for-wordpress' ) ) );
202
+			wp_send_json_error( array( 'message' => __( "Cannot re-authenticate the network. Please authenticate on the network settings panel.", 'google-analytics-for-wordpress' ) ) );
203 203
 		}
204 204
 
205 205
 		$siteurl = add_query_arg( array(
@@ -222,7 +222,7 @@  discard block
 block discarded – undo
222 222
 		wp_send_json_success( array( 'redirect' => $siteurl ) );
223 223
 	}
224 224
 
225
-	public function reauthenticate_listener(){
225
+	public function reauthenticate_listener() {
226 226
 		// Make sure it's for us
227 227
 		if ( empty( $_REQUEST['mi-oauth-action'] ) || $_REQUEST['mi-oauth-action'] !== 'reauth' ) {
228 228
 			return;
@@ -240,10 +240,10 @@  discard block
 block discarded – undo
240 240
 
241 241
 		// Make sure has required params
242 242
 		if (
243
-			 empty( $_REQUEST['ua'] )       ||
244
-			 empty( $_REQUEST['miview'] )   ||
245
-			 empty( $_REQUEST['a'] )        ||
246
-			 empty( $_REQUEST['w'] )        ||
243
+			 empty( $_REQUEST['ua'] ) ||
244
+			 empty( $_REQUEST['miview'] ) ||
245
+			 empty( $_REQUEST['a'] ) ||
246
+			 empty( $_REQUEST['w'] ) ||
247 247
 			 empty( $_REQUEST['p'] )       
248 248
 		) {
249 249
 			return;
@@ -281,7 +281,7 @@  discard block
 block discarded – undo
281 281
 		$where = $this->is_network_admin() ? 'network' : 'site';
282 282
 		MonsterInsights()->reporting->delete_aggregate_data( $where );
283 283
 
284
-		$url = $this->is_network_admin() ? network_admin_url( 'admin.php?page=monsterinsights_network' )  : admin_url( 'admin.php?page=monsterinsights_settings' ) ;
284
+		$url = $this->is_network_admin() ? network_admin_url( 'admin.php?page=monsterinsights_network' ) : admin_url( 'admin.php?page=monsterinsights_settings' );
285 285
 		$url = add_query_arg( array(
286 286
 			 'mi_action' => 'reauth',
287 287
 			 'success'   => 'true',
@@ -290,14 +290,14 @@  discard block
 block discarded – undo
290 290
 		exit;
291 291
 	}
292 292
 
293
-	public function maybe_verify(){
293
+	public function maybe_verify() {
294 294
 
295 295
 		// Check nonce
296 296
 		check_ajax_referer( 'mi-admin-nonce', 'nonce' );
297 297
 
298 298
 		// current user can verify
299 299
 		if ( ! current_user_can( 'monsterinsights_save_settings' ) ) {
300
-			wp_send_json_error( array(	'message' => __( "You don't have permission to verify MonsterInsights.", 'google-analytics-for-wordpress' ) ) );
300
+			wp_send_json_error( array( 'message' => __( "You don't have permission to verify MonsterInsights.", 'google-analytics-for-wordpress' ) ) );
301 301
 		}
302 302
 
303 303
 		if ( ! empty( $_REQUEST['isnetwork'] ) && $_REQUEST['isnetwork'] ) {
@@ -306,25 +306,25 @@  discard block
 block discarded – undo
306 306
 
307 307
 		// we have an auth to verify
308 308
 		if ( $this->is_network_admin() && ! MonsterInsights()->auth->is_network_authed() ) {
309
-			wp_send_json_error( array(	'message' => __( "Cannot verify. Please authenticate.", 'google-analytics-for-wordpress' ) ) );
309
+			wp_send_json_error( array( 'message' => __( "Cannot verify. Please authenticate.", 'google-analytics-for-wordpress' ) ) );
310 310
 		} else if ( ! $this->is_network_admin() && ! MonsterInsights()->auth->is_authed() ) {
311
-			wp_send_json_error( array(	'message' => __( "Cannot verify. Please authenticate.", 'google-analytics-for-wordpress' ) ) );
311
+			wp_send_json_error( array( 'message' => __( "Cannot verify. Please authenticate.", 'google-analytics-for-wordpress' ) ) );
312 312
 		}
313 313
 
314 314
 		$valid = is_network_admin() ? MonsterInsights()->license->is_network_licensed() : MonsterInsights()->license->is_site_licensed();
315 315
 		if ( monsterinsights_is_pro_version() && ! $valid ) {
316
-			wp_send_json_error( array(	'message' => __( "Cannot verify. Please enter a valid, active license key for MonsterInsights Pro into the settings.", 'google-analytics-for-wordpress' ) ) );
316
+			wp_send_json_error( array( 'message' => __( "Cannot verify. Please enter a valid, active license key for MonsterInsights Pro into the settings.", 'google-analytics-for-wordpress' ) ) );
317 317
 		}
318 318
 
319 319
 		$worked = $this->verify_auth();
320
-		if ( $worked && ! is_wp_error(  $worked ) ) {
320
+		if ( $worked && ! is_wp_error( $worked ) ) {
321 321
 			wp_send_json_success( array( 'message' => __( "Successfully verified.", 'google-analytics-for-wordpress' ) ) );
322 322
 		} else {
323 323
 			wp_send_json_error( array( 'message' => __( "Could not verify.", 'google-analytics-for-wordpress' ) ) );
324 324
 		}
325 325
 	}
326 326
 
327
-	public function verify_auth( $credentials = array() ){
327
+	public function verify_auth( $credentials = array() ) {
328 328
 		$creds = ! empty( $credentials ) ? $credentials : ( $this->is_network_admin() ? MonsterInsights()->auth->get_network_analytics_profile( true ) : MonsterInsights()->auth->get_analytics_profile( true ) );
329 329
 
330 330
 		if ( empty( $creds['key'] ) ) {
@@ -341,14 +341,14 @@  discard block
 block discarded – undo
341 341
 		}
342 342
 	}
343 343
 
344
-	public function maybe_delete(){
344
+	public function maybe_delete() {
345 345
 
346 346
 		// Check nonce
347 347
 		check_ajax_referer( 'mi-admin-nonce', 'nonce' );
348 348
 
349 349
 		// current user can delete
350 350
 		if ( ! current_user_can( 'monsterinsights_save_settings' ) ) {
351
-			wp_send_json_error( array(	'message' => __( "You don't have permission to deauthenticate MonsterInsights.", 'google-analytics-for-wordpress' ) ) );
351
+			wp_send_json_error( array( 'message' => __( "You don't have permission to deauthenticate MonsterInsights.", 'google-analytics-for-wordpress' ) ) );
352 352
 		}
353 353
 
354 354
 		if ( ! empty( $_REQUEST['isnetwork'] ) && $_REQUEST['isnetwork'] ) {
@@ -357,20 +357,20 @@  discard block
 block discarded – undo
357 357
 
358 358
 		// we have an auth to delete
359 359
 		if ( $this->is_network_admin() && ! MonsterInsights()->auth->is_network_authed() ) {
360
-			wp_send_json_error( array(	'message' => __( "Cannot deauthenticate. You are not currently authed.", 'google-analytics-for-wordpress' ) ) );
360
+			wp_send_json_error( array( 'message' => __( "Cannot deauthenticate. You are not currently authed.", 'google-analytics-for-wordpress' ) ) );
361 361
 		} else if ( ! $this->is_network_admin() && ! MonsterInsights()->auth->is_authed() ) {
362
-			wp_send_json_error( array(	'message' => __( "Cannot deauthenticate. You are not currently authed.", 'google-analytics-for-wordpress' ) ) );
362
+			wp_send_json_error( array( 'message' => __( "Cannot deauthenticate. You are not currently authed.", 'google-analytics-for-wordpress' ) ) );
363 363
 		}
364 364
 
365 365
 		$valid = is_network_admin() ? MonsterInsights()->license->is_network_licensed() : MonsterInsights()->license->is_site_licensed();
366 366
 		if ( monsterinsights_is_pro_version() && ! $valid ) {
367
-			wp_send_json_error( array(	'message' => __( "Cannot deauthenticate. Please enter a valid, active license key for MonsterInsights Pro into the settings.", 'google-analytics-for-wordpress' ) ) );
367
+			wp_send_json_error( array( 'message' => __( "Cannot deauthenticate. Please enter a valid, active license key for MonsterInsights Pro into the settings.", 'google-analytics-for-wordpress' ) ) );
368 368
 		}
369 369
 
370 370
 		$force = ! empty( $_REQUEST['forcedelete'] ) && $_REQUEST['forcedelete'] === 'true';
371 371
 
372 372
 		$worked = $this->delete_auth( $force );
373
-		if ( $worked && ! is_wp_error(  $worked ) ) {
373
+		if ( $worked && ! is_wp_error( $worked ) ) {
374 374
 			wp_send_json_success( array( 'message' => __( "Successfully deauthenticated.", 'google-analytics-for-wordpress' ) ) );
375 375
 		} else {
376 376
 			if ( $force ) {
@@ -381,7 +381,7 @@  discard block
 block discarded – undo
381 381
 		}
382 382
 	}
383 383
 
384
-	public function delete_auth( $force = false ){
384
+	public function delete_auth( $force = false ) {
385 385
 		if ( $this->is_network_admin() && ! MonsterInsights()->auth->is_network_authed() ) {
386 386
 			return false;
387 387
 		} else if ( ! $this->is_network_admin() && ! MonsterInsights()->auth->is_authed() ) {
@@ -425,6 +425,6 @@  discard block
 block discarded – undo
425 425
 	}
426 426
 
427 427
 	public function get_sitei() {
428
-		return  mb_strimwidth( rtrim( ltrim( sanitize_text_field( preg_replace('/[^a-zA-Z0-9]/', '', AUTH_KEY . SECURE_AUTH_KEY . LOGGED_IN_KEY )  ) ) ), 0, 30 );
428
+		return  mb_strimwidth( rtrim( ltrim( sanitize_text_field( preg_replace( '/[^a-zA-Z0-9]/', '', AUTH_KEY . SECURE_AUTH_KEY . LOGGED_IN_KEY ) ) ) ), 0, 30 );
429 429
 	}
430 430
 }
431 431
\ No newline at end of file
Please login to merge, or discard this patch.
includes/install.php 1 patch
Spacing   +38 added lines, -38 removed lines patch added patch discarded remove patch
@@ -306,9 +306,9 @@  discard block
 block discarded – undo
306 306
 		// Fallback to make sure every default option has a value
307 307
 		$defaults = $this->get_yoast_default_values();
308 308
 		if ( is_array( $defaults ) ) {
309
-			foreach ( $defaults[ 'ga_general' ] as $key => $value ) {
310
-				if ( ! isset( $options[ $key ] ) ) {
311
-					$options[ $key ] = $value;
309
+			foreach ( $defaults['ga_general'] as $key => $value ) {
310
+				if ( ! isset( $options[$key] ) ) {
311
+					$options[$key] = $value;
312 312
 				}
313 313
 			}
314 314
 		}
@@ -316,7 +316,7 @@  discard block
 block discarded – undo
316 316
 		// Set to the current version now that we've done all needed upgrades
317 317
 		$options['version'] = '5.5.3'; // Last Yoast codebase version
318 318
 		$saved_options = get_option( 'yst_ga' );
319
-		$saved_options[ 'ga_general' ] = $options;
319
+		$saved_options['ga_general'] = $options;
320 320
 		update_option( 'yst_ga', $saved_options );
321 321
 
322 322
 
@@ -326,8 +326,8 @@  discard block
 block discarded – undo
326 326
 			$network = false;
327 327
 			// Try network active Premium
328 328
 			$is_key = get_site_option( 'google-analytics-by-yoast-premium_license', array() );
329
-			if ( $is_key && ! empty( $is_key ) && is_array( $is_key ) && ! empty( $is_key['key'] ) && is_multisite() ){
330
-				$key    = $is_key['key'];
329
+			if ( $is_key && ! empty( $is_key ) && is_array( $is_key ) && ! empty( $is_key['key'] ) && is_multisite() ) {
330
+				$key = $is_key['key'];
331 331
 				$found = true;
332 332
 				$network = true;
333 333
 			}
@@ -335,8 +335,8 @@  discard block
 block discarded – undo
335 335
 			// Try single site Premium
336 336
 			if ( ! $found ) {
337 337
 				$is_key = get_option( 'google-analytics-by-yoast-premium_license', array() );
338
-				if ( $is_key && ! empty( $is_key ) && is_array( $is_key ) && ! empty( $is_key['key'] ) ){
339
-					$key    = $is_key['key'];
338
+				if ( $is_key && ! empty( $is_key ) && is_array( $is_key ) && ! empty( $is_key['key'] ) ) {
339
+					$key = $is_key['key'];
340 340
 					$found = true;
341 341
 				}				
342 342
 			}
@@ -344,8 +344,8 @@  discard block
 block discarded – undo
344 344
 			// Try network active Premium
345 345
 			if ( ! $found ) {
346 346
 				$is_key = get_site_option( 'monsterinsights-pro_license', array() );
347
-				if ( $is_key && ! empty( $is_key ) && is_array( $is_key ) && ! empty( $is_key['key'] ) && is_multisite() ){
348
-					$key    = $is_key['key'];
347
+				if ( $is_key && ! empty( $is_key ) && is_array( $is_key ) && ! empty( $is_key['key'] ) && is_multisite() ) {
348
+					$key = $is_key['key'];
349 349
 					$found = true;
350 350
 					$network = true;
351 351
 				}				
@@ -354,8 +354,8 @@  discard block
 block discarded – undo
354 354
 			// Try single site Premium
355 355
 			if ( ! $found ) {
356 356
 				$is_key = get_option( 'monsterinsights-pro_license', array() );
357
-				if ( $is_key && ! empty( $is_key ) && is_array( $is_key ) && ! empty( $is_key['key'] ) ){
358
-					$key    = $is_key['key'];
357
+				if ( $is_key && ! empty( $is_key ) && is_array( $is_key ) && ! empty( $is_key['key'] ) ) {
358
+					$key = $is_key['key'];
359 359
 					$found = true;
360 360
 				}				
361 361
 			}
@@ -363,8 +363,8 @@  discard block
 block discarded – undo
363 363
 			// Try network active ecommmerce
364 364
 			if ( ! $found ) {
365 365
 				$is_key = get_site_option( 'ecommerce-addon_license', array() );
366
-				if ( $is_key && ! empty( $is_key ) && is_array( $is_key ) && ! empty( $is_key['key'] ) && is_multisite() ){
367
-					$key    = $is_key['key'];
366
+				if ( $is_key && ! empty( $is_key ) && is_array( $is_key ) && ! empty( $is_key['key'] ) && is_multisite() ) {
367
+					$key = $is_key['key'];
368 368
 					$found = true;
369 369
 					$network = true;
370 370
 				}
@@ -372,8 +372,8 @@  discard block
 block discarded – undo
372 372
 			// Try single site ecommerce
373 373
 			if ( ! $found ) {
374 374
 				$is_key = get_option( 'ecommerce-addon_license', array() );
375
-				if ( $is_key && ! empty( $is_key ) && is_array( $is_key ) && ! empty( $is_key['key'] ) ){
376
-					$key    = $is_key['key'];
375
+				if ( $is_key && ! empty( $is_key ) && is_array( $is_key ) && ! empty( $is_key['key'] ) ) {
376
+					$key = $is_key['key'];
377 377
 					$found = true;
378 378
 				}				
379 379
 			}
@@ -488,10 +488,10 @@  discard block
 block discarded – undo
488 488
 							}
489 489
 						}
490 490
 					}
491
-					$options['cron_last_run'] = strtotime("-25 hours");
491
+					$options['cron_last_run'] = strtotime( "-25 hours" );
492 492
 				} else {
493 493
 					// if UA in manual code field, remove analytics profile fields if set
494
-					if ( ! empty( $options['manual_ua_code_field' ] ) ) {
494
+					if ( ! empty( $options['manual_ua_code_field'] ) ) {
495 495
 						if ( isset( $options['analytics_profile_code'] ) ) {
496 496
 							unset( $options['analytics_profile_code'] );
497 497
 						}
@@ -502,7 +502,7 @@  discard block
 block discarded – undo
502 502
 						delete_option( 'yoast-ga-access_token' );
503 503
 						delete_option( 'yoast-ga-refresh_token' );
504 504
 						delete_option( 'yst_ga_api' );
505
-					} else if ( ! empty( $options['analytics_profile_code' ] ) ) {
505
+					} else if ( ! empty( $options['analytics_profile_code'] ) ) {
506 506
 					// if UA in profile fields, remove others and use that
507 507
 						$options['manual_ua_code'] = $options['analytics_profile_code'];
508 508
 						if ( isset( $options['analytics_profile_code'] ) ) {
@@ -514,13 +514,13 @@  discard block
 block discarded – undo
514 514
 						delete_option( 'yoast-ga-access_token' );
515 515
 						delete_option( 'yoast-ga-refresh_token' );
516 516
 						delete_option( 'yst_ga_api' );
517
-					}  else {
517
+					} else {
518 518
 					// if UA in profile profiles, remove others and use that
519
-						if ( ! empty( $options['analytics_profile' ] ) && ! empty( $profiles['ga_api_response_accounts'] ) && is_array( $profiles['ga_api_response_accounts'] ) ) {
519
+						if ( ! empty( $options['analytics_profile'] ) && ! empty( $profiles['ga_api_response_accounts'] ) && is_array( $profiles['ga_api_response_accounts'] ) ) {
520 520
 							foreach ( $profiles as $account ) {
521 521
 								foreach ( $account['items'] as $profile ) {
522 522
 									foreach ( $profile['items'] as $subprofile ) {
523
-										if ( isset( $subprofile['id'] ) && $subprofile['id'] == $options['analytics_profile' ] ) {
523
+										if ( isset( $subprofile['id'] ) && $subprofile['id'] == $options['analytics_profile'] ) {
524 524
 											$options['manual_ua_code'] = $subprofile['ua_code'];
525 525
 											break 3;
526 526
 										}
@@ -640,8 +640,8 @@  discard block
 block discarded – undo
640 640
 	 */
641 641
 	public function v602_upgrades() {
642 642
 		$options = get_option( 'yst_ga', array() );
643
-		if ( ( empty( $this->new_settings[ 'manual_ua_code'] ) || $this->new_settings[ 'manual_ua_code']  === '1' )  &&  
644
-			 empty( $this->new_settings[ 'analytics_profile_code'] ) &&
643
+		if ( ( empty( $this->new_settings['manual_ua_code'] ) || $this->new_settings['manual_ua_code'] === '1' ) &&  
644
+			 empty( $this->new_settings['analytics_profile_code'] ) &&
645 645
 			 ! empty( $options ) &&
646 646
 			 is_array( $options ) &&
647 647
 			 ! empty( $options['ga_general']['manual_ua_code_field'] )
@@ -689,8 +689,8 @@  discard block
 block discarded – undo
689 689
 	 */
690 690
 	public function v620_upgrades() {
691 691
 		// Turns off debug mode if its on.
692
-		if ( empty( $this->new_settings['debug_mode' ] ) ) {
693
-			$this->new_settings['debug_mode' ] = 0;
692
+		if ( empty( $this->new_settings['debug_mode'] ) ) {
693
+			$this->new_settings['debug_mode'] = 0;
694 694
 		}
695 695
 	}
696 696
 
@@ -727,25 +727,25 @@  discard block
 block discarded – undo
727 727
 
728 728
 		// 3. Default all event tracking and tracking to GA + JS respectively
729 729
 			// 3a Set tracking_mode to use analytics.js
730
-			$this->new_settings['tracking_mode' ] = 'analytics';
730
+			$this->new_settings['tracking_mode'] = 'analytics';
731 731
 			
732 732
 
733 733
 			// 3b Set events mode to use JS if the events mode is not set explicitly to none
734
-			if ( empty( $this->new_settings['events_mode' ] ) || $this->new_settings['events_mode' ] !== 'none' ) {
735
-				$this->new_settings['events_mode' ] = 'js';
734
+			if ( empty( $this->new_settings['events_mode'] ) || $this->new_settings['events_mode'] !== 'none' ) {
735
+				$this->new_settings['events_mode'] = 'js';
736 736
 			}
737 737
 
738 738
 		// 4. Migrate manual UA codes
739 739
 			// 4a Manual UA has the lowest priority
740
-			if ( ! empty( $this->new_settings['manual_ua_code' ] ) ) {
740
+			if ( ! empty( $this->new_settings['manual_ua_code'] ) ) {
741 741
 				// Set as manual UA code
742
-				is_network_admin() ? update_site_option( 'monsterinsights_network_profile', array( 'manual' => $this->new_settings['manual_ua_code' ] ) ) : update_option( 'monsterinsights_site_profile', array( 'manual' => $this->new_settings['manual_ua_code' ] ) );
742
+				is_network_admin() ? update_site_option( 'monsterinsights_network_profile', array( 'manual' => $this->new_settings['manual_ua_code'] ) ) : update_option( 'monsterinsights_site_profile', array( 'manual' => $this->new_settings['manual_ua_code'] ) );
743 743
 			}
744 744
 
745 745
 			// 4b Then try the oAuth UA code
746
-			if ( ! empty( $this->new_settings['analytics_profile_code' ] ) ) {
746
+			if ( ! empty( $this->new_settings['analytics_profile_code'] ) ) {
747 747
 				// Set as manual UA code
748
-				is_network_admin() ? update_site_option( 'monsterinsights_network_profile', array( 'manual' => $this->new_settings['analytics_profile_code' ] ) ) : update_option( 'monsterinsights_site_profile', array( 'manual' => $this->new_settings['analytics_profile_code' ] ) );
748
+				is_network_admin() ? update_site_option( 'monsterinsights_network_profile', array( 'manual' => $this->new_settings['analytics_profile_code'] ) ) : update_option( 'monsterinsights_site_profile', array( 'manual' => $this->new_settings['analytics_profile_code'] ) );
749 749
 			}
750 750
 
751 751
 		// 5. Migrate License keys
@@ -773,8 +773,8 @@  discard block
 block discarded – undo
773 773
 							'grids', 'icl_post_language', 'mlcf_email', 'mlcf_name', 'navigation-skins', 'page', 'punch-fonts', 'return_tab', 'skins',
774 774
 							'wpcf_email', 'wpcf_your_name' );
775 775
 		foreach ( $settings as $setting ) {
776
-			if ( ! empty( $this->new_settings[ $setting ] ) ) {
777
-				unset( $this->new_settings[ $setting ] );
776
+			if ( ! empty( $this->new_settings[$setting] ) ) {
777
+				unset( $this->new_settings[$setting] );
778 778
 			}
779 779
 		}
780 780
 
@@ -797,11 +797,11 @@  discard block
 block discarded – undo
797 797
 		// 5. Remove deprecated settings
798 798
 		$settings = array( '_repeated', 'ajax', 'asmselect0', 'bawac_force_nonce', 'cf_email', 'cf_message', 'cf_name', 'cf_number',
799 799
 							'cf_phone', 'cf_subject', 'credentials', 'cron_failed', 'cron_last_run', 'firebug_lite', 'global-css', 'google_auth_code', 
800
-							'grids', 'icl_post_language', 'mlcf_email', 'mlcf_name','navigation-skins', 'page', 'punch-fonts', 'return_tab', 'skins',
800
+							'grids', 'icl_post_language', 'mlcf_email', 'mlcf_name', 'navigation-skins', 'page', 'punch-fonts', 'return_tab', 'skins',
801 801
 							'wpcf_email', 'wpcf_your_name' );
802 802
 		foreach ( $settings as $setting ) {
803
-			if ( ! empty( $this->new_settings[ $setting ] ) ) {
804
-				unset( $this->new_settings[ $setting ] );
803
+			if ( ! empty( $this->new_settings[$setting] ) ) {
804
+				unset( $this->new_settings[$setting] );
805 805
 			}
806 806
 		}
807 807
 
Please login to merge, or discard this patch.
lite/includes/admin/settings.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
 			$settings['social']['social_notice'] = array( 
12 12
 				'id' => 'social_notice',
13 13
 				'no_label' => true,
14
-				'name' => __( 'Want to increase your traffic, conversion, & engagement?', 'google-analytics-for-wordpress'),
14
+				'name' => __( 'Want to increase your traffic, conversion, & engagement?', 'google-analytics-for-wordpress' ),
15 15
 				'type' => 'upgrade_notice',
16 16
 				'desc' => esc_html__( "By upgrading to MonsterInsights Pro, you can add Social tracking to see who's clicking on your social share links, so you can track and maximize your social sharing exposure.", 'google-analytics-for-wordpress' )
17 17
 			);
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
 			$settings['ads']['ads_notice'] = array( 
21 21
 				'id' => 'ads_notice',
22 22
 				'no_label' => true,
23
-				'name' => __( 'Want to increase your traffic, conversion, & engagement?', 'google-analytics-for-wordpress'),
23
+				'name' => __( 'Want to increase your traffic, conversion, & engagement?', 'google-analytics-for-wordpress' ),
24 24
 				'type' => 'upgrade_notice',
25 25
 				'desc' => esc_html__( "By upgrading to MonsterInsights Pro, you can add Ads tracking to see who's clicking on your Google Ads, so you can increase your revenue.", 'google-analytics-for-wordpress' )
26 26
 			);
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
 			$settings['forms']['forms_notice'] = array( 
30 30
 				'id' => 'forms_notice',
31 31
 				'no_label' => true,
32
-				'name' => __( 'Want to increase your traffic, conversion, & engagement?', 'google-analytics-for-wordpress'),
32
+				'name' => __( 'Want to increase your traffic, conversion, & engagement?', 'google-analytics-for-wordpress' ),
33 33
 				'type' => 'upgrade_notice',
34 34
 				'desc' => esc_html__( "By upgrading to MonsterInsights Pro, you can add Forms tracking to see who's seeing and submitting your forms, so you can increase your conversion rate.", 'google-analytics-for-wordpress' )
35 35
 			);
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
 			$settings['media']['media_notice'] = array( 
39 39
 				'id' => 'media_notice',
40 40
 				'no_label' => true,
41
-				'name' => __( 'Want to increase your traffic, conversion, & engagement?', 'google-analytics-for-wordpress'),
41
+				'name' => __( 'Want to increase your traffic, conversion, & engagement?', 'google-analytics-for-wordpress' ),
42 42
 				'type' => 'upgrade_notice',
43 43
 				'desc' => esc_html__( "By upgrading to MonsterInsights Pro, you can add Media tracking to see who's interacting with the media on your site, so you know what your users are most interested in on your site. You can use this to tailor future content to meet your audience's interest to promote repeat visitors and expand your average user's time spent visiting your website on each visit.", 'google-analytics-for-wordpress' )
44 44
 			);
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
 			$settings['membership']['membership_notice'] = array( 
48 48
 				'id' => 'membership_notice',
49 49
 				'no_label' => true,
50
-				'name' => __( 'Want to increase your traffic, conversion, & engagement?', 'google-analytics-for-wordpress'),
50
+				'name' => __( 'Want to increase your traffic, conversion, & engagement?', 'google-analytics-for-wordpress' ),
51 51
 				'type' => 'upgrade_notice',
52 52
 				'desc' => esc_html__( "By upgrading to MonsterInsights Pro, you can add Membership tracking.", 'google-analytics-for-wordpress' )
53 53
 			);
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
 			$settings['dimensions']['dimensions_notice'] = array( 
57 57
 				'id' => 'dimensions_notice',
58 58
 				'no_label' => true,
59
-				'name' => __( 'Want to increase your traffic, conversion, & engagement?', 'google-analytics-for-wordpress'),
59
+				'name' => __( 'Want to increase your traffic, conversion, & engagement?', 'google-analytics-for-wordpress' ),
60 60
 				'type' => 'upgrade_notice',
61 61
 				'desc' => esc_html__( "By upgrading to MonsterInsights Pro, you can add Custom Dimensions and track who's the most popular author on your site, which post types get the most traffic, and more. Why not check it out?", 'google-analytics-for-wordpress' )
62 62
 			);
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
 			$settings['performance']['performance_notice'] = array( 
66 66
 				'id' => 'performance_notice',
67 67
 				'no_label' => true,
68
-				'name' => __( 'Want to increase your traffic, conversion, & engagement?', 'google-analytics-for-wordpress'),
68
+				'name' => __( 'Want to increase your traffic, conversion, & engagement?', 'google-analytics-for-wordpress' ),
69 69
 				'type' => 'upgrade_notice',
70 70
 				'desc' => esc_html__( "By upgrading to MonsterInsights Pro, you can adjust the sample rate so you don't exceed Google Analytics' processing limit. You can also use it to enable Google Optimize for A/B testing and personalization.", 'google-analytics-for-wordpress' )
71 71
 			);
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
 			$settings['reporting']['reporting_notice'] = array( 
75 75
 				'id' => 'reporting_notice',
76 76
 				'no_label' => true,
77
-				'name' => __( 'Want to increase your traffic, conversion, & engagement?', 'google-analytics-for-wordpress'),
77
+				'name' => __( 'Want to increase your traffic, conversion, & engagement?', 'google-analytics-for-wordpress' ),
78 78
 				'type' => 'upgrade_notice',
79 79
 				'desc' => esc_html__( "By upgrading to MonsterInsights Pro, you can enable enhanced reporting.", 'google-analytics-for-wordpress' )
80 80
 			);
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
 			$settings['amp']['amp_notice'] = array( 
84 84
 				'id' => 'amp_notice',
85 85
 				'no_label' => true,
86
-				'name' => __( 'Want to use track users visiting your AMP pages?', 'google-analytics-for-wordpress'),
86
+				'name' => __( 'Want to use track users visiting your AMP pages?', 'google-analytics-for-wordpress' ),
87 87
 				'type' => 'upgrade_notice',
88 88
 				'desc' => esc_html__( "By upgrading to MonsterInsights Pro, you can enable AMP page tracking.", 'google-analytics-for-wordpress' )
89 89
 			);
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
 			$settings['goptimize']['goptimize_notice'] = array( 
93 93
 				'id' => 'goptimize_notice',
94 94
 				'no_label' => true,
95
-				'name' => __( 'Want to use Google Optimize to retarget your website visitors and perform A/B split tests with ease?', 'google-analytics-for-wordpress'),
95
+				'name' => __( 'Want to use Google Optimize to retarget your website visitors and perform A/B split tests with ease?', 'google-analytics-for-wordpress' ),
96 96
 				'type' => 'upgrade_notice',
97 97
 				'desc' => esc_html__( "By upgrading to MonsterInsights Pro, you can enable Google Optimize.", 'google-analytics-for-wordpress' )
98 98
 			);
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
 			$settings['fbia']['fbia_notice'] = array( 
102 102
 				'id' => 'fbia_notice',
103 103
 				'no_label' => true,
104
-				'name' => __( 'Want to expand your website audience beyond your website with Facebook Instant Articles?', 'google-analytics-for-wordpress'),
104
+				'name' => __( 'Want to expand your website audience beyond your website with Facebook Instant Articles?', 'google-analytics-for-wordpress' ),
105 105
 				'type' => 'upgrade_notice',
106 106
 				'desc' => esc_html__( "By upgrading to MonsterInsights Pro, you can track your Facebook Instant Article visitors with MonsterInsights.", 'google-analytics-for-wordpress' )
107 107
 			);
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
 			$settings['bounce']['bounce_notice'] = array( 
111 111
 				'id' => 'bounce_notice',
112 112
 				'no_label' => true,
113
-				'name' => __( 'Want to adjust your website bounce rate?', 'google-analytics-for-wordpress'),
113
+				'name' => __( 'Want to adjust your website bounce rate?', 'google-analytics-for-wordpress' ),
114 114
 				'type' => 'upgrade_notice',
115 115
 				'desc' => esc_html__( "By upgrading to MonsterInsights Pro, you can adjust your Google Analytics bounce rate with MonsterInsights.", 'google-analytics-for-wordpress' )
116 116
 			);
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
 			$settings['notifications']['notifications_notice'] = array( 
120 120
 				'id' => 'notifications_notice',
121 121
 				'no_label' => true,
122
-				'name' => __( 'Want to increase your traffic, conversion, & engagement?', 'google-analytics-for-wordpress'),
122
+				'name' => __( 'Want to increase your traffic, conversion, & engagement?', 'google-analytics-for-wordpress' ),
123 123
 				'type' => 'upgrade_notice',
124 124
 				'desc' => esc_html__( "By upgrading to MonsterInsights Pro, you can enable notifications.", 'google-analytics-for-wordpress' )
125 125
 			);
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
 			$settings['ecommerce']['ecommerce_notice'] = array( 
129 129
 				'id' => 'ecommerce_notice',
130 130
 				'no_label' => true,
131
-				'name' => __( 'Want to increase your traffic, conversion, & engagement?', 'google-analytics-for-wordpress'),
131
+				'name' => __( 'Want to increase your traffic, conversion, & engagement?', 'google-analytics-for-wordpress' ),
132 132
 				'type' => 'upgrade_notice',
133 133
 				'desc' => esc_html__( "By upgrading to MonsterInsights Pro, you can add Ecommerce tracking to see who's buying your product, what's the most popular item on your store, the average order value, and tons more.", 'google-analytics-for-wordpress' )
134 134
 			);
Please login to merge, or discard this patch.