@@ -452,7 +452,7 @@ discard block |
||
452 | 452 | * |
453 | 453 | * @return void |
454 | 454 | */ |
455 | - public function load_licensing(){ |
|
455 | + public function load_licensing() { |
|
456 | 456 | if ( is_admin() || ( defined( 'DOING_CRON' ) && DOING_CRON ) ) { |
457 | 457 | require_once MONSTERINSIGHTS_PLUGIN_DIR . 'lite/includes/license-compat.php'; |
458 | 458 | self::$instance->license = new MonsterInsights_License_Compat(); |
@@ -712,7 +712,7 @@ discard block |
||
712 | 712 | * |
713 | 713 | * @return void |
714 | 714 | */ |
715 | -function monsterinsights_lite_call_install_and_upgrade(){ |
|
715 | +function monsterinsights_lite_call_install_and_upgrade() { |
|
716 | 716 | add_action( 'wp_loaded', 'monsterinsights_lite_install_and_upgrade' ); |
717 | 717 | } |
718 | 718 |
@@ -40,7 +40,8 @@ |
||
40 | 40 | // Load the MonsterInsights Connect class. |
41 | 41 | require_once MONSTERINSIGHTS_PLUGIN_DIR . 'lite/includes/admin/connect.php'; |
42 | 42 | |
43 | - if ( isset( $_GET['page'] ) && 'monsterinsights-onboarding' === $_GET['page'] ) { // WPCS: CSRF ok, input var ok. |
|
43 | + if ( isset( $_GET['page'] ) && 'monsterinsights-onboarding' === $_GET['page'] ) { |
|
44 | +// WPCS: CSRF ok, input var ok. |
|
44 | 45 | // Only load the Onboarding wizard if the required parameter is present. |
45 | 46 | require_once MONSTERINSIGHTS_PLUGIN_DIR . 'lite/includes/admin/onboarding-wizard.php'; |
46 | 47 | } |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | } |
68 | 68 | } |
69 | 69 | |
70 | - public function set_analytics_profile( $data = array() ){ |
|
70 | + public function set_analytics_profile( $data = array() ) { |
|
71 | 71 | update_option( 'monsterinsights_site_profile', $data ); |
72 | 72 | $this->profile = $data; |
73 | 73 | |
@@ -79,12 +79,12 @@ discard block |
||
79 | 79 | } |
80 | 80 | } |
81 | 81 | |
82 | - public function set_network_analytics_profile( $data = array() ){ |
|
82 | + public function set_network_analytics_profile( $data = array() ) { |
|
83 | 83 | update_site_option( 'monsterinsights_network_profile', $data ); |
84 | 84 | $this->network = $data; |
85 | 85 | } |
86 | 86 | |
87 | - public function delete_analytics_profile( $migrate = true ){ |
|
87 | + public function delete_analytics_profile( $migrate = true ) { |
|
88 | 88 | if ( $migrate ) { |
89 | 89 | $newdata = array(); |
90 | 90 | if ( isset( $this->profile['ua'] ) ) { |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | } |
99 | 99 | } |
100 | 100 | |
101 | - public function delete_network_analytics_profile( $migrate = true ){ |
|
101 | + public function delete_network_analytics_profile( $migrate = true ) { |
|
102 | 102 | if ( $migrate ) { |
103 | 103 | $newdata = array(); |
104 | 104 | if ( isset( $this->network['ua'] ) ) { |
@@ -188,55 +188,57 @@ discard block |
||
188 | 188 | return ! empty( $this->network['ua'] ) ? monsterinsights_is_valid_ua( $this->network['ua'] ) : ''; |
189 | 189 | } |
190 | 190 | |
191 | - public function get_viewname(){ |
|
191 | + public function get_viewname() { |
|
192 | 192 | return ! empty( $this->profile['viewname'] ) ? $this->profile['viewname'] : ''; |
193 | 193 | } |
194 | 194 | |
195 | - public function get_network_viewname(){ |
|
195 | + public function get_network_viewname() { |
|
196 | 196 | return ! empty( $this->network['viewname'] ) ? $this->network['viewname'] : ''; |
197 | 197 | } |
198 | 198 | |
199 | - public function get_accountid(){ |
|
199 | + public function get_accountid() { |
|
200 | 200 | return ! empty( $this->profile['a'] ) ? $this->profile['a'] : ''; |
201 | 201 | } |
202 | 202 | |
203 | - public function get_network_accountid(){ |
|
203 | + public function get_network_accountid() { |
|
204 | 204 | return ! empty( $this->network['a'] ) ? $this->network['a'] : ''; |
205 | 205 | } |
206 | 206 | |
207 | - public function get_propertyid(){ |
|
207 | + public function get_propertyid() { |
|
208 | 208 | return ! empty( $this->profile['w'] ) ? $this->profile['w'] : ''; |
209 | 209 | } |
210 | 210 | |
211 | - public function get_network_propertyid(){ |
|
211 | + public function get_network_propertyid() { |
|
212 | 212 | return ! empty( $this->network['w'] ) ? $this->network['w'] : ''; |
213 | 213 | } |
214 | 214 | |
215 | - public function get_viewid(){ // also known as profileID |
|
215 | + public function get_viewid() { |
|
216 | +// also known as profileID |
|
216 | 217 | return ! empty( $this->profile['p'] ) ? $this->profile['p'] : ''; |
217 | 218 | } |
218 | 219 | |
219 | - public function get_network_viewid(){ // also known as profileID |
|
220 | + public function get_network_viewid() { |
|
221 | +// also known as profileID |
|
220 | 222 | return ! empty( $this->network['p'] ) ? $this->network['p'] : ''; |
221 | 223 | } |
222 | 224 | |
223 | - public function get_key(){ |
|
225 | + public function get_key() { |
|
224 | 226 | return ! empty( $this->profile['key'] ) ? $this->profile['key'] : ''; |
225 | 227 | } |
226 | 228 | |
227 | - public function get_network_key(){ |
|
229 | + public function get_network_key() { |
|
228 | 230 | return ! empty( $this->network['key'] ) ? $this->network['key'] : ''; |
229 | 231 | } |
230 | 232 | |
231 | - public function get_token(){ |
|
233 | + public function get_token() { |
|
232 | 234 | return ! empty( $this->profile['token'] ) ? $this->profile['token'] : ''; |
233 | 235 | } |
234 | 236 | |
235 | - public function get_network_token(){ |
|
237 | + public function get_network_token() { |
|
236 | 238 | return ! empty( $this->network['token'] ) ? $this->network['token'] : ''; |
237 | 239 | } |
238 | 240 | |
239 | - public function get_referral_url(){ |
|
241 | + public function get_referral_url() { |
|
240 | 242 | $url = ''; |
241 | 243 | |
242 | 244 | if ( $this->is_authed() ) { |