Passed
Push — master ( e64af5...ad1bda )
by Chris
03:25
created
lite/includes/admin/settings.php 2 patches
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 // Exit if accessed directly
4
-if ( ! defined( 'ABSPATH' ) ) { 
4
+if ( ! defined( 'ABSPATH' ) ) {
5 5
 	exit;
6 6
 }
7 7
 
Please login to merge, or discard this patch.
Spacing   +15 added lines, -15 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['eucompliance']['eucompliance_notice'] = array( 
21 21
 				'id' => 'eucompliance_notice',
22 22
 				'no_label' => true,
23
-				'name' => __( 'Google Analytics EU Compliance', 'google-analytics-for-wordpress'),
23
+				'name' => __( 'Google Analytics EU Compliance', 'google-analytics-for-wordpress' ),
24 24
 				'type' => 'upgrade_notice',
25 25
 				'desc' => esc_html__( "The MonsterInsights EU Compliance addon allows you to improve compliance with GDPR and other privacy regulations.", 'google-analytics-for-wordpress' )
26 26
 			);
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
 			$settings['ads']['ads_notice'] = array( 
30 30
 				'id' => 'ads_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 Ads tracking to see who's clicking on your Google Ads, so you can increase your revenue.", 'google-analytics-for-wordpress' )
35 35
 			);
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
 			$settings['forms']['forms_notice'] = array( 
39 39
 				'id' => 'forms_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 Forms tracking to see who's seeing and submitting your forms, so you can increase your conversion rate.", 'google-analytics-for-wordpress' )
44 44
 			);
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
 			$settings['media']['media_notice'] = array( 
48 48
 				'id' => 'media_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 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' )
53 53
 			);
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
 			$settings['membership']['membership_notice'] = array( 
57 57
 				'id' => 'membership_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 Membership tracking.", 'google-analytics-for-wordpress' )
62 62
 			);
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
 			$settings['dimensions']['dimensions_notice'] = array( 
66 66
 				'id' => 'dimensions_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 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' )
71 71
 			);
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
 			$settings['performance']['performance_notice'] = array( 
75 75
 				'id' => 'performance_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 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' )
80 80
 			);
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
 			$settings['reporting']['reporting_notice'] = array( 
84 84
 				'id' => 'reporting_notice',
85 85
 				'no_label' => true,
86
-				'name' => __( 'Want to increase your traffic, conversion, & engagement?', 'google-analytics-for-wordpress'),
86
+				'name' => __( 'Want to increase your traffic, conversion, & engagement?', 'google-analytics-for-wordpress' ),
87 87
 				'type' => 'upgrade_notice',
88 88
 				'desc' => esc_html__( "By upgrading to MonsterInsights Pro, you can enable enhanced reporting.", 'google-analytics-for-wordpress' )
89 89
 			);
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
 			$settings['amp']['amp_notice'] = array( 
93 93
 				'id' => 'amp_notice',
94 94
 				'no_label' => true,
95
-				'name' => __( 'Want to use track users visiting your AMP pages?', 'google-analytics-for-wordpress'),
95
+				'name' => __( 'Want to use track users visiting your AMP pages?', 'google-analytics-for-wordpress' ),
96 96
 				'type' => 'upgrade_notice',
97 97
 				'desc' => esc_html__( "By upgrading to MonsterInsights Pro, you can enable AMP page tracking.", 'google-analytics-for-wordpress' )
98 98
 			);
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
 			$settings['goptimize']['goptimize_notice'] = array( 
102 102
 				'id' => 'goptimize_notice',
103 103
 				'no_label' => true,
104
-				'name' => __( 'Want to use Google Optimize to retarget your website visitors and perform A/B split tests with ease?', 'google-analytics-for-wordpress'),
104
+				'name' => __( 'Want to use Google Optimize to retarget your website visitors and perform A/B split tests with ease?', 'google-analytics-for-wordpress' ),
105 105
 				'type' => 'upgrade_notice',
106 106
 				'desc' => esc_html__( "By upgrading to MonsterInsights Pro, you can enable Google Optimize.", 'google-analytics-for-wordpress' )
107 107
 			);
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
 			$settings['fbia']['fbia_notice'] = array( 
111 111
 				'id' => 'fbia_notice',
112 112
 				'no_label' => true,
113
-				'name' => __( 'Want to expand your website audience beyond your website with Facebook Instant Articles?', 'google-analytics-for-wordpress'),
113
+				'name' => __( 'Want to expand your website audience beyond your website with Facebook Instant Articles?', 'google-analytics-for-wordpress' ),
114 114
 				'type' => 'upgrade_notice',
115 115
 				'desc' => esc_html__( "By upgrading to MonsterInsights Pro, you can track your Facebook Instant Article visitors with MonsterInsights.", 'google-analytics-for-wordpress' )
116 116
 			);
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
 			$settings['bounce']['bounce_notice'] = array( 
120 120
 				'id' => 'bounce_notice',
121 121
 				'no_label' => true,
122
-				'name' => __( 'Want to adjust your website bounce rate?', 'google-analytics-for-wordpress'),
122
+				'name' => __( 'Want to adjust your website bounce rate?', 'google-analytics-for-wordpress' ),
123 123
 				'type' => 'upgrade_notice',
124 124
 				'desc' => esc_html__( "By upgrading to MonsterInsights Pro, you can adjust your Google Analytics bounce rate with MonsterInsights.", 'google-analytics-for-wordpress' )
125 125
 			);
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
 			$settings['notifications']['notifications_notice'] = array( 
129 129
 				'id' => 'notifications_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 enable notifications.", 'google-analytics-for-wordpress' )
134 134
 			);
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
 			$settings['ecommerce']['ecommerce_notice'] = array( 
138 138
 				'id' => 'ecommerce_notice',
139 139
 				'no_label' => true,
140
-				'name' => __( 'Want to increase your traffic, conversion, & engagement?', 'google-analytics-for-wordpress'),
140
+				'name' => __( 'Want to increase your traffic, conversion, & engagement?', 'google-analytics-for-wordpress' ),
141 141
 				'type' => 'upgrade_notice',
142 142
 				'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' )
143 143
 			);
Please login to merge, or discard this patch.
lite/includes/admin/reports/report-dimensions.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
 		parent::__construct();
24 24
 	}
25 25
 
26
-	protected function get_report_html( $data = array() ){
26
+	protected function get_report_html( $data = array() ) {
27 27
 		return $this->get_upsell_notice();
28 28
 	}
29 29
 }
30 30
\ No newline at end of file
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
 		parent::__construct();
24 24
 	}
25 25
 
26
-	protected function get_report_html( $data = array() ){
26
+	protected function get_report_html( $data = array() ) {
27 27
 		return $this->get_upsell_notice();
28 28
 	}
29 29
 }
30 30
\ No newline at end of file
Please login to merge, or discard this patch.
lite/includes/admin/reports/report-queries.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
 		parent::__construct();
24 24
 	}
25 25
 
26
-	protected function get_report_html( $data = array() ){
26
+	protected function get_report_html( $data = array() ) {
27 27
 		return $this->get_upsell_notice();
28 28
 	}
29 29
 }
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
 		parent::__construct();
24 24
 	}
25 25
 
26
-	protected function get_report_html( $data = array() ){
26
+	protected function get_report_html( $data = array() ) {
27 27
 		return $this->get_upsell_notice();
28 28
 	}
29 29
 }
Please login to merge, or discard this patch.
lite/includes/admin/reports/report-ecommerce.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
 		parent::__construct();
24 24
 	}
25 25
 
26
-	protected function get_report_html( $data = array() ){
26
+	protected function get_report_html( $data = array() ) {
27 27
 		return $this->get_upsell_notice();
28 28
 	}
29 29
 }
30 30
\ No newline at end of file
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
 		parent::__construct();
24 24
 	}
25 25
 
26
-	protected function get_report_html( $data = array() ){
26
+	protected function get_report_html( $data = array() ) {
27 27
 		return $this->get_upsell_notice();
28 28
 	}
29 29
 }
30 30
\ No newline at end of file
Please login to merge, or discard this patch.
lite/includes/admin/reports/report-publisher.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
 		parent::__construct();
24 24
 	}
25 25
 
26
-	protected function get_report_html( $data = array() ){
26
+	protected function get_report_html( $data = array() ) {
27 27
 		return $this->get_upsell_notice();
28 28
 	}
29 29
 }
30 30
\ No newline at end of file
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
 		parent::__construct();
24 24
 	}
25 25
 
26
-	protected function get_report_html( $data = array() ){
26
+	protected function get_report_html( $data = array() ) {
27 27
 		return $this->get_upsell_notice();
28 28
 	}
29 29
 }
30 30
\ No newline at end of file
Please login to merge, or discard this patch.
lite/includes/admin/reports/report-forms.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
 		parent::__construct();
24 24
 	}
25 25
 
26
-	protected function get_report_html( $data = array() ){
26
+	protected function get_report_html( $data = array() ) {
27 27
 		return $this->get_upsell_notice();
28 28
 	}
29 29
 }
30 30
\ No newline at end of file
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
 		parent::__construct();
24 24
 	}
25 25
 
26
-	protected function get_report_html( $data = array() ){
26
+	protected function get_report_html( $data = array() ) {
27 27
 		return $this->get_upsell_notice();
28 28
 	}
29 29
 }
30 30
\ No newline at end of file
Please login to merge, or discard this patch.
includes/license.php 2 patches
Spacing   +33 added lines, -33 removed lines patch added patch discarded remove patch
@@ -87,10 +87,10 @@  discard block
 block discarded – undo
87 87
 		$license_key  = ! empty( $license_key ) ? $license_key : MonsterInsights()->license->get_default_license_key();
88 88
 		return $license_key;
89 89
 	}
90
-	public function get_site_license_key(){
90
+	public function get_site_license_key() {
91 91
 		return ( ! empty( $this->site['key'] ) && is_string( $this->site['key'] ) && strlen( $this->site['key'] ) > 10 ) ? $this->site['key'] : '';
92 92
 	}
93
-	public function get_network_license_key(){
93
+	public function get_network_license_key() {
94 94
 		return ( ! empty( $this->network['key'] ) && is_string( $this->network['key'] ) && strlen( $this->network['key'] ) > 10 ) ? $this->network['key'] : '';
95 95
 	}
96 96
 
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
 		return $this->licensed;
99 99
 	}
100 100
 
101
-	public function is_site_licensed(){
101
+	public function is_site_licensed() {
102 102
 		return    ! empty( $this->site['key'] ) // has key
103 103
 			   &&   $this->get_site_license_type() // has type
104 104
 			   && ! $this->site_license_expired()  // isn't expired
@@ -117,28 +117,28 @@  discard block
 block discarded – undo
117 117
 	}
118 118
 
119 119
 
120
-	public function get_site_license_updates(){
120
+	public function get_site_license_updates() {
121 121
 		return get_option( 'monsterinsights_license_updates', '' );
122 122
 	}
123
-	public function get_network_license_updates(){
123
+	public function get_network_license_updates() {
124 124
 		return get_site_option( 'monsterinsights_network_license_updates', '' );
125 125
 	}
126 126
 
127
-	public function set_site_license_updates(){
127
+	public function set_site_license_updates() {
128 128
 		update_option( 'monsterinsights_license_updates', strtotime( '+8 hours' ) );
129 129
 	}
130 130
 	public function set_network_license_updates() {
131 131
 		update_site_option( 'monsterinsights_network_license_updates', strtotime( '+8 hours' ) );
132 132
 	}
133 133
 
134
-	public function delete_site_license_updates(){
134
+	public function delete_site_license_updates() {
135 135
 		delete_option( 'monsterinsights_license_updates' );
136 136
 	}
137
-	public function delete_network_license_updates(){
137
+	public function delete_network_license_updates() {
138 138
 		delete_site_option( 'monsterinsights_license_updates' );
139 139
 	}
140 140
 
141
-	public function time_to_check_site_license(){
141
+	public function time_to_check_site_license() {
142 142
 		$timestamp = get_option( 'monsterinsights_license_updates' );
143 143
 		if ( ! $timestamp ) {
144 144
 			 return true;
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
 			}
152 152
 		}
153 153
 	}	
154
-	public function time_to_check_network_license(){
154
+	public function time_to_check_network_license() {
155 155
 		$timestamp = get_site_option( 'monsterinsights_network_license_updates' );
156 156
 		if ( ! $timestamp ) {
157 157
 			 return true;
@@ -165,21 +165,21 @@  discard block
 block discarded – undo
165 165
 		}
166 166
 	}
167 167
 
168
-	public function set_site_license( $data = array() ){
168
+	public function set_site_license( $data = array() ) {
169 169
 		update_option( 'monsterinsights_license', $data );
170 170
 		$this->set_site_license_updates();
171
-		$this->site      = $data;
171
+		$this->site = $data;
172 172
 	}
173
-	public function set_network_license( $data = array() ){
173
+	public function set_network_license( $data = array() ) {
174 174
 		update_site_option( 'monsterinsights_network_license', $data );
175 175
 		$this->set_network_license_updates();
176
-		$this->network   = $data;
176
+		$this->network = $data;
177 177
 	}
178 178
 
179 179
 	public function delete_site_license() {
180 180
 		delete_option( 'monsterinsights_license' );
181 181
 		$this->delete_site_license_updates();
182
-		$this->site      = array();
182
+		$this->site = array();
183 183
 	}
184 184
 	public function delete_network_license() {
185 185
 		delete_site_option( 'monsterinsights_network_license' );
@@ -187,21 +187,21 @@  discard block
 block discarded – undo
187 187
 		$this->network = array();
188 188
 	}
189 189
 
190
-	public function get_license_type(){
190
+	public function get_license_type() {
191 191
 		if ( ! $this->has_license() ) {
192 192
 			return false;
193 193
 		}
194 194
 
195 195
 		return $this->using_network_license() ? $this->get_network_license_type() : $this->get_site_license_type();
196 196
 	}
197
-	public function get_site_license_type(){
197
+	public function get_site_license_type() {
198 198
 		return ( $this->get_site_license_key() && ! empty( $this->site['type'] ) && $this->is_valid_license_type( $this->site['type'] ) ) ? $this->site['type'] : '';
199 199
 	}
200
-	public function get_network_license_type(){
200
+	public function get_network_license_type() {
201 201
 		return ( $this->get_network_license_key() && ! empty( $this->network['type'] ) && $this->is_valid_license_type( $this->network['type'] ) ) ? $this->network['type'] : '';
202 202
 	}
203 203
 
204
-	public function license_has_error(){
204
+	public function license_has_error() {
205 205
 		if ( ! $this->has_license() ) {
206 206
 			return false;
207 207
 		}
@@ -215,7 +215,7 @@  discard block
 block discarded – undo
215 215
 			   || $this->site_license_invalid()  // is invalid
216 216
 		;
217 217
 	}
218
-	public function network_license_has_error(){
218
+	public function network_license_has_error() {
219 219
 		return 
220 220
 				  $this->network_license_expired()  // is expired
221 221
 			   || $this->network_license_disabled()  // is disabled
@@ -223,21 +223,21 @@  discard block
 block discarded – undo
223 223
 		;
224 224
 	}
225 225
 
226
-	public function license_expired(){
226
+	public function license_expired() {
227 227
 		if ( ! $this->has_license() ) {
228 228
 			return false;
229 229
 		}
230 230
 		
231 231
 		return $this->using_network_license() ? $this->network_license_expired() : $this->site_license_expired();
232 232
 	}
233
-	public function site_license_expired(){
233
+	public function site_license_expired() {
234 234
 		return ! empty( $this->site['is_expired'] );
235 235
 	}
236
-	public function network_license_expired(){
236
+	public function network_license_expired() {
237 237
 		return ! empty( $this->network['is_expired'] );
238 238
 	}
239 239
 
240
-	public function license_disabled(){
240
+	public function license_disabled() {
241 241
 		if ( ! $this->has_license() ) {
242 242
 			return false;
243 243
 		}
@@ -247,11 +247,11 @@  discard block
 block discarded – undo
247 247
 	public function site_license_disabled() {
248 248
 		return ! empty( $this->site['is_disabled'] );
249 249
 	}
250
-	public function network_license_disabled(){
250
+	public function network_license_disabled() {
251 251
 		return ! empty( $this->network['is_disabled'] );
252 252
 	}
253 253
 
254
-	public function license_invalid(){
254
+	public function license_invalid() {
255 255
 		if ( ! $this->has_license() ) {
256 256
 			return false;
257 257
 		}
@@ -261,21 +261,21 @@  discard block
 block discarded – undo
261 261
 	public function site_license_invalid() {
262 262
 		return ! empty( $this->site['is_invalid'] );
263 263
 	}
264
-	public function network_license_invalid(){
264
+	public function network_license_invalid() {
265 265
 		return ! empty( $this->network['is_invalid'] );
266 266
 	}
267 267
 
268 268
 
269
-	public function get_license_error(){
269
+	public function get_license_error() {
270 270
 		if ( ! $this->has_license() ) {
271 271
 			return false;
272 272
 		}
273 273
 		
274 274
 		return $this->using_network_license() ? $this->get_network_license_error() : $this->get_site_license_error();
275 275
 	}
276
-	public function get_site_license_error(){
276
+	public function get_site_license_error() {
277 277
 		if ( $this->site_license_expired() ) {
278
-			return 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="'. monsterinsights_get_url( 'license-error', 'expired-license', 'https://www.monsterinsights.com/login/' ) .'" target="_blank" rel="noopener noreferrer" referrer="no-referrer">', '</a>' );
278
+			return 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="' . monsterinsights_get_url( 'license-error', 'expired-license', 'https://www.monsterinsights.com/login/' ) . '" target="_blank" rel="noopener noreferrer" referrer="no-referrer">', '</a>' );
279 279
 		} else if ( $this->site_license_disabled() ) {
280 280
 			return esc_html__( 'Your license key for MonsterInsights has been disabled. Please use a different key.', 'google-analytics-for-wordpress' );
281 281
 		} else if ( $this->site_license_invalid() ) {
@@ -284,9 +284,9 @@  discard block
 block discarded – undo
284 284
 		return '';
285 285
 	}
286 286
 
287
-	public function get_network_license_error(){
287
+	public function get_network_license_error() {
288 288
 		if ( $this->site_license_expired() ) {
289
-			return 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="'. monsterinsights_get_url( 'license-error', 'expired-license', 'https://www.monsterinsights.com/login/' ) .'" target="_blank" rel="noopener noreferrer" referrer="no-referrer">', '</a>' );
289
+			return 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="' . monsterinsights_get_url( 'license-error', 'expired-license', 'https://www.monsterinsights.com/login/' ) . '" target="_blank" rel="noopener noreferrer" referrer="no-referrer">', '</a>' );
290 290
 		} else if ( $this->site_license_disabled() ) {
291 291
 			return esc_html__( 'Your license key for MonsterInsights has been disabled. Please use a different key.', 'google-analytics-for-wordpress' );
292 292
 		} else if ( $this->site_license_invalid() ) {
@@ -362,7 +362,7 @@  discard block
 block discarded – undo
362 362
 		return $can_access;
363 363
 	}
364 364
 
365
-	public function get_default_license_key(){
365
+	public function get_default_license_key() {
366 366
 		if ( defined( 'MONSTERINSIGHTS_LICENSE_KEY' ) && is_string( MONSTERINSIGHTS_LICENSE_KEY ) && strlen( MONSTERINSIGHTS_LICENSE_KEY ) > 10 ) {
367 367
 			return MONSTERINSIGHTS_LICENSE_KEY;
368 368
 		}
Please login to merge, or discard this patch.
Braces   +30 added lines, -30 removed lines patch added patch discarded remove patch
@@ -87,18 +87,18 @@  discard block
 block discarded – undo
87 87
 		$license_key  = ! empty( $license_key ) ? $license_key : MonsterInsights()->license->get_default_license_key();
88 88
 		return $license_key;
89 89
 	}
90
-	public function get_site_license_key(){
90
+	public function get_site_license_key() {
91 91
 		return ( ! empty( $this->site['key'] ) && is_string( $this->site['key'] ) && strlen( $this->site['key'] ) > 10 ) ? $this->site['key'] : '';
92 92
 	}
93
-	public function get_network_license_key(){
93
+	public function get_network_license_key() {
94 94
 		return ( ! empty( $this->network['key'] ) && is_string( $this->network['key'] ) && strlen( $this->network['key'] ) > 10 ) ? $this->network['key'] : '';
95 95
 	}
96 96
 
97
-	public function has_license() { 
97
+	public function has_license() {
98 98
 		return $this->licensed;
99 99
 	}
100 100
 
101
-	public function is_site_licensed(){
101
+	public function is_site_licensed() {
102 102
 		return    ! empty( $this->site['key'] ) // has key
103 103
 			   &&   $this->get_site_license_type() // has type
104 104
 			   && ! $this->site_license_expired()  // isn't expired
@@ -117,28 +117,28 @@  discard block
 block discarded – undo
117 117
 	}
118 118
 
119 119
 
120
-	public function get_site_license_updates(){
120
+	public function get_site_license_updates() {
121 121
 		return get_option( 'monsterinsights_license_updates', '' );
122 122
 	}
123
-	public function get_network_license_updates(){
123
+	public function get_network_license_updates() {
124 124
 		return get_site_option( 'monsterinsights_network_license_updates', '' );
125 125
 	}
126 126
 
127
-	public function set_site_license_updates(){
127
+	public function set_site_license_updates() {
128 128
 		update_option( 'monsterinsights_license_updates', strtotime( '+8 hours' ) );
129 129
 	}
130 130
 	public function set_network_license_updates() {
131 131
 		update_site_option( 'monsterinsights_network_license_updates', strtotime( '+8 hours' ) );
132 132
 	}
133 133
 
134
-	public function delete_site_license_updates(){
134
+	public function delete_site_license_updates() {
135 135
 		delete_option( 'monsterinsights_license_updates' );
136 136
 	}
137
-	public function delete_network_license_updates(){
137
+	public function delete_network_license_updates() {
138 138
 		delete_site_option( 'monsterinsights_license_updates' );
139 139
 	}
140 140
 
141
-	public function time_to_check_site_license(){
141
+	public function time_to_check_site_license() {
142 142
 		$timestamp = get_option( 'monsterinsights_license_updates' );
143 143
 		if ( ! $timestamp ) {
144 144
 			 return true;
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
 			}
152 152
 		}
153 153
 	}	
154
-	public function time_to_check_network_license(){
154
+	public function time_to_check_network_license() {
155 155
 		$timestamp = get_site_option( 'monsterinsights_network_license_updates' );
156 156
 		if ( ! $timestamp ) {
157 157
 			 return true;
@@ -165,12 +165,12 @@  discard block
 block discarded – undo
165 165
 		}
166 166
 	}
167 167
 
168
-	public function set_site_license( $data = array() ){
168
+	public function set_site_license( $data = array() ) {
169 169
 		update_option( 'monsterinsights_license', $data );
170 170
 		$this->set_site_license_updates();
171 171
 		$this->site      = $data;
172 172
 	}
173
-	public function set_network_license( $data = array() ){
173
+	public function set_network_license( $data = array() ) {
174 174
 		update_site_option( 'monsterinsights_network_license', $data );
175 175
 		$this->set_network_license_updates();
176 176
 		$this->network   = $data;
@@ -187,21 +187,21 @@  discard block
 block discarded – undo
187 187
 		$this->network = array();
188 188
 	}
189 189
 
190
-	public function get_license_type(){
190
+	public function get_license_type() {
191 191
 		if ( ! $this->has_license() ) {
192 192
 			return false;
193 193
 		}
194 194
 
195 195
 		return $this->using_network_license() ? $this->get_network_license_type() : $this->get_site_license_type();
196 196
 	}
197
-	public function get_site_license_type(){
197
+	public function get_site_license_type() {
198 198
 		return ( $this->get_site_license_key() && ! empty( $this->site['type'] ) && $this->is_valid_license_type( $this->site['type'] ) ) ? $this->site['type'] : '';
199 199
 	}
200
-	public function get_network_license_type(){
200
+	public function get_network_license_type() {
201 201
 		return ( $this->get_network_license_key() && ! empty( $this->network['type'] ) && $this->is_valid_license_type( $this->network['type'] ) ) ? $this->network['type'] : '';
202 202
 	}
203 203
 
204
-	public function license_has_error(){
204
+	public function license_has_error() {
205 205
 		if ( ! $this->has_license() ) {
206 206
 			return false;
207 207
 		}
@@ -215,7 +215,7 @@  discard block
 block discarded – undo
215 215
 			   || $this->site_license_invalid()  // is invalid
216 216
 		;
217 217
 	}
218
-	public function network_license_has_error(){
218
+	public function network_license_has_error() {
219 219
 		return 
220 220
 				  $this->network_license_expired()  // is expired
221 221
 			   || $this->network_license_disabled()  // is disabled
@@ -223,21 +223,21 @@  discard block
 block discarded – undo
223 223
 		;
224 224
 	}
225 225
 
226
-	public function license_expired(){
226
+	public function license_expired() {
227 227
 		if ( ! $this->has_license() ) {
228 228
 			return false;
229 229
 		}
230 230
 		
231 231
 		return $this->using_network_license() ? $this->network_license_expired() : $this->site_license_expired();
232 232
 	}
233
-	public function site_license_expired(){
233
+	public function site_license_expired() {
234 234
 		return ! empty( $this->site['is_expired'] );
235 235
 	}
236
-	public function network_license_expired(){
236
+	public function network_license_expired() {
237 237
 		return ! empty( $this->network['is_expired'] );
238 238
 	}
239 239
 
240
-	public function license_disabled(){
240
+	public function license_disabled() {
241 241
 		if ( ! $this->has_license() ) {
242 242
 			return false;
243 243
 		}
@@ -247,11 +247,11 @@  discard block
 block discarded – undo
247 247
 	public function site_license_disabled() {
248 248
 		return ! empty( $this->site['is_disabled'] );
249 249
 	}
250
-	public function network_license_disabled(){
250
+	public function network_license_disabled() {
251 251
 		return ! empty( $this->network['is_disabled'] );
252 252
 	}
253 253
 
254
-	public function license_invalid(){
254
+	public function license_invalid() {
255 255
 		if ( ! $this->has_license() ) {
256 256
 			return false;
257 257
 		}
@@ -261,19 +261,19 @@  discard block
 block discarded – undo
261 261
 	public function site_license_invalid() {
262 262
 		return ! empty( $this->site['is_invalid'] );
263 263
 	}
264
-	public function network_license_invalid(){
264
+	public function network_license_invalid() {
265 265
 		return ! empty( $this->network['is_invalid'] );
266 266
 	}
267 267
 
268 268
 
269
-	public function get_license_error(){
269
+	public function get_license_error() {
270 270
 		if ( ! $this->has_license() ) {
271 271
 			return false;
272 272
 		}
273 273
 		
274 274
 		return $this->using_network_license() ? $this->get_network_license_error() : $this->get_site_license_error();
275 275
 	}
276
-	public function get_site_license_error(){
276
+	public function get_site_license_error() {
277 277
 		if ( $this->site_license_expired() ) {
278 278
 			return 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="'. monsterinsights_get_url( 'license-error', 'expired-license', 'https://www.monsterinsights.com/login/' ) .'" target="_blank" rel="noopener noreferrer" referrer="no-referrer">', '</a>' );
279 279
 		} else if ( $this->site_license_disabled() ) {
@@ -284,7 +284,7 @@  discard block
 block discarded – undo
284 284
 		return '';
285 285
 	}
286 286
 
287
-	public function get_network_license_error(){
287
+	public function get_network_license_error() {
288 288
 		if ( $this->site_license_expired() ) {
289 289
 			return 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="'. monsterinsights_get_url( 'license-error', 'expired-license', 'https://www.monsterinsights.com/login/' ) .'" target="_blank" rel="noopener noreferrer" referrer="no-referrer">', '</a>' );
290 290
 		} else if ( $this->site_license_disabled() ) {
@@ -295,7 +295,7 @@  discard block
 block discarded – undo
295 295
 		return '';
296 296
 	}
297 297
 
298
-	public function license_can( $requires = 'lite' ) {		
298
+	public function license_can( $requires = 'lite' ) {
299 299
 		if ( ! monsterinsights_is_pro_version() || ! $this->has_license() ) {
300 300
 			return $requires === 'lite';
301 301
 		}
@@ -362,7 +362,7 @@  discard block
 block discarded – undo
362 362
 		return $can_access;
363 363
 	}
364 364
 
365
-	public function get_default_license_key(){
365
+	public function get_default_license_key() {
366 366
 		if ( defined( 'MONSTERINSIGHTS_LICENSE_KEY' ) && is_string( MONSTERINSIGHTS_LICENSE_KEY ) && strlen( MONSTERINSIGHTS_LICENSE_KEY ) > 10 ) {
367 367
 			return MONSTERINSIGHTS_LICENSE_KEY;
368 368
 		}
Please login to merge, or discard this patch.
includes/admin/common.php 2 patches
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -544,7 +544,7 @@
 block discarded – undo
544 544
 	return $shareasale_url;
545 545
 }
546 546
 
547
-function monsterinsights_settings_ublock_error_js(){
547
+function monsterinsights_settings_ublock_error_js() {
548 548
 	echo "<script type='text/javascript'>\n";
549 549
 	echo "jQuery( document ).ready( function( $ ) {
550 550
 			if ( window.uorigindetected == null){
Please login to merge, or discard this patch.
Spacing   +103 added lines, -103 removed lines patch added patch discarded remove patch
@@ -155,32 +155,32 @@  discard block
 block discarded – undo
155 155
 				'copytoclip'       				=> esc_html__( 'Copy to Clipboard', 'google-analytics-for-wordpress' ),
156 156
 				'failed'           				=> esc_html__( 'Failed!', 'google-analytics-for-wordpress' ),
157 157
 				'admin_nonce'      				=> wp_create_nonce( 'mi-admin-nonce' ),
158
-				'shorten'         				=> esc_html__( 'Shorten URL' ,'google-analytics-for-wordpress'),
159
-				'shortened'        				=> esc_html__( 'Shortened!' ,'google-analytics-for-wordpress'),
160
-				'working'          				=> esc_html__( 'Working...' ,'google-analytics-for-wordpress'),
161
-				'importtext'       				=> esc_html__( 'Import' ,'google-analytics-for-wordpress'),
162
-				'imported'         				=> esc_html__( 'Imported!' ,'google-analytics-for-wordpress'),
163
-				'redirect_loading_title_text'   => esc_html__( 'Preparing to redirect:' ,'google-analytics-for-wordpress'),
164
-				'redirect_loading_text_text'    => esc_html__( "You'll be redirected momentarily to complete authentication. This may take a couple seconds." ,'google-analytics-for-wordpress'),
165
-				'redirect_loading_error_title'  => esc_html__( "Authentication Error:" ,'google-analytics-for-wordpress'),
166
-				'deauth_loading_title_text'  	=> esc_html__( 'Deauthenticating....' ,'google-analytics-for-wordpress'),
167
-				'deauth_loading_text_text'   	=> esc_html__( "We're deactivating your site. This may take a couple seconds." ,'google-analytics-for-wordpress'),
168
-				'deauth_loading_error_title' 	=> esc_html__( "Deactivation Error:" ,'google-analytics-for-wordpress'),
169
-				'deauth_success_title_text'  	=> esc_html__( 'Deactivated Successfully!' ,'google-analytics-for-wordpress'),
170
-				'deauth_success_text_text'   	=> esc_html__( "You've disconnected your site from MonsterInsights. Your site is no longer being tracked by Google Analytics and you won't see reports anymore." ,'google-analytics-for-wordpress'),
171
-				'verify_loading_title_text'  	=> esc_html__( 'Verifying....' ,'google-analytics-for-wordpress'),
172
-				'verify_loading_text_text'   	=> esc_html__( "We're verifying your site. This may take a couple seconds." ,'google-analytics-for-wordpress'),
173
-				'verify_loading_error_title' 	=> esc_html__( "Verification Error:" ,'google-analytics-for-wordpress'),
174
-				'verify_success_title_text' 	=> esc_html__( 'Verified Successfully!' ,'google-analytics-for-wordpress'),
175
-				'verify_success_text_text'  	=> esc_html__( "Your site is connected to MonsterInsights!" ,'google-analytics-for-wordpress'),
176
-				'ok_text' 						=> esc_html__( "OK" ,'google-analytics-for-wordpress'),
177
-				'force_deauth_button_text'  	=> esc_html__( "Force Deauthenticate" ,'google-analytics-for-wordpress'),
158
+				'shorten'         				=> esc_html__( 'Shorten URL', 'google-analytics-for-wordpress' ),
159
+				'shortened'        				=> esc_html__( 'Shortened!', 'google-analytics-for-wordpress' ),
160
+				'working'          				=> esc_html__( 'Working...', 'google-analytics-for-wordpress' ),
161
+				'importtext'       				=> esc_html__( 'Import', 'google-analytics-for-wordpress' ),
162
+				'imported'         				=> esc_html__( 'Imported!', 'google-analytics-for-wordpress' ),
163
+				'redirect_loading_title_text'   => esc_html__( 'Preparing to redirect:', 'google-analytics-for-wordpress' ),
164
+				'redirect_loading_text_text'    => esc_html__( "You'll be redirected momentarily to complete authentication. This may take a couple seconds.", 'google-analytics-for-wordpress' ),
165
+				'redirect_loading_error_title'  => esc_html__( "Authentication Error:", 'google-analytics-for-wordpress' ),
166
+				'deauth_loading_title_text'  	=> esc_html__( 'Deauthenticating....', 'google-analytics-for-wordpress' ),
167
+				'deauth_loading_text_text'   	=> esc_html__( "We're deactivating your site. This may take a couple seconds.", 'google-analytics-for-wordpress' ),
168
+				'deauth_loading_error_title' 	=> esc_html__( "Deactivation Error:", 'google-analytics-for-wordpress' ),
169
+				'deauth_success_title_text'  	=> esc_html__( 'Deactivated Successfully!', 'google-analytics-for-wordpress' ),
170
+				'deauth_success_text_text'   	=> esc_html__( "You've disconnected your site from MonsterInsights. Your site is no longer being tracked by Google Analytics and you won't see reports anymore.", 'google-analytics-for-wordpress' ),
171
+				'verify_loading_title_text'  	=> esc_html__( 'Verifying....', 'google-analytics-for-wordpress' ),
172
+				'verify_loading_text_text'   	=> esc_html__( "We're verifying your site. This may take a couple seconds.", 'google-analytics-for-wordpress' ),
173
+				'verify_loading_error_title' 	=> esc_html__( "Verification Error:", 'google-analytics-for-wordpress' ),
174
+				'verify_success_title_text' 	=> esc_html__( 'Verified Successfully!', 'google-analytics-for-wordpress' ),
175
+				'verify_success_text_text'  	=> esc_html__( "Your site is connected to MonsterInsights!", 'google-analytics-for-wordpress' ),
176
+				'ok_text' 						=> esc_html__( "OK", 'google-analytics-for-wordpress' ),
177
+				'force_deauth_button_text'  	=> esc_html__( "Force Deauthenticate", 'google-analytics-for-wordpress' ),
178 178
 				'refresh_report_title'          => esc_html__( 'Refreshing Report', 'google-analytics-for-wordpress' ),
179 179
 				'refresh_report_text'           => esc_html__( 'Loading new report data...', 'google-analytics-for-wordpress' ),
180 180
 				'refresh_report_success_text'   => esc_html__( 'Success', 'google-analytics-for-wordpress' ),
181 181
 				'refresh_report_success_text'   => esc_html__( 'Retrieved the new report data successfully', 'google-analytics-for-wordpress' ),
182 182
 				'refresh_report_failure_title'  => esc_html__( 'Error', 'google-analytics-for-wordpress' ),
183
-				'timezone'						=> date('e'),
183
+				'timezone'						=> date( 'e' ),
184 184
 				'resume_report_title'			=> esc_html__( 'Real-Time Report Paused', 'google-analytics-for-wordpress' ),
185 185
 				'resume_report_text'			=> esc_html__( 'The Real-Time Report automatically paused due to inactivity. Please refresh the page to resume the Real-Time Report.', 'google-analytics-for-wordpress' ),
186 186
 			)
@@ -244,7 +244,7 @@  discard block
 block discarded – undo
244 244
 		'kad_admin_js', // Pinnacle theme
245 245
 		'dt-chart', // DesignThemes core features plugin
246 246
 		'tweeetshare_font_script', // TweetShare - Click To Tweet
247
-		'tweeetshare_jquery_script',  // TweetShare - Click To Tweet
247
+		'tweeetshare_jquery_script', // TweetShare - Click To Tweet
248 248
 		'tweeetshare_jqueryui_script', // TweetShare - Click To Tweet
249 249
 		'tweeetshare_custom_script', // TweetShare - Click To Tweet
250 250
 		'imagify-promise-polyfill', // Imagify 
@@ -263,16 +263,16 @@  discard block
 block discarded – undo
263 263
 		'rml-modal', // WP Real Media Library
264 264
 		'rml-order', // WP Real Media Library
265 265
 		'rml-meta', // WP Real Media Library
266
-		'rml-uploader',  // WP Real Media Library
267
-		'rml-options',  // WP Real Media Library
268
-		'rml-usersettings',  // WP Real Media Library
266
+		'rml-uploader', // WP Real Media Library
267
+		'rml-options', // WP Real Media Library
268
+		'rml-usersettings', // WP Real Media Library
269 269
 		'rml-main', // WP Real Media Library
270 270
 		'control-panel-sweet-alert', // Ken Theme
271 271
 		'sweet-alert-js', // Vitrine Theme
272 272
 		'theme-admin-script', // Vitrine Theme
273 273
 		'sweetalert', //  Church Suite Theme by Webnus
274 274
 		'be_alerts_charts', //  WooCommerce bolder product alerts
275
- 		'magayo-lottery-results',  //  Magayo Lottery Results
275
+ 		'magayo-lottery-results', //  Magayo Lottery Results
276 276
 		'control-panel-sweet-alert', // Ken Theme
277 277
 		'cpm_chart', // WP Project Manager
278 278
 		'adminscripts', //  Artisan Nayma Theme
@@ -358,15 +358,15 @@  discard block
 block discarded – undo
358 358
 
359 359
 	global $wp_styles;
360 360
 	foreach ( $wp_styles->queue as $handle ) {
361
-		if ( strpos( $wp_styles->registered[$handle]->src, 'wp-content') === false ) {
361
+		if ( strpos( $wp_styles->registered[$handle]->src, 'wp-content' ) === false ) {
362 362
 			return;
363 363
 		}
364 364
 		
365
-		if ( strpos( $wp_styles->registered[$handle]->handle, 'monsterinsights') !== false ) {
365
+		if ( strpos( $wp_styles->registered[$handle]->handle, 'monsterinsights' ) !== false ) {
366 366
 			return;
367 367
 		}
368 368
 
369
-		foreach( $third_party as $partial ) {
369
+		foreach ( $third_party as $partial ) {
370 370
 			if ( strpos( $wp_styles->registered[$handle]->handle, $partial ) !== false ) {
371 371
 				wp_dequeue_style( $handle ); // Remove css file from MI screen
372 372
 				wp_deregister_style( $handle );
@@ -381,15 +381,15 @@  discard block
 block discarded – undo
381 381
 
382 382
 	global $wp_scripts;
383 383
 	foreach ( $wp_scripts->queue as $handle ) {
384
-		if ( strpos( $wp_scripts->registered[$handle]->src, 'wp-content') === false ) {
384
+		if ( strpos( $wp_scripts->registered[$handle]->src, 'wp-content' ) === false ) {
385 385
 			return;
386 386
 		}
387 387
 		
388
-		if ( strpos( $wp_scripts->registered[$handle]->handle, 'monsterinsights') !== false ) {
388
+		if ( strpos( $wp_scripts->registered[$handle]->handle, 'monsterinsights' ) !== false ) {
389 389
 			return;
390 390
 		}
391 391
 
392
-		foreach( $third_party as $partial ) {
392
+		foreach ( $third_party as $partial ) {
393 393
 			if ( strpos( $wp_scripts->registered[$handle]->handle, $partial ) !== false ) {
394 394
 				wp_dequeue_script( $handle ); // Remove JS file from MI screen
395 395
 				wp_deregister_script( $handle );
@@ -404,47 +404,47 @@  discard block
 block discarded – undo
404 404
 
405 405
 	// Remove actions from themes that are not following best practices and break the admin doing so
406 406
 		// Theme: Newspaper by tagDiv
407
-			remove_action('admin_enqueue_scripts', 'load_wp_admin_js');
408
-			remove_action('admin_enqueue_scripts', 'load_wp_admin_css');
409
-			remove_action('admin_print_scripts-widgets.php', 'td_on_admin_print_scripts_farbtastic');
410
-			remove_action('admin_print_styles-widgets.php', 'td_on_admin_print_styles_farbtastic');
411
-			remove_action('admin_print_footer_scripts', 'check_if_media_uploads_is_loaded', 9999);
412
-			remove_action('print_media_templates', 'td_custom_gallery_settings_hook');
413
-			remove_action('print_media_templates', 'td_change_backbone_js_hook');
414
-			remove_action('admin_head', 'tdc_on_admin_head'); //  TagDiv Composer Fix
415
-			remove_action('print_media_templates', 'us_media_templates'); // Impreza Theme Fix
416
-			remove_action('admin_footer', 'gt3pg_add_gallery_template'); // GT3 Photo & Video Gallery By GT3 Themes Plugin Fix
407
+			remove_action( 'admin_enqueue_scripts', 'load_wp_admin_js' );
408
+			remove_action( 'admin_enqueue_scripts', 'load_wp_admin_css' );
409
+			remove_action( 'admin_print_scripts-widgets.php', 'td_on_admin_print_scripts_farbtastic' );
410
+			remove_action( 'admin_print_styles-widgets.php', 'td_on_admin_print_styles_farbtastic' );
411
+			remove_action( 'admin_print_footer_scripts', 'check_if_media_uploads_is_loaded', 9999 );
412
+			remove_action( 'print_media_templates', 'td_custom_gallery_settings_hook' );
413
+			remove_action( 'print_media_templates', 'td_change_backbone_js_hook' );
414
+			remove_action( 'admin_head', 'tdc_on_admin_head' ); //  TagDiv Composer Fix
415
+			remove_action( 'print_media_templates', 'us_media_templates' ); // Impreza Theme Fix
416
+			remove_action( 'admin_footer', 'gt3pg_add_gallery_template' ); // GT3 Photo & Video Gallery By GT3 Themes Plugin Fix
417 417
 		// Plugin WP Booklist:
418
-			remove_action('admin_footer', 'wpbooklist_jre_dismiss_prem_notice_forever_action_javascript');
419
-			remove_action('admin_footer', 'wpbooklist_dashboard_add_book_action_javascript');
420
-			remove_action('admin_footer', 'wpbooklist_edit_book_show_form_action_javascript');
421
-			remove_action('admin_footer', 'wpbooklist_show_book_in_colorbox_action_javascript');
422
-			remove_action('admin_footer', 'wpbooklist_new_lib_shortcode_action_javascript');
423
-			remove_action('admin_footer', 'wpbooklist_dashboard_save_library_display_options_action_javascript');
424
-			remove_action('admin_footer', 'wpbooklist_dashboard_save_post_display_options_action_javascript');
425
-			remove_action('admin_footer', 'wpbooklist_dashboard_save_page_display_options_action_javascript');
426
-			remove_action('admin_footer', 'wpbooklist_update_display_options_action_javascript');
427
-			remove_action('admin_footer', 'wpbooklist_edit_book_pagination_action_javascript');
428
-			remove_action('admin_footer', 'wpbooklist_edit_book_switch_lib_action_javascript');
429
-			remove_action('admin_footer', 'wpbooklist_edit_book_search_action_javascript');
430
-			remove_action('admin_footer', 'wpbooklist_edit_book_actual_action_javascript');
431
-			remove_action('admin_footer', 'wpbooklist_delete_book_action_javascript');
432
-			remove_action('admin_footer', 'wpbooklist_user_apis_action_javascript');
433
-			remove_action('admin_footer', 'wpbooklist_upload_new_stylepak_action_javascript');
434
-			remove_action('admin_footer', 'wpbooklist_upload_new_post_template_action_javascript');
435
-			remove_action('admin_footer', 'wpbooklist_upload_new_page_template_action_javascript');
436
-			remove_action('admin_footer', 'wpbooklist_create_db_library_backup_action_javascript');
437
-			remove_action('admin_footer', 'wpbooklist_restore_db_library_backup_action_javascript');
438
-			remove_action('admin_footer', 'wpbooklist_create_csv_action_javascript');
439
-			remove_action('admin_footer', 'wpbooklist_amazon_localization_action_javascript');
440
-			remove_action('admin_footer', 'wpbooklist_delete_book_bulk_action_javascript');
441
-			remove_action('admin_footer', 'wpbooklist_reorder_action_javascript');
442
-			remove_action('admin_footer', 'wpbooklist_exit_results_action_javascript');
443
-			remove_action('admin_footer', 'wpbooklist_storytime_select_category_action_javascript');
444
-			remove_action('admin_footer', 'wpbooklist_storytime_get_story_action_javascript');
445
-			remove_action('admin_footer', 'wpbooklist_storytime_expand_browse_action_javascript');
446
-			remove_action('admin_footer', 'wpbooklist_storytime_save_settings_action_javascript');
447
-			remove_action('admin_footer', 'wpbooklist_delete_story_action_javascript');
418
+			remove_action( 'admin_footer', 'wpbooklist_jre_dismiss_prem_notice_forever_action_javascript' );
419
+			remove_action( 'admin_footer', 'wpbooklist_dashboard_add_book_action_javascript' );
420
+			remove_action( 'admin_footer', 'wpbooklist_edit_book_show_form_action_javascript' );
421
+			remove_action( 'admin_footer', 'wpbooklist_show_book_in_colorbox_action_javascript' );
422
+			remove_action( 'admin_footer', 'wpbooklist_new_lib_shortcode_action_javascript' );
423
+			remove_action( 'admin_footer', 'wpbooklist_dashboard_save_library_display_options_action_javascript' );
424
+			remove_action( 'admin_footer', 'wpbooklist_dashboard_save_post_display_options_action_javascript' );
425
+			remove_action( 'admin_footer', 'wpbooklist_dashboard_save_page_display_options_action_javascript' );
426
+			remove_action( 'admin_footer', 'wpbooklist_update_display_options_action_javascript' );
427
+			remove_action( 'admin_footer', 'wpbooklist_edit_book_pagination_action_javascript' );
428
+			remove_action( 'admin_footer', 'wpbooklist_edit_book_switch_lib_action_javascript' );
429
+			remove_action( 'admin_footer', 'wpbooklist_edit_book_search_action_javascript' );
430
+			remove_action( 'admin_footer', 'wpbooklist_edit_book_actual_action_javascript' );
431
+			remove_action( 'admin_footer', 'wpbooklist_delete_book_action_javascript' );
432
+			remove_action( 'admin_footer', 'wpbooklist_user_apis_action_javascript' );
433
+			remove_action( 'admin_footer', 'wpbooklist_upload_new_stylepak_action_javascript' );
434
+			remove_action( 'admin_footer', 'wpbooklist_upload_new_post_template_action_javascript' );
435
+			remove_action( 'admin_footer', 'wpbooklist_upload_new_page_template_action_javascript' );
436
+			remove_action( 'admin_footer', 'wpbooklist_create_db_library_backup_action_javascript' );
437
+			remove_action( 'admin_footer', 'wpbooklist_restore_db_library_backup_action_javascript' );
438
+			remove_action( 'admin_footer', 'wpbooklist_create_csv_action_javascript' );
439
+			remove_action( 'admin_footer', 'wpbooklist_amazon_localization_action_javascript' );
440
+			remove_action( 'admin_footer', 'wpbooklist_delete_book_bulk_action_javascript' );
441
+			remove_action( 'admin_footer', 'wpbooklist_reorder_action_javascript' );
442
+			remove_action( 'admin_footer', 'wpbooklist_exit_results_action_javascript' );
443
+			remove_action( 'admin_footer', 'wpbooklist_storytime_select_category_action_javascript' );
444
+			remove_action( 'admin_footer', 'wpbooklist_storytime_get_story_action_javascript' );
445
+			remove_action( 'admin_footer', 'wpbooklist_storytime_expand_browse_action_javascript' );
446
+			remove_action( 'admin_footer', 'wpbooklist_storytime_save_settings_action_javascript' );
447
+			remove_action( 'admin_footer', 'wpbooklist_delete_story_action_javascript' );
448 448
 }
449 449
 add_action( 'admin_enqueue_scripts', 'monsterinsights_remove_conflicting_asset_files', 9999 );
450 450
 
@@ -456,66 +456,66 @@  discard block
 block discarded – undo
456 456
  *
457 457
  * @return null Return early if not on the proper screen.
458 458
  */
459
-function hide_non_monsterinsights_warnings () {
459
+function hide_non_monsterinsights_warnings() {
460 460
 	// Bail if we're not on a MonsterInsights screen.
461 461
 	if ( empty( $_REQUEST['page'] ) || strpos( $_REQUEST['page'], 'monsterinsights' ) === false ) {
462 462
 		return;
463 463
 	}
464 464
 
465 465
 	global $wp_filter;
466
-	if ( !empty( $wp_filter['user_admin_notices']->callbacks ) && is_array( $wp_filter['user_admin_notices']->callbacks ) ) {
467
-		foreach( $wp_filter['user_admin_notices']->callbacks as $priority => $hooks ) {
466
+	if ( ! empty( $wp_filter['user_admin_notices']->callbacks ) && is_array( $wp_filter['user_admin_notices']->callbacks ) ) {
467
+		foreach ( $wp_filter['user_admin_notices']->callbacks as $priority => $hooks ) {
468 468
 			foreach ( $hooks as $name => $arr ) {
469 469
 				if ( is_object( $arr['function'] ) && $arr['function'] instanceof Closure ) {
470
-					unset( $wp_filter['user_admin_notices']->callbacks[ $priority ][ $name ] );
470
+					unset( $wp_filter['user_admin_notices']->callbacks[$priority][$name] );
471 471
 					continue;
472 472
 				}
473 473
 				if ( ! empty( $arr['function'][0] ) && is_object( $arr['function'][0] ) && strpos( strtolower( get_class( $arr['function'][0] ) ), 'monsterinsights' ) !== false ) {
474 474
 					continue;
475 475
 				}
476
-				if ( !empty( $name ) && strpos( $name, 'monsterinsights' ) === false ) {
476
+				if ( ! empty( $name ) && strpos( $name, 'monsterinsights' ) === false ) {
477 477
 					unset( $wp_filter['user_admin_notices']->callbacks[$priority][$name] );
478 478
 				}
479 479
 			}
480 480
 		}
481 481
 	}
482 482
 
483
-	if ( !empty( $wp_filter['admin_notices']->callbacks ) && is_array( $wp_filter['admin_notices']->callbacks ) ) {
484
-		foreach( $wp_filter['admin_notices']->callbacks as $priority => $hooks ) {
483
+	if ( ! empty( $wp_filter['admin_notices']->callbacks ) && is_array( $wp_filter['admin_notices']->callbacks ) ) {
484
+		foreach ( $wp_filter['admin_notices']->callbacks as $priority => $hooks ) {
485 485
 			foreach ( $hooks as $name => $arr ) {
486 486
 				if ( is_object( $arr['function'] ) && $arr['function'] instanceof Closure ) {
487
-					unset( $wp_filter['admin_notices']->callbacks[ $priority ][ $name ] );
487
+					unset( $wp_filter['admin_notices']->callbacks[$priority][$name] );
488 488
 					continue;
489 489
 				}
490 490
 				if ( ! empty( $arr['function'][0] ) && is_object( $arr['function'][0] ) && strpos( strtolower( get_class( $arr['function'][0] ) ), 'monsterinsights' ) !== false ) {
491 491
 					continue;
492 492
 				}
493
-				if ( !empty( $name ) && strpos( $name, 'monsterinsights' ) === false ) {
493
+				if ( ! empty( $name ) && strpos( $name, 'monsterinsights' ) === false ) {
494 494
 					unset( $wp_filter['admin_notices']->callbacks[$priority][$name] );
495 495
 				}
496 496
 			}
497 497
 		}
498 498
 	}
499 499
 
500
-	if ( !empty( $wp_filter['all_admin_notices']->callbacks ) && is_array( $wp_filter['all_admin_notices']->callbacks ) ) {
501
-		foreach( $wp_filter['all_admin_notices']->callbacks as $priority => $hooks ) {
500
+	if ( ! empty( $wp_filter['all_admin_notices']->callbacks ) && is_array( $wp_filter['all_admin_notices']->callbacks ) ) {
501
+		foreach ( $wp_filter['all_admin_notices']->callbacks as $priority => $hooks ) {
502 502
 			foreach ( $hooks as $name => $arr ) {
503 503
 				if ( is_object( $arr['function'] ) && $arr['function'] instanceof Closure ) {
504
-					unset( $wp_filter['all_admin_notices']->callbacks[ $priority ][ $name ] );
504
+					unset( $wp_filter['all_admin_notices']->callbacks[$priority][$name] );
505 505
 					continue;
506 506
 				}
507 507
 				if ( ! empty( $arr['function'][0] ) && is_object( $arr['function'][0] ) && strpos( strtolower( get_class( $arr['function'][0] ) ), 'monsterinsights' ) !== false ) {
508 508
 					continue;
509 509
 				}
510
-				if ( !empty( $name ) && strpos( $name, 'monsterinsights' ) === false ) {
510
+				if ( ! empty( $name ) && strpos( $name, 'monsterinsights' ) === false ) {
511 511
 					unset( $wp_filter['all_admin_notices']->callbacks[$priority][$name] );
512 512
 				}
513 513
 			}
514 514
 		}
515 515
 	}
516 516
 }
517
-add_action('admin_print_scripts', 'hide_non_monsterinsights_warnings');  
518
-add_action('admin_head', 'hide_non_monsterinsights_warnings', PHP_INT_MAX  );  
517
+add_action( 'admin_print_scripts', 'hide_non_monsterinsights_warnings' );  
518
+add_action( 'admin_head', 'hide_non_monsterinsights_warnings', PHP_INT_MAX );  
519 519
 
520 520
 /**
521 521
  * Called whenever an upgrade button / link is displayed in Lite, this function will
@@ -544,33 +544,33 @@  discard block
 block discarded – undo
544 544
 	}
545 545
 
546 546
 	// Get the ShareASale ID
547
-	$shareasale_id   = monsterinsights_get_shareasale_id();
547
+	$shareasale_id = monsterinsights_get_shareasale_id();
548 548
 
549 549
 	// If we have a shareasale ID return the shareasale url
550 550
 	if ( ! empty( $shareasale_id ) ) {
551
-		$shareasale_id  = absint( $shareasale_id );
551
+		$shareasale_id = absint( $shareasale_id );
552 552
 		return esc_url( monsterinsights_get_shareasale_url( $shareasale_id, $url ) );
553 553
 	} else {
554 554
 		return esc_url( $url );
555 555
 	}
556 556
 }
557 557
 
558
-function monsterinsights_get_url( $medium = '', $campaign = '', $url = '', $escape = true  ) {
558
+function monsterinsights_get_url( $medium = '', $campaign = '', $url = '', $escape = true ) {
559 559
 	// Setup Campaign variables
560
-	$source          = monsterinsights_is_pro_version()   ? 'proplugin' : 'liteplugin';
561
-	$medium          = ! empty( $medium )   ? $medium     : 'defaultmedium';
562
-	$campaign        = ! empty( $campaign ) ? $campaign   : 'defaultcampaign';
563
-	$content 		 = MONSTERINSIGHTS_VERSION;
564
-	$default_url     = monsterinsights_is_pro_version()   ? '' : 'lite/';
560
+	$source          = monsterinsights_is_pro_version() ? 'proplugin' : 'liteplugin';
561
+	$medium          = ! empty( $medium ) ? $medium : 'defaultmedium';
562
+	$campaign        = ! empty( $campaign ) ? $campaign : 'defaultcampaign';
563
+	$content = MONSTERINSIGHTS_VERSION;
564
+	$default_url     = monsterinsights_is_pro_version() ? '' : 'lite/';
565 565
 	$url             = ! empty( $url ) ? $url : 'https://www.monsterinsights.com/' . $default_url;
566 566
 
567 567
 	// Put together redirect URL
568 568
 	$url = add_query_arg(
569 569
 		array(
570
-		    'utm_source'   => $source,   // Pro/Lite Plugin
571
-		    'utm_medium'   => sanitize_key( $medium ),   // Area of MonsterInsights (example Reports)
570
+		    'utm_source'   => $source, // Pro/Lite Plugin
571
+		    'utm_medium'   => sanitize_key( $medium ), // Area of MonsterInsights (example Reports)
572 572
 		    'utm_campaign' => sanitize_key( $campaign ), // Which link (example eCommerce Report)
573
-		    'utm_content'  => $content,  // Version number of MI
573
+		    'utm_content'  => $content, // Version number of MI
574 574
 		),
575 575
 		trailingslashit( $url )
576 576
 	);
@@ -608,13 +608,13 @@  discard block
 block discarded – undo
608 608
 	$custom = false;
609 609
 	if ( defined( 'MONSTERINSIGHTS_SHAREASALE_REDIRECT_URL' ) ) {
610 610
 		$shareasale_redirect = MONSTERINSIGHTS_SHAREASALE_REDIRECT_URL;
611
-		$custom 			 = true;
611
+		$custom = true;
612 612
 	}
613 613
 
614 614
 	// If there's no constant, check if there's an option.
615 615
 	if ( empty( $custom ) ) {
616 616
 		$shareasale_redirect = get_option( 'monsterinsights_shareasale_redirect_url', '' );
617
-		$custom 			 = true;
617
+		$custom = true;
618 618
 	}
619 619
 
620 620
 	// Whether we have an ID or not, filter the ID.
@@ -623,7 +623,7 @@  discard block
 block discarded – undo
623 623
 	return $shareasale_url;
624 624
 }
625 625
 
626
-function monsterinsights_settings_ublock_error_js(){
626
+function monsterinsights_settings_ublock_error_js() {
627 627
 	echo "<script type='text/javascript'>\n";
628 628
 	echo "jQuery( document ).ready( function( $ ) {
629 629
 			if ( window.uorigindetected == null){
@@ -639,9 +639,9 @@  discard block
 block discarded – undo
639 639
 }
640 640
 
641 641
 function monsterinsights_ublock_notice() {
642
-	ob_start();?>
642
+	ob_start(); ?>
643 643
 	<div id="monsterinsights-ublock-origin-error" class="error inline" style="display:none;">
644
-		<?php echo sprintf( esc_html__( 'MonsterInsights has detected that it\'s files are being blocked. This is usually caused by a adblock browser plugin (particularly uBlock Origin), or a conflicting WordPress theme or plugin. This issue only affects the admin side of MonsterInsights. To solve this, ensure MonsterInsights is whitelisted for your website URL in any adblock browser plugin you use. For step by step directions on how to do this, %1$sclick here%2$s. If this doesn\'t solve the issue (rare), send us a ticket %3$shere%2$s and we\'ll be happy to help diagnose the issue.', 'google-analytics-for-wordpress'), '<a href="https://monsterinsights.com/docs/monsterinsights-asset-files-blocked/" target="_blank" rel="noopener noreferrer" referrer="no-referrer">', '</a>', '<a href="https://monsterinsights.com/contact/" target="_blank" rel="noopener noreferrer" referrer="no-referrer">');
644
+		<?php echo sprintf( esc_html__( 'MonsterInsights has detected that it\'s files are being blocked. This is usually caused by a adblock browser plugin (particularly uBlock Origin), or a conflicting WordPress theme or plugin. This issue only affects the admin side of MonsterInsights. To solve this, ensure MonsterInsights is whitelisted for your website URL in any adblock browser plugin you use. For step by step directions on how to do this, %1$sclick here%2$s. If this doesn\'t solve the issue (rare), send us a ticket %3$shere%2$s and we\'ll be happy to help diagnose the issue.', 'google-analytics-for-wordpress' ), '<a href="https://monsterinsights.com/docs/monsterinsights-asset-files-blocked/" target="_blank" rel="noopener noreferrer" referrer="no-referrer">', '</a>', '<a href="https://monsterinsights.com/contact/" target="_blank" rel="noopener noreferrer" referrer="no-referrer">' );
645 645
 		?>
646 646
 	</div>
647 647
 	<?php
Please login to merge, or discard this patch.
includes/admin/admin.php 3 patches
Braces   +8 added lines, -6 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="'. monsterinsights_get_url( 'admin-notices', 'expired-license', "https://www.monsterinsights.com/login/" ) .'" target="_blank" rel="noopener noreferrer" referrer="no-referrer">', '</a>' );
295 297
             } else if ( MonsterInsights()->license->site_license_disabled() ) {
@@ -346,7 +348,7 @@  discard block
 block discarded – undo
346 348
     $authed   = MonsterInsights()->auth->is_authed() || MonsterInsights()->auth->is_network_authed();
347 349
     $url      = is_network_admin() ? network_admin_url( 'admin.php?page=monsterinsights_network' ) : admin_url( 'admin.php?page=monsterinsights_settings' );
348 350
 
349
-    if ( empty( $authed ) && ! isset( $notices['monsterinsights_auth_not_manual' ] ) ) { 
351
+    if ( empty( $authed ) && ! isset( $notices['monsterinsights_auth_not_manual' ] ) ) {
350 352
         echo '<div class="notice notice-info is-dismissible monsterinsights-notice" data-notice="monsterinsights_auth_not_manual">';
351 353
             echo '<p>';
352 354
             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>' ); 
@@ -372,7 +374,7 @@  discard block
 block discarded – undo
372 374
 
373 375
     // 7. WooUpsell
374 376
     if ( ! monsterinsights_is_pro_version() && class_exists( 'WooCommerce' ) ) {
375
-        if ( ! isset( $notices['monsterinsights_woocommerce_tracking_available' ] ) ) { 
377
+        if ( ! isset( $notices['monsterinsights_woocommerce_tracking_available' ] ) ) {
376 378
             echo '<div class="notice notice-success is-dismissible monsterinsights-notice monsterinsights-wooedd-upsell-row" data-notice="monsterinsights_woocommerce_tracking_available">';
377 379
                 echo '<div class="monsterinsights-wooedd-upsell-left">';
378 380
                     echo '<p><strong>';
@@ -403,7 +405,7 @@  discard block
 block discarded – undo
403 405
 
404 406
     // 8. EDDUpsell
405 407
     if ( ! monsterinsights_is_pro_version() && class_exists( 'Easy_Digital_Downloads' ) ) {
406
-        if ( ! isset( $notices['monsterinsights_edd_tracking_available' ] ) ) { 
408
+        if ( ! isset( $notices['monsterinsights_edd_tracking_available' ] ) ) {
407 409
             echo '<div class="notice notice-success is-dismissible monsterinsights-notice monsterinsights-wooedd-upsell-row" data-notice="monsterinsights_edd_tracking_available">';
408 410
                 echo '<div class="monsterinsights-wooedd-upsell-left">';
409 411
                     echo '<p><strong>';
Please login to merge, or discard this patch.
Indentation   +140 added lines, -140 removed lines patch added patch discarded remove patch
@@ -33,24 +33,24 @@  discard block
 block discarded – undo
33 33
     $hook = 'monsterinsights_settings';
34 34
 
35 35
     if ( $dashboards_disabled || ! $is_authed || ( current_user_can( 'monsterinsights_save_settings' ) && ! current_user_can( 'monsterinsights_view_dashboard' ) ) ) {
36
-        // If dashboards disabled, first settings page
37
-        add_menu_page( __( 'Settings:', 'google-analytics-for-wordpress' ), __( 'Insights', 'google-analytics-for-wordpress' ), 'monsterinsights_save_settings', 'monsterinsights_settings', 'monsterinsights_settings_page',  plugins_url( 'assets/css/images/[email protected]', $base->file ), '100.00013467543' );
38
-        $hook = 'monsterinsights_settings';
36
+	// If dashboards disabled, first settings page
37
+	add_menu_page( __( 'Settings:', 'google-analytics-for-wordpress' ), __( 'Insights', 'google-analytics-for-wordpress' ), 'monsterinsights_save_settings', 'monsterinsights_settings', 'monsterinsights_settings_page',  plugins_url( 'assets/css/images/[email protected]', $base->file ), '100.00013467543' );
38
+	$hook = 'monsterinsights_settings';
39 39
 
40
-        add_submenu_page( $hook, __( 'Settings:', 'google-analytics-for-wordpress' ), __( 'Settings', 'google-analytics-for-wordpress' ), 'monsterinsights_save_settings', 'monsterinsights_settings' );
41
-        add_submenu_page( $hook, __( 'Settings - Tracking:', 'google-analytics-for-wordpress' ), __( 'Settings - Tracking', 'google-analytics-for-wordpress' ), 'monsterinsights_save_settings', 'monsterinsights_tracking', 'monsterinsights_tracking_page' );
40
+	add_submenu_page( $hook, __( 'Settings:', 'google-analytics-for-wordpress' ), __( 'Settings', 'google-analytics-for-wordpress' ), 'monsterinsights_save_settings', 'monsterinsights_settings' );
41
+	add_submenu_page( $hook, __( 'Settings - Tracking:', 'google-analytics-for-wordpress' ), __( 'Settings - Tracking', 'google-analytics-for-wordpress' ), 'monsterinsights_save_settings', 'monsterinsights_tracking', 'monsterinsights_tracking_page' );
42 42
     } else {
43
-        // if dashboards enabled, first dashboard
44
-        add_menu_page( __( 'General:', 'google-analytics-for-wordpress' ), __( 'Insights', 'google-analytics-for-wordpress' ), 'monsterinsights_view_dashboard', 'monsterinsights_reports', 'monsterinsights_reports_page',  plugins_url( 'assets/css/images/[email protected]', $base->file ), '100.00013467543' );
43
+	// if dashboards enabled, first dashboard
44
+	add_menu_page( __( 'General:', 'google-analytics-for-wordpress' ), __( 'Insights', 'google-analytics-for-wordpress' ), 'monsterinsights_view_dashboard', 'monsterinsights_reports', 'monsterinsights_reports_page',  plugins_url( 'assets/css/images/[email protected]', $base->file ), '100.00013467543' );
45 45
 
46
-        $hook = 'monsterinsights_reports';
46
+	$hook = 'monsterinsights_reports';
47 47
 
48
-        add_submenu_page( $hook, __( 'General Reports:', 'google-analytics-for-wordpress' ), __( 'Reports', 'google-analytics-for-wordpress' ), 'monsterinsights_view_dashboard', 'monsterinsights_reports', 'monsterinsights_reports_page' );
48
+	add_submenu_page( $hook, __( 'General Reports:', 'google-analytics-for-wordpress' ), __( 'Reports', 'google-analytics-for-wordpress' ), 'monsterinsights_view_dashboard', 'monsterinsights_reports', 'monsterinsights_reports_page' );
49 49
 
50
-        // then settings page
51
-        add_submenu_page( $hook, __( 'Settings:', 'google-analytics-for-wordpress' ), __( 'Settings', 'google-analytics-for-wordpress' ), 'monsterinsights_save_settings', 'monsterinsights_settings', 'monsterinsights_settings_page' );
50
+	// then settings page
51
+	add_submenu_page( $hook, __( 'Settings:', 'google-analytics-for-wordpress' ), __( 'Settings', 'google-analytics-for-wordpress' ), 'monsterinsights_save_settings', 'monsterinsights_settings', 'monsterinsights_settings_page' );
52 52
 
53
-        add_submenu_page( $hook, __( 'Settings - Tracking:', 'google-analytics-for-wordpress' ), __( 'Settings - Tracking', 'google-analytics-for-wordpress' ), 'monsterinsights_save_settings', 'monsterinsights_tracking', 'monsterinsights_tracking_page' );
53
+	add_submenu_page( $hook, __( 'Settings - Tracking:', 'google-analytics-for-wordpress' ), __( 'Settings - Tracking', 'google-analytics-for-wordpress' ), 'monsterinsights_save_settings', 'monsterinsights_tracking', 'monsterinsights_tracking_page' );
54 54
 
55 55
     }
56 56
     
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
     // then addons
61 61
     $network_key = MonsterInsights()->license->get_network_license_key();
62 62
     if ( ! monsterinsights_is_network_active() || ( monsterinsights_is_network_active() && empty( $network_key ) ) ) {
63
-        add_submenu_page( $hook, __( 'Addons:', 'google-analytics-for-wordpress' ), '<span style="color:#7cc048"> ' . __( 'Addons', 'google-analytics-for-wordpress' ) . '</span>', 'monsterinsights_save_settings', 'monsterinsights_addons', 'monsterinsights_addons_page' );
63
+	add_submenu_page( $hook, __( 'Addons:', 'google-analytics-for-wordpress' ), '<span style="color:#7cc048"> ' . __( 'Addons', 'google-analytics-for-wordpress' ) . '</span>', 'monsterinsights_save_settings', 'monsterinsights_addons', 'monsterinsights_addons_page' );
64 64
     }
65 65
 }
66 66
 add_action( 'admin_menu', 'monsterinsights_admin_menu' );
@@ -74,12 +74,12 @@  discard block
 block discarded – undo
74 74
     // First, let's see if this is an MS network enabled plugin. If it is, we should load the license 
75 75
     // menu page and the updater on the network panel
76 76
     if ( ! function_exists( 'is_plugin_active_for_network' ) ) {
77
-        require_once( ABSPATH . '/wp-admin/includes/plugin.php' );
77
+	require_once( ABSPATH . '/wp-admin/includes/plugin.php' );
78 78
     }
79 79
 
80 80
     $plugin = plugin_basename( MONSTERINSIGHTS_PLUGIN_FILE );
81 81
     if ( ! is_plugin_active_for_network( $plugin ) ) {
82
-        return;
82
+	return;
83 83
     }
84 84
 
85 85
     $hook = 'monsterinsights_network';
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
 function monsterinsights_add_admin_body_class( $classes ) {
104 104
     $screen = get_current_screen(); 
105 105
     if ( empty( $screen->id ) || strpos( $screen->id, 'monsterinsights' ) === false ) {
106
-        return $classes;
106
+	return $classes;
107 107
     }
108 108
        
109 109
     return "$classes monsterinsights_page ";
@@ -123,17 +123,17 @@  discard block
 block discarded – undo
123 123
 
124 124
     // If lite, show a link where they can get pro from
125 125
     if ( ! monsterinsights_is_pro_version() ) {
126
-        $get_pro = '<a title="' . esc_html__( 'Get MonsterInsights Pro', 'google-analytics-for-wordpress' ) .'" href="'. monsterinsights_get_upgrade_link( 'all-plugins', 'upgrade-link', "https://www.monsterinsights.com/docs/" ) .'">' . esc_html__( 'Get MonsterInsights Pro', 'google-analytics-for-wordpress' ) . '</a>';
127
-        array_unshift( $links, $get_pro );
126
+	$get_pro = '<a title="' . esc_html__( 'Get MonsterInsights Pro', 'google-analytics-for-wordpress' ) .'" href="'. monsterinsights_get_upgrade_link( 'all-plugins', 'upgrade-link', "https://www.monsterinsights.com/docs/" ) .'">' . esc_html__( 'Get MonsterInsights Pro', 'google-analytics-for-wordpress' ) . '</a>';
127
+	array_unshift( $links, $get_pro );
128 128
     }
129 129
 
130 130
     // If Lite, support goes to forum. If pro, it goes to our website
131 131
     if ( monsterinsights_is_pro_version() ) {
132
-        $support = '<a title="MonsterInsights Pro Support" href="'. monsterinsights_get_url( 'all-plugins', 'pro-support-link', "https://www.monsterinsights.com/my-account/support/" ) .'">' . esc_html__( 'Support', 'google-analytics-for-wordpress' ) . '</a>';
133
-        array_unshift( $links, $support );
132
+	$support = '<a title="MonsterInsights Pro Support" href="'. monsterinsights_get_url( 'all-plugins', 'pro-support-link', "https://www.monsterinsights.com/my-account/support/" ) .'">' . esc_html__( 'Support', 'google-analytics-for-wordpress' ) . '</a>';
133
+	array_unshift( $links, $support );
134 134
     } else {
135
-        $support = '<a title="MonsterInsights Lite Support" href="'. monsterinsights_get_url( 'all-plugins', 'lite-support-link', "https://www.monsterinsights.com/lite-support/" ) .'">' . esc_html__( 'Support', 'google-analytics-for-wordpress' ) . '</a>';
136
-        array_unshift( $links, $support );
135
+	$support = '<a title="MonsterInsights Lite Support" href="'. monsterinsights_get_url( 'all-plugins', 'lite-support-link', "https://www.monsterinsights.com/lite-support/" ) .'">' . esc_html__( 'Support', 'google-analytics-for-wordpress' ) . '</a>';
136
+	array_unshift( $links, $support );
137 137
     }
138 138
 
139 139
     $settings_link = '<a href="' . esc_url( admin_url( 'admin.php?page=monsterinsights_settings' ) ) . '">' . esc_html__( 'Settings', 'google-analytics-for-wordpress' ) . '</a>';
@@ -158,26 +158,26 @@  discard block
 block discarded – undo
158 158
 function monsterinsights_load_admin_partial( $template, $data = array() ) {
159 159
 
160 160
     if ( monsterinsights_is_pro_version() ) {
161
-        $dir = trailingslashit( plugin_dir_path( MonsterInsights()->file ) . 'pro/includes/admin/partials' );
161
+	$dir = trailingslashit( plugin_dir_path( MonsterInsights()->file ) . 'pro/includes/admin/partials' );
162 162
     
163
-        if ( file_exists( $dir . $template . '.php' ) ) {
164
-            require_once(  $dir . $template . '.php' );
165
-            return true;
166
-        }
163
+	if ( file_exists( $dir . $template . '.php' ) ) {
164
+	    require_once(  $dir . $template . '.php' );
165
+	    return true;
166
+	}
167 167
     } else {
168
-        $dir = trailingslashit( plugin_dir_path( MonsterInsights()->file ) . 'lite/includes/admin/partials' );
168
+	$dir = trailingslashit( plugin_dir_path( MonsterInsights()->file ) . 'lite/includes/admin/partials' );
169 169
     
170
-        if ( file_exists( $dir . $template . '.php' ) ) {
171
-            require_once(  $dir . $template . '.php' );
172
-            return true;
173
-        }   
170
+	if ( file_exists( $dir . $template . '.php' ) ) {
171
+	    require_once(  $dir . $template . '.php' );
172
+	    return true;
173
+	}   
174 174
     }
175 175
         
176 176
     $dir = trailingslashit( plugin_dir_path( MonsterInsights()->file ) . 'includes/admin/partials' );
177 177
 
178 178
     if ( file_exists( $dir . $template . '.php' ) ) {
179
-        require_once(  $dir . $template . '.php' );
180
-        return true;
179
+	require_once(  $dir . $template . '.php' );
180
+	return true;
181 181
     }
182 182
                 
183 183
     return false;
@@ -193,15 +193,15 @@  discard block
 block discarded – undo
193 193
     // Get the current screen, and check whether we're viewing a MonsterInsights screen;
194 194
     $screen = get_current_screen(); 
195 195
     if ( empty( $screen->id ) || strpos( $screen->id, 'monsterinsights' ) === false ) {
196
-        return;
196
+	return;
197 197
     }
198 198
 
199 199
     // If here, we're on an MonsterInsights screen, so output the header.
200 200
     monsterinsights_load_admin_partial( 'header', array(
201
-        'mascot'   => plugins_url( 'assets/css/images/mascot.png', MonsterInsights()->file ),
202
-        'logo'     => plugins_url( 'assets/css/images/logo.png', MonsterInsights()->file ),
203
-        '2xmascot' => plugins_url( 'assets/css/images/[email protected]', MonsterInsights()->file ),
204
-        '2xlogo'   => plugins_url( 'assets/css/images/[email protected]', MonsterInsights()->file ),
201
+	'mascot'   => plugins_url( 'assets/css/images/mascot.png', MonsterInsights()->file ),
202
+	'logo'     => plugins_url( 'assets/css/images/logo.png', MonsterInsights()->file ),
203
+	'2xmascot' => plugins_url( 'assets/css/images/[email protected]', MonsterInsights()->file ),
204
+	'2xlogo'   => plugins_url( 'assets/css/images/[email protected]', MonsterInsights()->file ),
205 205
     ) );
206 206
 }
207 207
 add_action( 'in_admin_header','monsterinsights_admin_header', 100 );
@@ -209,7 +209,7 @@  discard block
 block discarded – undo
209 209
 function monsterinsights_welcome_redirect() {
210 210
     // Bail if no activation redirect
211 211
     if ( ! get_transient( '_monsterinsights_activation_redirect' ) ) {
212
-        return;
212
+	return;
213 213
     }
214 214
 
215 215
     // Delete the redirect transient
@@ -217,15 +217,15 @@  discard block
 block discarded – undo
217 217
 
218 218
     // Bail if activating from network, or bulk
219 219
     if ( is_network_admin() || isset( $_GET['activate-multi'] ) ) {
220
-        return;
220
+	return;
221 221
     }
222 222
 
223 223
     $upgrade = get_option( 'monsterinsights_version_upgraded_from' );
224 224
     if( ! $upgrade ) { // First time install
225
-        //wp_safe_redirect( admin_url( 'admin.php?page=monsterinsights_settings#monsterinsights-main-tab-general' ) ); exit;
225
+	//wp_safe_redirect( admin_url( 'admin.php?page=monsterinsights_settings#monsterinsights-main-tab-general' ) ); exit;
226 226
     } else { // Update
227
-        return;
228
-        //wp_safe_redirect( admin_url( 'admin.php?page=monsterinsights_settings#monsterinsights-main-tab-general' ) ); exit;
227
+	return;
228
+	//wp_safe_redirect( admin_url( 'admin.php?page=monsterinsights_settings#monsterinsights-main-tab-general' ) ); exit;
229 229
     }
230 230
 }
231 231
 //add_action( 'admin_init', 'monsterinsights_welcome_redirect', 11 ); @todo: Investigate
@@ -241,8 +241,8 @@  discard block
 block discarded – undo
241 241
 function monsterinsights_admin_footer( $text ) {
242 242
     global $current_screen;
243 243
     if ( ! empty( $current_screen->id ) && strpos( $current_screen->id, 'monsterinsights' ) !== false ) {
244
-        $url  = 'https://wordpress.org/support/view/plugin-reviews/google-analytics-for-wordpress?filter=5';
245
-        $text = sprintf( esc_html__( 'Please rate %sMonsterInsights%s %s on %sWordPress.org%s to help us spread the word. Thank you from the MonsterInsights team!', 'google-analytics-for-wordpress' ), '<strong>', '</strong>', '<a class="monsterinsights-no-text-decoration" href="' .  $url . '" target="_blank" rel="noopener noreferrer">&#9733;&#9733;&#9733;&#9733;&#9733;</a>', '<a href="' . $url . '" target="_blank" rel="noopener noreferrer">', '</a>' );
244
+	$url  = 'https://wordpress.org/support/view/plugin-reviews/google-analytics-for-wordpress?filter=5';
245
+	$text = sprintf( esc_html__( 'Please rate %sMonsterInsights%s %s on %sWordPress.org%s to help us spread the word. Thank you from the MonsterInsights team!', 'google-analytics-for-wordpress' ), '<strong>', '</strong>', '<a class="monsterinsights-no-text-decoration" href="' .  $url . '" target="_blank" rel="noopener noreferrer">&#9733;&#9733;&#9733;&#9733;&#9733;</a>', '<a href="' . $url . '" target="_blank" rel="noopener noreferrer">', '</a>' );
246 246
     }
247 247
     return $text;
248 248
 }
@@ -253,12 +253,12 @@  discard block
 block discarded – undo
253 253
     // Don't show on MonsterInsights pages
254 254
     $screen = get_current_screen(); 
255 255
     if ( empty( $screen->id ) || strpos( $screen->id, 'monsterinsights' ) !== false ) {
256
-        return;
256
+	return;
257 257
     }
258 258
 
259 259
     // Make sure they have the permissions to do something
260 260
     if ( ! current_user_can( 'monsterinsights_save_settings' ) ) {
261
-        return;
261
+	return;
262 262
     }
263 263
 
264 264
     // Priority:
@@ -271,45 +271,45 @@  discard block
 block discarded – undo
271 271
 
272 272
     // 1. Google Analytics not authenticated
273 273
     if ( ! is_network_admin() && ! monsterinsights_get_ua() ) {
274
-        $page = admin_url( 'admin.php?page=monsterinsights_settings' );
275
-        $message = sprintf( esc_html__( 'Please configure your %1$sGoogle Analytics settings%2$s!', 'google-analytics-for-wordpress' ),'<a href="' . $page . '">', '</a>' );
276
-        echo '<div class="error"><p>'. $message.'</p></div>';
277
-        return;
274
+	$page = admin_url( 'admin.php?page=monsterinsights_settings' );
275
+	$message = sprintf( esc_html__( 'Please configure your %1$sGoogle Analytics settings%2$s!', 'google-analytics-for-wordpress' ),'<a href="' . $page . '">', '</a>' );
276
+	echo '<div class="error"><p>'. $message.'</p></div>';
277
+	return;
278 278
     }
279 279
 
280 280
     // 2. License key not entered for pro
281 281
     $key = monsterinsights_is_pro_version() ? MonsterInsights()->license->get_license_key() : '';
282 282
     if ( monsterinsights_is_pro_version() && empty( $key ) ) {
283
-        $page = is_network_admin() ? network_admin_url( 'admin.php?page=monsterinsights_network' ) : admin_url( 'admin.php?page=monsterinsights_settings' );
284
-        $message = sprintf( esc_html__( 'Warning: No valid license key has been entered for MonsterInsights. You are currently not getting updates, and are not able to view reports. %1$sPlease click here to enter your license key and begin receiving updates and reports.%2$s', 'google-analytics-for-wordpress' ), '<a href="'. esc_url( $page ) . '">', '</a>' );
285
-        echo '<div class="error"><p>'. $message.'</p></div>';
286
-        return;
283
+	$page = is_network_admin() ? network_admin_url( 'admin.php?page=monsterinsights_network' ) : admin_url( 'admin.php?page=monsterinsights_settings' );
284
+	$message = sprintf( esc_html__( 'Warning: No valid license key has been entered for MonsterInsights. You are currently not getting updates, and are not able to view reports. %1$sPlease click here to enter your license key and begin receiving updates and reports.%2$s', 'google-analytics-for-wordpress' ), '<a href="'. esc_url( $page ) . '">', '</a>' );
285
+	echo '<div class="error"><p>'. $message.'</p></div>';
286
+	return;
287 287
     }
288 288
 
289 289
     // 3. License key not valid/okay for pro
290 290
     if ( monsterinsights_is_pro_version() ) {
291
-        $message = '';
292
-        if ( MonsterInsights()->license->get_site_license_key() ){
293
-            if ( MonsterInsights()->license->site_license_expired() ) {
294
-                $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="'. monsterinsights_get_url( 'admin-notices', 'expired-license', "https://www.monsterinsights.com/login/" ) .'" target="_blank" rel="noopener noreferrer" referrer="no-referrer">', '</a>' );
295
-            } else if ( MonsterInsights()->license->site_license_disabled() ) {
296
-                $message = esc_html__( 'Your license key for MonsterInsights has been disabled. Please use a different key.', 'google-analytics-for-wordpress' );
297
-            } else if ( MonsterInsights()->license->site_license_invalid() ) {
298
-                $message = esc_html__( 'Your license key for MonsterInsights is invalid. The key no longer exists or the user associated with the key has been deleted. Please use a different key.', 'google-analytics-for-wordpress' );
299
-            }
300
-        } else if ( MonsterInsights()->license->get_network_license_key() ) {
301
-            if ( MonsterInsights()->license->network_license_expired() ) {
302
-                $message = sprintf( esc_html__( 'Your network license key for MonsterInsights has expired. %1$sPlease click here to renew your license key.%2$s', 'google-analytics-for-wordpress' ), '<a href="'. monsterinsights_get_url( 'admin-notices', 'expired-license', "https://www.monsterinsights.com/login/" ) .'" target="_blank" rel="noopener noreferrer" referrer="no-referrer">', '</a>' );
303
-            } else if ( MonsterInsights()->license->network_license_disabled() ) {
304
-                $message = esc_html__( 'Your network license key for MonsterInsights has been disabled. Please use a different key.', 'google-analytics-for-wordpress' );
305
-            } else if ( MonsterInsights()->license->network_license_invalid() ) {
306
-                $message = esc_html__( 'Your network license key for MonsterInsights is invalid. The key no longer exists or the user associated with the key has been deleted. Please use a different key.', 'google-analytics-for-wordpress' );
307
-            }
308
-        }
309
-        if ( ! empty( $message ) ) {
310
-            echo '<div class="error"><p>'. $message.'</p></div>';
311
-            return;
312
-        }
291
+	$message = '';
292
+	if ( MonsterInsights()->license->get_site_license_key() ){
293
+	    if ( MonsterInsights()->license->site_license_expired() ) {
294
+		$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="'. monsterinsights_get_url( 'admin-notices', 'expired-license', "https://www.monsterinsights.com/login/" ) .'" target="_blank" rel="noopener noreferrer" referrer="no-referrer">', '</a>' );
295
+	    } else if ( MonsterInsights()->license->site_license_disabled() ) {
296
+		$message = esc_html__( 'Your license key for MonsterInsights has been disabled. Please use a different key.', 'google-analytics-for-wordpress' );
297
+	    } else if ( MonsterInsights()->license->site_license_invalid() ) {
298
+		$message = esc_html__( 'Your license key for MonsterInsights is invalid. The key no longer exists or the user associated with the key has been deleted. Please use a different key.', 'google-analytics-for-wordpress' );
299
+	    }
300
+	} else if ( MonsterInsights()->license->get_network_license_key() ) {
301
+	    if ( MonsterInsights()->license->network_license_expired() ) {
302
+		$message = sprintf( esc_html__( 'Your network license key for MonsterInsights has expired. %1$sPlease click here to renew your license key.%2$s', 'google-analytics-for-wordpress' ), '<a href="'. monsterinsights_get_url( 'admin-notices', 'expired-license', "https://www.monsterinsights.com/login/" ) .'" target="_blank" rel="noopener noreferrer" referrer="no-referrer">', '</a>' );
303
+	    } else if ( MonsterInsights()->license->network_license_disabled() ) {
304
+		$message = esc_html__( 'Your network license key for MonsterInsights has been disabled. Please use a different key.', 'google-analytics-for-wordpress' );
305
+	    } else if ( MonsterInsights()->license->network_license_invalid() ) {
306
+		$message = esc_html__( 'Your network license key for MonsterInsights is invalid. The key no longer exists or the user associated with the key has been deleted. Please use a different key.', 'google-analytics-for-wordpress' );
307
+	    }
308
+	}
309
+	if ( ! empty( $message ) ) {
310
+	    echo '<div class="error"><p>'. $message.'</p></div>';
311
+	    return;
312
+	}
313 313
     }
314 314
 
315 315
     // 4. Optin setting not configured
@@ -339,7 +339,7 @@  discard block
 block discarded – undo
339 339
 
340 340
     $notices   = get_option( 'monsterinsights_notices' );
341 341
     if ( ! is_array( $notices ) ) {
342
-        $notices = array();
342
+	$notices = array();
343 343
     }
344 344
 
345 345
     // 5. Authenticate, not manual
@@ -347,12 +347,12 @@  discard block
 block discarded – undo
347 347
     $url      = is_network_admin() ? network_admin_url( 'admin.php?page=monsterinsights_network' ) : admin_url( 'admin.php?page=monsterinsights_settings' );
348 348
 
349 349
     if ( empty( $authed ) && ! isset( $notices['monsterinsights_auth_not_manual' ] ) ) { 
350
-        echo '<div class="notice notice-info is-dismissible monsterinsights-notice" data-notice="monsterinsights_auth_not_manual">';
351
-            echo '<p>';
352
-            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>' ); 
353
-            echo '</p>';
354
-        echo '</div>';
355
-        return;
350
+	echo '<div class="notice notice-info is-dismissible monsterinsights-notice" data-notice="monsterinsights_auth_not_manual">';
351
+	    echo '<p>';
352
+	    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>' ); 
353
+	    echo '</p>';
354
+	echo '</div>';
355
+	return;
356 356
     }
357 357
 
358 358
     // 6. Automatic updates not configured
@@ -372,64 +372,64 @@  discard block
 block discarded – undo
372 372
 
373 373
     // 7. WooUpsell
374 374
     if ( ! monsterinsights_is_pro_version() && class_exists( 'WooCommerce' ) ) {
375
-        if ( ! isset( $notices['monsterinsights_woocommerce_tracking_available' ] ) ) { 
376
-            echo '<div class="notice notice-success is-dismissible monsterinsights-notice monsterinsights-wooedd-upsell-row" data-notice="monsterinsights_woocommerce_tracking_available">';
377
-                echo '<div class="monsterinsights-wooedd-upsell-left">';
378
-                    echo '<p><strong>';
379
-                    echo esc_html( 'Enhanced Ecommerce Analytics for Your WooCommerce Store', 'google-analytics-for-wordpress' );
380
-                    echo '</strong></p>';
381
-                    echo '<img class="monsterinsights-wooedd-upsell-image monsterinsights-wooedd-upsell-image-small" src="' . trailingslashit( MONSTERINSIGHTS_PLUGIN_URL ) . 'assets/images/upsell/woo-edd-upsell.png">';
382
-                    echo '<p>';
383
-                    echo esc_html( 'MonsterInsights Pro gives you detailed stats and insights about your customers.', 'google-analytics-for-wordpress' );
384
-                    echo '</p>';
385
-                    echo '<p>';
386
-                    echo esc_html( 'This helps you make data-driven decisions about your content, and marketing strategy so you can increase your website traffic, leads, and sales.', 'google-analytics-for-wordpress' );
387
-                    echo '</p>';
388
-                    echo '<p>';
389
-                    echo esc_html( 'Pro customers also get Form Tracking, Custom Dimensions Tracking, UserID Tracking and much more.', 'google-analytics-for-wordpress' );
390
-                    echo '</p>';
391
-                    echo '<p>';
392
-                    echo esc_html( 'Start making data-driven decisions to grow your business.', 'google-analytics-for-wordpress' );
393
-                    echo '</p>';
394
-                    echo sprintf( esc_html__( '%1$sGet MonsterInsights Pro%2$s', 'google-analytics-for-wordpress' ), '<a class="button button-primary button-hero" href="'. monsterinsights_get_upgrade_link( 'admin-notices', 'woocommerce-upgrade' ) .'">', ' &raquo;</a>' ); 
395
-                    echo '</p>';
396
-                echo '</div><div class="monsterinsights-wooedd-upsell-right">';
397
-                    echo '<img class="monsterinsights-wooedd-upsell-image monsterinsights-wooedd-upsell-image-large" src="' . trailingslashit( MONSTERINSIGHTS_PLUGIN_URL ) . 'assets/images/upsell/woo-edd-upsell.png">';
398
-                echo '</div>';
399
-            echo '</div>';
400
-            return;
401
-        }
375
+	if ( ! isset( $notices['monsterinsights_woocommerce_tracking_available' ] ) ) { 
376
+	    echo '<div class="notice notice-success is-dismissible monsterinsights-notice monsterinsights-wooedd-upsell-row" data-notice="monsterinsights_woocommerce_tracking_available">';
377
+		echo '<div class="monsterinsights-wooedd-upsell-left">';
378
+		    echo '<p><strong>';
379
+		    echo esc_html( 'Enhanced Ecommerce Analytics for Your WooCommerce Store', 'google-analytics-for-wordpress' );
380
+		    echo '</strong></p>';
381
+		    echo '<img class="monsterinsights-wooedd-upsell-image monsterinsights-wooedd-upsell-image-small" src="' . trailingslashit( MONSTERINSIGHTS_PLUGIN_URL ) . 'assets/images/upsell/woo-edd-upsell.png">';
382
+		    echo '<p>';
383
+		    echo esc_html( 'MonsterInsights Pro gives you detailed stats and insights about your customers.', 'google-analytics-for-wordpress' );
384
+		    echo '</p>';
385
+		    echo '<p>';
386
+		    echo esc_html( 'This helps you make data-driven decisions about your content, and marketing strategy so you can increase your website traffic, leads, and sales.', 'google-analytics-for-wordpress' );
387
+		    echo '</p>';
388
+		    echo '<p>';
389
+		    echo esc_html( 'Pro customers also get Form Tracking, Custom Dimensions Tracking, UserID Tracking and much more.', 'google-analytics-for-wordpress' );
390
+		    echo '</p>';
391
+		    echo '<p>';
392
+		    echo esc_html( 'Start making data-driven decisions to grow your business.', 'google-analytics-for-wordpress' );
393
+		    echo '</p>';
394
+		    echo sprintf( esc_html__( '%1$sGet MonsterInsights Pro%2$s', 'google-analytics-for-wordpress' ), '<a class="button button-primary button-hero" href="'. monsterinsights_get_upgrade_link( 'admin-notices', 'woocommerce-upgrade' ) .'">', ' &raquo;</a>' ); 
395
+		    echo '</p>';
396
+		echo '</div><div class="monsterinsights-wooedd-upsell-right">';
397
+		    echo '<img class="monsterinsights-wooedd-upsell-image monsterinsights-wooedd-upsell-image-large" src="' . trailingslashit( MONSTERINSIGHTS_PLUGIN_URL ) . 'assets/images/upsell/woo-edd-upsell.png">';
398
+		echo '</div>';
399
+	    echo '</div>';
400
+	    return;
401
+	}
402 402
     }
403 403
 
404 404
     // 8. EDDUpsell
405 405
     if ( ! monsterinsights_is_pro_version() && class_exists( 'Easy_Digital_Downloads' ) ) {
406
-        if ( ! isset( $notices['monsterinsights_edd_tracking_available' ] ) ) { 
407
-            echo '<div class="notice notice-success is-dismissible monsterinsights-notice monsterinsights-wooedd-upsell-row" data-notice="monsterinsights_edd_tracking_available">';
408
-                echo '<div class="monsterinsights-wooedd-upsell-left">';
409
-                    echo '<p><strong>';
410
-                    echo esc_html( 'Enhanced Ecommerce Analytics for Your Easy Digital Downloads Store', 'google-analytics-for-wordpress' );
411
-                    echo '</strong></p>';
412
-                    echo '<img class="monsterinsights-wooedd-upsell-image monsterinsights-wooedd-upsell-image-small" src="' . trailingslashit( MONSTERINSIGHTS_PLUGIN_URL ) . 'assets/images/upsell/woo-edd-upsell.png">';
413
-                    echo '<p>';
414
-                    echo esc_html( 'MonsterInsights Pro gives you detailed stats and insights about your customers.', 'google-analytics-for-wordpress' );
415
-                    echo '</p>';
416
-                    echo '<p>';
417
-                    echo esc_html( 'This helps you make data-driven decisions about your content, and marketing strategy so you can increase your website traffic, leads, and sales.', 'google-analytics-for-wordpress' );
418
-                    echo '</p>';
419
-                    echo '<p>';
420
-                    echo esc_html( 'Pro customers also get Form Tracking, Custom Dimensions Tracking, UserID Tracking and much more.', 'google-analytics-for-wordpress' );
421
-                    echo '</p>';
422
-                    echo '<p>';
423
-                    echo esc_html( 'Start making data-driven decisions to grow your business.', 'google-analytics-for-wordpress' );
424
-                    echo '</p>';
425
-                    echo sprintf( esc_html__( '%1$sGet MonsterInsights Pro%2$s', 'google-analytics-for-wordpress' ), '<a class="button button-primary button-hero" href="'. monsterinsights_get_upgrade_link( 'admin-notices', 'edd-upgrade' ) .'">', ' &raquo;</a>' ); 
426
-                    echo '</p>';
427
-                echo '</div><div class="monsterinsights-wooedd-upsell-right">';
428
-                    echo '<img class="monsterinsights-wooedd-upsell-image monsterinsights-wooedd-upsell-image-large" src="' . trailingslashit( MONSTERINSIGHTS_PLUGIN_URL ) . 'assets/images/upsell/woo-edd-upsell.png">';
429
-                echo '</div>';
430
-            echo '</div>';
431
-            return;
432
-        }
406
+	if ( ! isset( $notices['monsterinsights_edd_tracking_available' ] ) ) { 
407
+	    echo '<div class="notice notice-success is-dismissible monsterinsights-notice monsterinsights-wooedd-upsell-row" data-notice="monsterinsights_edd_tracking_available">';
408
+		echo '<div class="monsterinsights-wooedd-upsell-left">';
409
+		    echo '<p><strong>';
410
+		    echo esc_html( 'Enhanced Ecommerce Analytics for Your Easy Digital Downloads Store', 'google-analytics-for-wordpress' );
411
+		    echo '</strong></p>';
412
+		    echo '<img class="monsterinsights-wooedd-upsell-image monsterinsights-wooedd-upsell-image-small" src="' . trailingslashit( MONSTERINSIGHTS_PLUGIN_URL ) . 'assets/images/upsell/woo-edd-upsell.png">';
413
+		    echo '<p>';
414
+		    echo esc_html( 'MonsterInsights Pro gives you detailed stats and insights about your customers.', 'google-analytics-for-wordpress' );
415
+		    echo '</p>';
416
+		    echo '<p>';
417
+		    echo esc_html( 'This helps you make data-driven decisions about your content, and marketing strategy so you can increase your website traffic, leads, and sales.', 'google-analytics-for-wordpress' );
418
+		    echo '</p>';
419
+		    echo '<p>';
420
+		    echo esc_html( 'Pro customers also get Form Tracking, Custom Dimensions Tracking, UserID Tracking and much more.', 'google-analytics-for-wordpress' );
421
+		    echo '</p>';
422
+		    echo '<p>';
423
+		    echo esc_html( 'Start making data-driven decisions to grow your business.', 'google-analytics-for-wordpress' );
424
+		    echo '</p>';
425
+		    echo sprintf( esc_html__( '%1$sGet MonsterInsights Pro%2$s', 'google-analytics-for-wordpress' ), '<a class="button button-primary button-hero" href="'. monsterinsights_get_upgrade_link( 'admin-notices', 'edd-upgrade' ) .'">', ' &raquo;</a>' ); 
426
+		    echo '</p>';
427
+		echo '</div><div class="monsterinsights-wooedd-upsell-right">';
428
+		    echo '<img class="monsterinsights-wooedd-upsell-image monsterinsights-wooedd-upsell-image-large" src="' . trailingslashit( MONSTERINSIGHTS_PLUGIN_URL ) . 'assets/images/upsell/woo-edd-upsell.png">';
429
+		echo '</div>';
430
+	    echo '</div>';
431
+	    return;
432
+	}
433 433
     }
434 434
 }
435 435
 add_action( 'admin_notices', 'monsterinsights_admin_setup_notices' );
@@ -439,7 +439,7 @@  discard block
 block discarded – undo
439 439
 // AM Notices
440 440
 function monsterinsights_am_notice_optout( $super_admin ) {
441 441
     if ( monsterinsights_get_option( 'hide_am_notices', false ) || monsterinsights_get_option( 'network_hide_am_notices', false ) ) {
442
-        return false;
442
+	return false;
443 443
     }
444 444
     return $super_admin;
445 445
 }
Please login to merge, or discard this patch.
Spacing   +28 added lines, -28 removed lines patch added patch discarded remove patch
@@ -34,14 +34,14 @@  discard block
 block discarded – undo
34 34
 
35 35
     if ( $dashboards_disabled || ! $is_authed || ( current_user_can( 'monsterinsights_save_settings' ) && ! current_user_can( 'monsterinsights_view_dashboard' ) ) ) {
36 36
         // If dashboards disabled, first settings page
37
-        add_menu_page( __( 'Settings:', 'google-analytics-for-wordpress' ), __( 'Insights', 'google-analytics-for-wordpress' ), 'monsterinsights_save_settings', 'monsterinsights_settings', 'monsterinsights_settings_page',  plugins_url( 'assets/css/images/[email protected]', $base->file ), '100.00013467543' );
37
+        add_menu_page( __( 'Settings:', 'google-analytics-for-wordpress' ), __( 'Insights', 'google-analytics-for-wordpress' ), 'monsterinsights_save_settings', 'monsterinsights_settings', 'monsterinsights_settings_page', plugins_url( 'assets/css/images/[email protected]', $base->file ), '100.00013467543' );
38 38
         $hook = 'monsterinsights_settings';
39 39
 
40 40
         add_submenu_page( $hook, __( 'Settings:', 'google-analytics-for-wordpress' ), __( 'Settings', 'google-analytics-for-wordpress' ), 'monsterinsights_save_settings', 'monsterinsights_settings' );
41 41
         add_submenu_page( $hook, __( 'Settings - Tracking:', 'google-analytics-for-wordpress' ), __( 'Settings - Tracking', 'google-analytics-for-wordpress' ), 'monsterinsights_save_settings', 'monsterinsights_tracking', 'monsterinsights_tracking_page' );
42 42
     } else {
43 43
         // if dashboards enabled, first dashboard
44
-        add_menu_page( __( 'General:', 'google-analytics-for-wordpress' ), __( 'Insights', 'google-analytics-for-wordpress' ), 'monsterinsights_view_dashboard', 'monsterinsights_reports', 'monsterinsights_reports_page',  plugins_url( 'assets/css/images/[email protected]', $base->file ), '100.00013467543' );
44
+        add_menu_page( __( 'General:', 'google-analytics-for-wordpress' ), __( 'Insights', 'google-analytics-for-wordpress' ), 'monsterinsights_view_dashboard', 'monsterinsights_reports', 'monsterinsights_reports_page', plugins_url( 'assets/css/images/[email protected]', $base->file ), '100.00013467543' );
45 45
 
46 46
         $hook = 'monsterinsights_reports';
47 47
 
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
     }
84 84
 
85 85
     $hook = 'monsterinsights_network';
86
-    add_menu_page( __( 'Network Settings:', 'google-analytics-for-wordpress' ), __( 'Insights', 'google-analytics-for-wordpress' ), 'monsterinsights_save_settings', 'monsterinsights_network', 'monsterinsights_network_page',  plugins_url( 'assets/css/images/[email protected]', $base->file ), '100.00013467543' );
86
+    add_menu_page( __( 'Network Settings:', 'google-analytics-for-wordpress' ), __( 'Insights', 'google-analytics-for-wordpress' ), 'monsterinsights_save_settings', 'monsterinsights_network', 'monsterinsights_network_page', plugins_url( 'assets/css/images/[email protected]', $base->file ), '100.00013467543' );
87 87
 
88 88
     add_submenu_page( $hook, __( 'Network Settings:', 'google-analytics-for-wordpress' ), __( 'Network Settings', 'google-analytics-for-wordpress' ), 'monsterinsights_save_settings', 'monsterinsights_network', 'monsterinsights_network_page' );
89 89
 
@@ -118,21 +118,21 @@  discard block
 block discarded – undo
118 118
  * @return array $links
119 119
  */
120 120
 function monsterinsights_add_action_links( $links ) {
121
-    $docs = '<a title="' . esc_html__( 'MonsterInsights Knowledge Base', 'google-analytics-for-wordpress' ) . '" href="'. monsterinsights_get_url( 'all-plugins', 'kb-link', "https://www.monsterinsights.com/docs/" ) .'"">' . esc_html__( 'Documentation', 'google-analytics-for-wordpress' ) . '</a>';
121
+    $docs = '<a title="' . esc_html__( 'MonsterInsights Knowledge Base', 'google-analytics-for-wordpress' ) . '" href="' . monsterinsights_get_url( 'all-plugins', 'kb-link', "https://www.monsterinsights.com/docs/" ) . '"">' . esc_html__( 'Documentation', 'google-analytics-for-wordpress' ) . '</a>';
122 122
     array_unshift( $links, $docs );
123 123
 
124 124
     // If lite, show a link where they can get pro from
125 125
     if ( ! monsterinsights_is_pro_version() ) {
126
-        $get_pro = '<a title="' . esc_html__( 'Get MonsterInsights Pro', 'google-analytics-for-wordpress' ) .'" href="'. monsterinsights_get_upgrade_link( 'all-plugins', 'upgrade-link', "https://www.monsterinsights.com/docs/" ) .'">' . esc_html__( 'Get MonsterInsights Pro', 'google-analytics-for-wordpress' ) . '</a>';
126
+        $get_pro = '<a title="' . esc_html__( 'Get MonsterInsights Pro', 'google-analytics-for-wordpress' ) . '" href="' . monsterinsights_get_upgrade_link( 'all-plugins', 'upgrade-link', "https://www.monsterinsights.com/docs/" ) . '">' . esc_html__( 'Get MonsterInsights Pro', 'google-analytics-for-wordpress' ) . '</a>';
127 127
         array_unshift( $links, $get_pro );
128 128
     }
129 129
 
130 130
     // If Lite, support goes to forum. If pro, it goes to our website
131 131
     if ( monsterinsights_is_pro_version() ) {
132
-        $support = '<a title="MonsterInsights Pro Support" href="'. monsterinsights_get_url( 'all-plugins', 'pro-support-link', "https://www.monsterinsights.com/my-account/support/" ) .'">' . esc_html__( 'Support', 'google-analytics-for-wordpress' ) . '</a>';
132
+        $support = '<a title="MonsterInsights Pro Support" href="' . monsterinsights_get_url( 'all-plugins', 'pro-support-link', "https://www.monsterinsights.com/my-account/support/" ) . '">' . esc_html__( 'Support', 'google-analytics-for-wordpress' ) . '</a>';
133 133
         array_unshift( $links, $support );
134 134
     } else {
135
-        $support = '<a title="MonsterInsights Lite Support" href="'. monsterinsights_get_url( 'all-plugins', 'lite-support-link', "https://www.monsterinsights.com/lite-support/" ) .'">' . esc_html__( 'Support', 'google-analytics-for-wordpress' ) . '</a>';
135
+        $support = '<a title="MonsterInsights Lite Support" href="' . monsterinsights_get_url( 'all-plugins', 'lite-support-link', "https://www.monsterinsights.com/lite-support/" ) . '">' . esc_html__( 'Support', 'google-analytics-for-wordpress' ) . '</a>';
136 136
         array_unshift( $links, $support );
137 137
     }
138 138
 
@@ -161,14 +161,14 @@  discard block
 block discarded – undo
161 161
         $dir = trailingslashit( plugin_dir_path( MonsterInsights()->file ) . 'pro/includes/admin/partials' );
162 162
     
163 163
         if ( file_exists( $dir . $template . '.php' ) ) {
164
-            require_once(  $dir . $template . '.php' );
164
+            require_once( $dir . $template . '.php' );
165 165
             return true;
166 166
         }
167 167
     } else {
168 168
         $dir = trailingslashit( plugin_dir_path( MonsterInsights()->file ) . 'lite/includes/admin/partials' );
169 169
     
170 170
         if ( file_exists( $dir . $template . '.php' ) ) {
171
-            require_once(  $dir . $template . '.php' );
171
+            require_once( $dir . $template . '.php' );
172 172
             return true;
173 173
         }   
174 174
     }
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
     $dir = trailingslashit( plugin_dir_path( MonsterInsights()->file ) . 'includes/admin/partials' );
177 177
 
178 178
     if ( file_exists( $dir . $template . '.php' ) ) {
179
-        require_once(  $dir . $template . '.php' );
179
+        require_once( $dir . $template . '.php' );
180 180
         return true;
181 181
     }
182 182
                 
@@ -204,7 +204,7 @@  discard block
 block discarded – undo
204 204
         '2xlogo'   => plugins_url( 'assets/css/images/[email protected]', MonsterInsights()->file ),
205 205
     ) );
206 206
 }
207
-add_action( 'in_admin_header','monsterinsights_admin_header', 100 );
207
+add_action( 'in_admin_header', 'monsterinsights_admin_header', 100 );
208 208
 
209 209
 function monsterinsights_welcome_redirect() {
210 210
     // Bail if no activation redirect
@@ -221,7 +221,7 @@  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 ) { // First time install
225 225
         //wp_safe_redirect( admin_url( 'admin.php?page=monsterinsights_settings#monsterinsights-main-tab-general' ) ); exit;
226 226
     } else { // Update
227 227
         return;
@@ -242,7 +242,7 @@  discard block
 block discarded – undo
242 242
     global $current_screen;
243 243
     if ( ! empty( $current_screen->id ) && strpos( $current_screen->id, 'monsterinsights' ) !== false ) {
244 244
         $url  = 'https://wordpress.org/support/view/plugin-reviews/google-analytics-for-wordpress?filter=5';
245
-        $text = sprintf( esc_html__( 'Please rate %sMonsterInsights%s %s on %sWordPress.org%s to help us spread the word. Thank you from the MonsterInsights team!', 'google-analytics-for-wordpress' ), '<strong>', '</strong>', '<a class="monsterinsights-no-text-decoration" href="' .  $url . '" target="_blank" rel="noopener noreferrer">&#9733;&#9733;&#9733;&#9733;&#9733;</a>', '<a href="' . $url . '" target="_blank" rel="noopener noreferrer">', '</a>' );
245
+        $text = sprintf( esc_html__( 'Please rate %sMonsterInsights%s %s on %sWordPress.org%s to help us spread the word. Thank you from the MonsterInsights team!', 'google-analytics-for-wordpress' ), '<strong>', '</strong>', '<a class="monsterinsights-no-text-decoration" href="' . $url . '" target="_blank" rel="noopener noreferrer">&#9733;&#9733;&#9733;&#9733;&#9733;</a>', '<a href="' . $url . '" target="_blank" rel="noopener noreferrer">', '</a>' );
246 246
     }
247 247
     return $text;
248 248
 }
@@ -272,8 +272,8 @@  discard block
 block discarded – undo
272 272
     // 1. Google Analytics not authenticated
273 273
     if ( ! is_network_admin() && ! monsterinsights_get_ua() ) {
274 274
         $page = admin_url( 'admin.php?page=monsterinsights_settings' );
275
-        $message = sprintf( esc_html__( 'Please configure your %1$sGoogle Analytics settings%2$s!', 'google-analytics-for-wordpress' ),'<a href="' . $page . '">', '</a>' );
276
-        echo '<div class="error"><p>'. $message.'</p></div>';
275
+        $message = sprintf( esc_html__( 'Please configure your %1$sGoogle Analytics settings%2$s!', 'google-analytics-for-wordpress' ), '<a href="' . $page . '">', '</a>' );
276
+        echo '<div class="error"><p>' . $message . '</p></div>';
277 277
         return;
278 278
     }
279 279
 
@@ -281,17 +281,17 @@  discard block
 block discarded – undo
281 281
     $key = monsterinsights_is_pro_version() ? MonsterInsights()->license->get_license_key() : '';
282 282
     if ( monsterinsights_is_pro_version() && empty( $key ) ) {
283 283
         $page = is_network_admin() ? network_admin_url( 'admin.php?page=monsterinsights_network' ) : admin_url( 'admin.php?page=monsterinsights_settings' );
284
-        $message = sprintf( esc_html__( 'Warning: No valid license key has been entered for MonsterInsights. You are currently not getting updates, and are not able to view reports. %1$sPlease click here to enter your license key and begin receiving updates and reports.%2$s', 'google-analytics-for-wordpress' ), '<a href="'. esc_url( $page ) . '">', '</a>' );
285
-        echo '<div class="error"><p>'. $message.'</p></div>';
284
+        $message = sprintf( esc_html__( 'Warning: No valid license key has been entered for MonsterInsights. You are currently not getting updates, and are not able to view reports. %1$sPlease click here to enter your license key and begin receiving updates and reports.%2$s', 'google-analytics-for-wordpress' ), '<a href="' . esc_url( $page ) . '">', '</a>' );
285
+        echo '<div class="error"><p>' . $message . '</p></div>';
286 286
         return;
287 287
     }
288 288
 
289 289
     // 3. License key not valid/okay for pro
290 290
     if ( monsterinsights_is_pro_version() ) {
291 291
         $message = '';
292
-        if ( MonsterInsights()->license->get_site_license_key() ){
292
+        if ( MonsterInsights()->license->get_site_license_key() ) {
293 293
             if ( MonsterInsights()->license->site_license_expired() ) {
294
-                $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="'. monsterinsights_get_url( 'admin-notices', 'expired-license', "https://www.monsterinsights.com/login/" ) .'" target="_blank" rel="noopener noreferrer" referrer="no-referrer">', '</a>' );
294
+                $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="' . monsterinsights_get_url( 'admin-notices', 'expired-license', "https://www.monsterinsights.com/login/" ) . '" target="_blank" rel="noopener noreferrer" referrer="no-referrer">', '</a>' );
295 295
             } else if ( MonsterInsights()->license->site_license_disabled() ) {
296 296
                 $message = esc_html__( 'Your license key for MonsterInsights has been disabled. Please use a different key.', 'google-analytics-for-wordpress' );
297 297
             } else if ( MonsterInsights()->license->site_license_invalid() ) {
@@ -299,7 +299,7 @@  discard block
 block discarded – undo
299 299
             }
300 300
         } else if ( MonsterInsights()->license->get_network_license_key() ) {
301 301
             if ( MonsterInsights()->license->network_license_expired() ) {
302
-                $message = sprintf( esc_html__( 'Your network license key for MonsterInsights has expired. %1$sPlease click here to renew your license key.%2$s', 'google-analytics-for-wordpress' ), '<a href="'. monsterinsights_get_url( 'admin-notices', 'expired-license', "https://www.monsterinsights.com/login/" ) .'" target="_blank" rel="noopener noreferrer" referrer="no-referrer">', '</a>' );
302
+                $message = sprintf( esc_html__( 'Your network license key for MonsterInsights has expired. %1$sPlease click here to renew your license key.%2$s', 'google-analytics-for-wordpress' ), '<a href="' . monsterinsights_get_url( 'admin-notices', 'expired-license', "https://www.monsterinsights.com/login/" ) . '" target="_blank" rel="noopener noreferrer" referrer="no-referrer">', '</a>' );
303 303
             } else if ( MonsterInsights()->license->network_license_disabled() ) {
304 304
                 $message = esc_html__( 'Your network license key for MonsterInsights has been disabled. Please use a different key.', 'google-analytics-for-wordpress' );
305 305
             } else if ( MonsterInsights()->license->network_license_invalid() ) {
@@ -307,7 +307,7 @@  discard block
 block discarded – undo
307 307
             }
308 308
         }
309 309
         if ( ! empty( $message ) ) {
310
-            echo '<div class="error"><p>'. $message.'</p></div>';
310
+            echo '<div class="error"><p>' . $message . '</p></div>';
311 311
             return;
312 312
         }
313 313
     }
@@ -337,7 +337,7 @@  discard block
 block discarded – undo
337 337
     //     }
338 338
     // }
339 339
 
340
-    $notices   = get_option( 'monsterinsights_notices' );
340
+    $notices = get_option( 'monsterinsights_notices' );
341 341
     if ( ! is_array( $notices ) ) {
342 342
         $notices = array();
343 343
     }
@@ -346,10 +346,10 @@  discard block
 block discarded – undo
346 346
     $authed   = MonsterInsights()->auth->is_authed() || MonsterInsights()->auth->is_network_authed();
347 347
     $url      = is_network_admin() ? network_admin_url( 'admin.php?page=monsterinsights_network' ) : admin_url( 'admin.php?page=monsterinsights_settings' );
348 348
 
349
-    if ( empty( $authed ) && ! isset( $notices['monsterinsights_auth_not_manual' ] ) ) { 
349
+    if ( empty( $authed ) && ! isset( $notices['monsterinsights_auth_not_manual'] ) ) { 
350 350
         echo '<div class="notice notice-info is-dismissible monsterinsights-notice" data-notice="monsterinsights_auth_not_manual">';
351 351
             echo '<p>';
352
-            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>' ); 
352
+            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>' ); 
353 353
             echo '</p>';
354 354
         echo '</div>';
355 355
         return;
@@ -372,7 +372,7 @@  discard block
 block discarded – undo
372 372
 
373 373
     // 7. WooUpsell
374 374
     if ( ! monsterinsights_is_pro_version() && class_exists( 'WooCommerce' ) ) {
375
-        if ( ! isset( $notices['monsterinsights_woocommerce_tracking_available' ] ) ) { 
375
+        if ( ! isset( $notices['monsterinsights_woocommerce_tracking_available'] ) ) { 
376 376
             echo '<div class="notice notice-success is-dismissible monsterinsights-notice monsterinsights-wooedd-upsell-row" data-notice="monsterinsights_woocommerce_tracking_available">';
377 377
                 echo '<div class="monsterinsights-wooedd-upsell-left">';
378 378
                     echo '<p><strong>';
@@ -391,7 +391,7 @@  discard block
 block discarded – undo
391 391
                     echo '<p>';
392 392
                     echo esc_html( 'Start making data-driven decisions to grow your business.', 'google-analytics-for-wordpress' );
393 393
                     echo '</p>';
394
-                    echo sprintf( esc_html__( '%1$sGet MonsterInsights Pro%2$s', 'google-analytics-for-wordpress' ), '<a class="button button-primary button-hero" href="'. monsterinsights_get_upgrade_link( 'admin-notices', 'woocommerce-upgrade' ) .'">', ' &raquo;</a>' ); 
394
+                    echo sprintf( esc_html__( '%1$sGet MonsterInsights Pro%2$s', 'google-analytics-for-wordpress' ), '<a class="button button-primary button-hero" href="' . monsterinsights_get_upgrade_link( 'admin-notices', 'woocommerce-upgrade' ) . '">', ' &raquo;</a>' ); 
395 395
                     echo '</p>';
396 396
                 echo '</div><div class="monsterinsights-wooedd-upsell-right">';
397 397
                     echo '<img class="monsterinsights-wooedd-upsell-image monsterinsights-wooedd-upsell-image-large" src="' . trailingslashit( MONSTERINSIGHTS_PLUGIN_URL ) . 'assets/images/upsell/woo-edd-upsell.png">';
@@ -403,7 +403,7 @@  discard block
 block discarded – undo
403 403
 
404 404
     // 8. EDDUpsell
405 405
     if ( ! monsterinsights_is_pro_version() && class_exists( 'Easy_Digital_Downloads' ) ) {
406
-        if ( ! isset( $notices['monsterinsights_edd_tracking_available' ] ) ) { 
406
+        if ( ! isset( $notices['monsterinsights_edd_tracking_available'] ) ) { 
407 407
             echo '<div class="notice notice-success is-dismissible monsterinsights-notice monsterinsights-wooedd-upsell-row" data-notice="monsterinsights_edd_tracking_available">';
408 408
                 echo '<div class="monsterinsights-wooedd-upsell-left">';
409 409
                     echo '<p><strong>';
@@ -422,7 +422,7 @@  discard block
 block discarded – undo
422 422
                     echo '<p>';
423 423
                     echo esc_html( 'Start making data-driven decisions to grow your business.', 'google-analytics-for-wordpress' );
424 424
                     echo '</p>';
425
-                    echo sprintf( esc_html__( '%1$sGet MonsterInsights Pro%2$s', 'google-analytics-for-wordpress' ), '<a class="button button-primary button-hero" href="'. monsterinsights_get_upgrade_link( 'admin-notices', 'edd-upgrade' ) .'">', ' &raquo;</a>' ); 
425
+                    echo sprintf( esc_html__( '%1$sGet MonsterInsights Pro%2$s', 'google-analytics-for-wordpress' ), '<a class="button button-primary button-hero" href="' . monsterinsights_get_upgrade_link( 'admin-notices', 'edd-upgrade' ) . '">', ' &raquo;</a>' ); 
426 426
                     echo '</p>';
427 427
                 echo '</div><div class="monsterinsights-wooedd-upsell-right">';
428 428
                     echo '<img class="monsterinsights-wooedd-upsell-image monsterinsights-wooedd-upsell-image-large" src="' . trailingslashit( MONSTERINSIGHTS_PLUGIN_URL ) . 'assets/images/upsell/woo-edd-upsell.png">';
Please login to merge, or discard this patch.