@@ -195,14 +195,14 @@ discard block |
||
195 | 195 | } |
196 | 196 | |
197 | 197 | /** |
198 | - * Helper method for deleting a setting's value. |
|
199 | - * |
|
200 | - * @since 6.0.0 |
|
201 | - * @access public |
|
202 | - * |
|
203 | - * @param string $key The setting key. |
|
204 | - * @return boolean True if removed, false if not. |
|
205 | - */ |
|
198 | + * Helper method for deleting a setting's value. |
|
199 | + * |
|
200 | + * @since 6.0.0 |
|
201 | + * @access public |
|
202 | + * |
|
203 | + * @param string $key The setting key. |
|
204 | + * @return boolean True if removed, false if not. |
|
205 | + */ |
|
206 | 206 | function monsterinsights_delete_option( $key = '' ) { |
207 | 207 | // If no key, exit |
208 | 208 | if ( empty( $key ) ){ |
@@ -245,14 +245,14 @@ discard block |
||
245 | 245 | } |
246 | 246 | |
247 | 247 | /** |
248 | - * Helper method for deleting multiple settings value. |
|
249 | - * |
|
250 | - * @since 6.0.0 |
|
251 | - * @access public |
|
252 | - * |
|
253 | - * @param string $key The setting key. |
|
254 | - * @return boolean True if removed, false if not. |
|
255 | - */ |
|
248 | + * Helper method for deleting multiple settings value. |
|
249 | + * |
|
250 | + * @since 6.0.0 |
|
251 | + * @access public |
|
252 | + * |
|
253 | + * @param string $key The setting key. |
|
254 | + * @return boolean True if removed, false if not. |
|
255 | + */ |
|
256 | 256 | function monsterinsights_delete_options( $keys = array() ) { |
257 | 257 | // If no keys, exit |
258 | 258 | if ( empty( $keys ) || ! is_array( $keys ) ){ |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | */ |
48 | 48 | function monsterinsights_get_option( $key = '', $default = false ) { |
49 | 49 | global $monsterinsights_settings; |
50 | - $value = ! empty( $monsterinsights_settings[ $key ] ) ? $monsterinsights_settings[ $key ] : $default; |
|
50 | + $value = ! empty( $monsterinsights_settings[$key] ) ? $monsterinsights_settings[$key] : $default; |
|
51 | 51 | $value = apply_filters( 'monsterinsights_get_option', $value, $key, $default ); |
52 | 52 | return apply_filters( 'monsterinsights_get_option_' . $key, $value, $key, $default ); |
53 | 53 | } |
@@ -146,7 +146,7 @@ discard block |
||
146 | 146 | function monsterinsights_update_option( $key = '', $value = false ) { |
147 | 147 | |
148 | 148 | // If no key, exit |
149 | - if ( empty( $key ) ){ |
|
149 | + if ( empty( $key ) ) { |
|
150 | 150 | return false; |
151 | 151 | } |
152 | 152 | |
@@ -177,7 +177,7 @@ discard block |
||
177 | 177 | $value = apply_filters( 'monsterinsights_update_option', $value, $key ); |
178 | 178 | |
179 | 179 | // Next let's try to update the value |
180 | - $settings[ $key ] = $value; |
|
180 | + $settings[$key] = $value; |
|
181 | 181 | $did_update = false; |
182 | 182 | //if ( $update_network_option ) { |
183 | 183 | // $did_update = update_site_option( $option_name, $settings ); |
@@ -186,9 +186,9 @@ discard block |
||
186 | 186 | //} |
187 | 187 | |
188 | 188 | // If it updated, let's update the global variable |
189 | - if ( $did_update ){ |
|
189 | + if ( $did_update ) { |
|
190 | 190 | global $monsterinsights_settings; |
191 | - $monsterinsights_settings[ $key ] = $value; |
|
191 | + $monsterinsights_settings[$key] = $value; |
|
192 | 192 | } |
193 | 193 | |
194 | 194 | return $did_update; |
@@ -205,7 +205,7 @@ discard block |
||
205 | 205 | */ |
206 | 206 | function monsterinsights_delete_option( $key = '' ) { |
207 | 207 | // If no key, exit |
208 | - if ( empty( $key ) ){ |
|
208 | + if ( empty( $key ) ) { |
|
209 | 209 | return false; |
210 | 210 | } |
211 | 211 | |
@@ -224,8 +224,8 @@ discard block |
||
224 | 224 | //} |
225 | 225 | |
226 | 226 | // Next let's try to remove the key |
227 | - if( isset( $settings[ $key ] ) ) { |
|
228 | - unset( $settings[ $key ] ); |
|
227 | + if ( isset( $settings[$key] ) ) { |
|
228 | + unset( $settings[$key] ); |
|
229 | 229 | } |
230 | 230 | |
231 | 231 | $did_update = false; |
@@ -236,7 +236,7 @@ discard block |
||
236 | 236 | //} |
237 | 237 | |
238 | 238 | // If it updated, let's update the global variable |
239 | - if ( $did_update ){ |
|
239 | + if ( $did_update ) { |
|
240 | 240 | global $monsterinsights_settings; |
241 | 241 | $monsterinsights_settings = $settings; |
242 | 242 | } |
@@ -255,7 +255,7 @@ discard block |
||
255 | 255 | */ |
256 | 256 | function monsterinsights_delete_options( $keys = array() ) { |
257 | 257 | // If no keys, exit |
258 | - if ( empty( $keys ) || ! is_array( $keys ) ){ |
|
258 | + if ( empty( $keys ) || ! is_array( $keys ) ) { |
|
259 | 259 | return false; |
260 | 260 | } |
261 | 261 | |
@@ -275,8 +275,8 @@ discard block |
||
275 | 275 | |
276 | 276 | // Next let's try to remove the keys |
277 | 277 | foreach ( $keys as $key ) { |
278 | - if( isset( $settings[ $key ] ) ) { |
|
279 | - unset( $settings[ $key ] ); |
|
278 | + if ( isset( $settings[$key] ) ) { |
|
279 | + unset( $settings[$key] ); |
|
280 | 280 | } |
281 | 281 | } |
282 | 282 | |
@@ -288,7 +288,7 @@ discard block |
||
288 | 288 | //} |
289 | 289 | |
290 | 290 | // If it updated, let's update the global variable |
291 | - if ( $did_update ){ |
|
291 | + if ( $did_update ) { |
|
292 | 292 | global $monsterinsights_settings; |
293 | 293 | $monsterinsights_settings = $settings; |
294 | 294 | } |
@@ -379,8 +379,8 @@ discard block |
||
379 | 379 | ); |
380 | 380 | |
381 | 381 | foreach ( $exclude as $e ) { |
382 | - if ( ! empty( $settings[ $e ] ) ) { |
|
383 | - unset( $settings[ $e ] ); |
|
382 | + if ( ! empty( $settings[$e] ) ) { |
|
383 | + unset( $settings[$e] ); |
|
384 | 384 | } |
385 | 385 | } |
386 | 386 | return wp_json_encode( $settings ); |
@@ -146,7 +146,7 @@ discard block |
||
146 | 146 | function monsterinsights_update_option( $key = '', $value = false ) { |
147 | 147 | |
148 | 148 | // If no key, exit |
149 | - if ( empty( $key ) ){ |
|
149 | + if ( empty( $key ) ) { |
|
150 | 150 | return false; |
151 | 151 | } |
152 | 152 | |
@@ -186,7 +186,7 @@ discard block |
||
186 | 186 | //} |
187 | 187 | |
188 | 188 | // If it updated, let's update the global variable |
189 | - if ( $did_update ){ |
|
189 | + if ( $did_update ) { |
|
190 | 190 | global $monsterinsights_settings; |
191 | 191 | $monsterinsights_settings[ $key ] = $value; |
192 | 192 | } |
@@ -205,7 +205,7 @@ discard block |
||
205 | 205 | */ |
206 | 206 | function monsterinsights_delete_option( $key = '' ) { |
207 | 207 | // If no key, exit |
208 | - if ( empty( $key ) ){ |
|
208 | + if ( empty( $key ) ) { |
|
209 | 209 | return false; |
210 | 210 | } |
211 | 211 | |
@@ -236,7 +236,7 @@ discard block |
||
236 | 236 | //} |
237 | 237 | |
238 | 238 | // If it updated, let's update the global variable |
239 | - if ( $did_update ){ |
|
239 | + if ( $did_update ) { |
|
240 | 240 | global $monsterinsights_settings; |
241 | 241 | $monsterinsights_settings = $settings; |
242 | 242 | } |
@@ -255,7 +255,7 @@ discard block |
||
255 | 255 | */ |
256 | 256 | function monsterinsights_delete_options( $keys = array() ) { |
257 | 257 | // If no keys, exit |
258 | - if ( empty( $keys ) || ! is_array( $keys ) ){ |
|
258 | + if ( empty( $keys ) || ! is_array( $keys ) ) { |
|
259 | 259 | return false; |
260 | 260 | } |
261 | 261 | |
@@ -288,7 +288,7 @@ discard block |
||
288 | 288 | //} |
289 | 289 | |
290 | 290 | // If it updated, let's update the global variable |
291 | - if ( $did_update ){ |
|
291 | + if ( $did_update ) { |
|
292 | 292 | global $monsterinsights_settings; |
293 | 293 | $monsterinsights_settings = $settings; |
294 | 294 | } |
@@ -123,7 +123,7 @@ discard block |
||
123 | 123 | */ |
124 | 124 | if ( ( WP_DEBUG && apply_filters( 'deprecated_hook_trigger_error', true ) ) || monsterinsights_is_debug_mode() ) { |
125 | 125 | $message = empty( $message ) ? '' : ' ' . $message; |
126 | - trigger_error( sprintf( esc_html__( '%1$s is %3$sdeprecated%4$s since MonsterInsights version %2$s!', 'google-analytics-for-wordpress' ), $hook, $version, '<strong>', '</strong>' ) . esc_html ( $message ) ); |
|
126 | + trigger_error( sprintf( esc_html__( '%1$s is %3$sdeprecated%4$s since MonsterInsights version %2$s!', 'google-analytics-for-wordpress' ), $hook, $version, '<strong>', '</strong>' ) . esc_html( $message ) ); |
|
127 | 127 | } |
128 | 128 | } |
129 | 129 | |
@@ -177,7 +177,7 @@ discard block |
||
177 | 177 | */ |
178 | 178 | if ( ( WP_DEBUG && apply_filters( 'deprecated_function_trigger_error', true ) ) || monsterinsights_is_debug_mode() ) { |
179 | 179 | trigger_error( sprintf( esc_html__( '%1$s is %3$sdeprecated%4$s since MonsterInsights version %2$s.', 'google-analytics-for-wordpress' ), $function, $version, '<strong>', '</strong>' ) ); |
180 | - trigger_error( print_r( $backtrace, 1 ) );// Limited to previous 1028 characters, but since we only need to move back 1 in stack that should be fine. |
|
180 | + trigger_error( print_r( $backtrace, 1 ) ); // Limited to previous 1028 characters, but since we only need to move back 1 in stack that should be fine. |
|
181 | 181 | // Alternatively we could dump this to a file. |
182 | 182 | } |
183 | 183 | } |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | * @return array Array of the options to use. |
59 | 59 | */ |
60 | 60 | public function frontend_tracking_options( ) { |
61 | - return array(); |
|
61 | + return array(); |
|
62 | 62 | } |
63 | 63 | |
64 | 64 | /** |
@@ -74,6 +74,6 @@ discard block |
||
74 | 74 | * @return string Javascript to output. |
75 | 75 | */ |
76 | 76 | public function frontend_output( ) { |
77 | - return "<!-- MonsterInsights Abstract Tracking class -->"; |
|
77 | + return "<!-- MonsterInsights Abstract Tracking class -->"; |
|
78 | 78 | } |
79 | 79 | } |
80 | 80 | \ No newline at end of file |
@@ -35,54 +35,54 @@ |
||
35 | 35 | function monsterinsights_add_capabilities( $caps, $cap, $user_id, $args ) { |
36 | 36 | |
37 | 37 | switch( $cap ) { |
38 | - case 'monsterinsights_view_dashboard' : |
|
39 | - $roles = monsterinsights_get_option( 'view_reports', array() ); |
|
38 | + case 'monsterinsights_view_dashboard' : |
|
39 | + $roles = monsterinsights_get_option( 'view_reports', array() ); |
|
40 | 40 | |
41 | - $user_can_via_settings = false; |
|
42 | - if ( ! empty( $roles ) && is_array( $roles ) ) { |
|
43 | - foreach ( $roles as $role ) { |
|
44 | - if ( is_string( $role ) ) { |
|
45 | - if ( user_can( $user_id, $role ) ) { |
|
46 | - $user_can_via_settings = true; |
|
47 | - break; |
|
48 | - } |
|
49 | - } |
|
50 | - } |
|
51 | - } else if ( ! empty( $roles ) && is_string( $roles ) ) { |
|
52 | - if ( user_can( $user_id, $roles ) ) { |
|
53 | - $user_can_via_settings = true; |
|
54 | - } |
|
55 | - } |
|
41 | + $user_can_via_settings = false; |
|
42 | + if ( ! empty( $roles ) && is_array( $roles ) ) { |
|
43 | + foreach ( $roles as $role ) { |
|
44 | + if ( is_string( $role ) ) { |
|
45 | + if ( user_can( $user_id, $role ) ) { |
|
46 | + $user_can_via_settings = true; |
|
47 | + break; |
|
48 | + } |
|
49 | + } |
|
50 | + } |
|
51 | + } else if ( ! empty( $roles ) && is_string( $roles ) ) { |
|
52 | + if ( user_can( $user_id, $roles ) ) { |
|
53 | + $user_can_via_settings = true; |
|
54 | + } |
|
55 | + } |
|
56 | 56 | |
57 | - if ( user_can( $user_id, 'manage_options' ) || $user_can_via_settings ) { |
|
58 | - $caps = array(); |
|
59 | - } |
|
57 | + if ( user_can( $user_id, 'manage_options' ) || $user_can_via_settings ) { |
|
58 | + $caps = array(); |
|
59 | + } |
|
60 | 60 | |
61 | - break; |
|
62 | - case 'monsterinsights_save_settings' : |
|
63 | - $roles = monsterinsights_get_option( 'save_settings', array() ); |
|
61 | + break; |
|
62 | + case 'monsterinsights_save_settings' : |
|
63 | + $roles = monsterinsights_get_option( 'save_settings', array() ); |
|
64 | 64 | |
65 | - $user_can_via_settings = false; |
|
66 | - if ( ! empty( $roles ) && is_array( $roles ) ) { |
|
67 | - foreach ( $roles as $role ) { |
|
68 | - if ( is_string( $role ) ) { |
|
69 | - if ( user_can( $user_id, $role ) ) { |
|
70 | - $user_can_via_settings = true; |
|
71 | - break; |
|
72 | - } |
|
73 | - } |
|
74 | - } |
|
75 | - } else if ( ! empty( $roles ) && is_string( $roles ) ) { |
|
76 | - if ( user_can( $user_id, $roles ) ) { |
|
77 | - $user_can_via_settings = true; |
|
78 | - } |
|
79 | - } |
|
65 | + $user_can_via_settings = false; |
|
66 | + if ( ! empty( $roles ) && is_array( $roles ) ) { |
|
67 | + foreach ( $roles as $role ) { |
|
68 | + if ( is_string( $role ) ) { |
|
69 | + if ( user_can( $user_id, $role ) ) { |
|
70 | + $user_can_via_settings = true; |
|
71 | + break; |
|
72 | + } |
|
73 | + } |
|
74 | + } |
|
75 | + } else if ( ! empty( $roles ) && is_string( $roles ) ) { |
|
76 | + if ( user_can( $user_id, $roles ) ) { |
|
77 | + $user_can_via_settings = true; |
|
78 | + } |
|
79 | + } |
|
80 | 80 | |
81 | - if ( user_can( $user_id, 'manage_options' ) || $user_can_via_settings ) { |
|
82 | - $caps = array(); |
|
83 | - } |
|
81 | + if ( user_can( $user_id, 'manage_options' ) || $user_can_via_settings ) { |
|
82 | + $caps = array(); |
|
83 | + } |
|
84 | 84 | |
85 | - break; |
|
85 | + break; |
|
86 | 86 | } |
87 | 87 | return $caps; |
88 | 88 | } |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | */ |
35 | 35 | function monsterinsights_add_capabilities( $caps, $cap, $user_id, $args ) { |
36 | 36 | |
37 | - switch( $cap ) { |
|
37 | + switch ( $cap ) { |
|
38 | 38 | case 'monsterinsights_view_dashboard' : |
39 | 39 | $roles = monsterinsights_get_option( 'view_reports', array() ); |
40 | 40 | |
@@ -86,4 +86,4 @@ discard block |
||
86 | 86 | } |
87 | 87 | return $caps; |
88 | 88 | } |
89 | -add_filter( 'map_meta_cap','monsterinsights_add_capabilities', 10, 4 ); |
|
90 | 89 | \ No newline at end of file |
90 | +add_filter( 'map_meta_cap', 'monsterinsights_add_capabilities', 10, 4 ); |
|
91 | 91 | \ No newline at end of file |
@@ -24,7 +24,7 @@ |
||
24 | 24 | |
25 | 25 | } |
26 | 26 | |
27 | - public function add_report( $report = false ){ |
|
27 | + public function add_report( $report = false ) { |
|
28 | 28 | if ( empty( $report ) || ! is_object( $report ) ) { |
29 | 29 | return; |
30 | 30 | } |
@@ -24,7 +24,7 @@ |
||
24 | 24 | |
25 | 25 | } |
26 | 26 | |
27 | - public function add_report( $report = false ){ |
|
27 | + public function add_report( $report = false ) { |
|
28 | 28 | if ( empty( $report ) || ! is_object( $report ) ) { |
29 | 29 | return; |
30 | 30 | } |
@@ -18,7 +18,7 @@ discard block |
||
18 | 18 | |
19 | 19 | final class MonsterInsights_Auth { |
20 | 20 | |
21 | - private $profile = array(); |
|
21 | + private $profile = array(); |
|
22 | 22 | private $network = array(); |
23 | 23 | |
24 | 24 | /** |
@@ -67,17 +67,17 @@ 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 | - $this->profile = $data; |
|
72 | + $this->profile = $data; |
|
73 | 73 | } |
74 | 74 | |
75 | - public function set_network_analytics_profile( $data = array() ){ |
|
75 | + public function set_network_analytics_profile( $data = array() ) { |
|
76 | 76 | update_site_option( 'monsterinsights_network_profile', $data ); |
77 | - $this->network = $data; |
|
77 | + $this->network = $data; |
|
78 | 78 | } |
79 | 79 | |
80 | - public function delete_analytics_profile( $migrate = true ){ |
|
80 | + public function delete_analytics_profile( $migrate = true ) { |
|
81 | 81 | if ( $migrate ) { |
82 | 82 | $newdata = array(); |
83 | 83 | if ( isset( $this->profile['ua'] ) ) { |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | } |
92 | 92 | } |
93 | 93 | |
94 | - public function delete_network_analytics_profile( $migrate = true ){ |
|
94 | + public function delete_network_analytics_profile( $migrate = true ) { |
|
95 | 95 | if ( $migrate ) { |
96 | 96 | $newdata = array(); |
97 | 97 | if ( isset( $this->network['ua'] ) ) { |
@@ -124,7 +124,7 @@ discard block |
||
124 | 124 | |
125 | 125 | do_action( 'monsterinsights_reports_delete_aggregate_data' ); |
126 | 126 | |
127 | - $this->profile = $data; |
|
127 | + $this->profile = $data; |
|
128 | 128 | $this->set_analytics_profile( $data ); |
129 | 129 | } |
130 | 130 | |
@@ -181,55 +181,55 @@ discard block |
||
181 | 181 | return ! empty( $this->network['ua'] ) ? monsterinsights_is_valid_ua( $this->network['ua'] ) : ''; |
182 | 182 | } |
183 | 183 | |
184 | - public function get_viewname(){ |
|
184 | + public function get_viewname() { |
|
185 | 185 | return ! empty( $this->profile['viewname'] ) ? $this->profile['viewname'] : ''; |
186 | 186 | } |
187 | 187 | |
188 | - public function get_network_viewname(){ |
|
188 | + public function get_network_viewname() { |
|
189 | 189 | return ! empty( $this->network['viewname'] ) ? $this->network['viewname'] : ''; |
190 | 190 | } |
191 | 191 | |
192 | - public function get_accountid(){ |
|
192 | + public function get_accountid() { |
|
193 | 193 | return ! empty( $this->profile['a'] ) ? $this->profile['a'] : ''; |
194 | 194 | } |
195 | 195 | |
196 | - public function get_network_accountid(){ |
|
196 | + public function get_network_accountid() { |
|
197 | 197 | return ! empty( $this->network['a'] ) ? $this->network['a'] : ''; |
198 | 198 | } |
199 | 199 | |
200 | - public function get_propertyid(){ |
|
200 | + public function get_propertyid() { |
|
201 | 201 | return ! empty( $this->profile['w'] ) ? $this->profile['w'] : ''; |
202 | 202 | } |
203 | 203 | |
204 | - public function get_network_propertyid(){ |
|
204 | + public function get_network_propertyid() { |
|
205 | 205 | return ! empty( $this->network['w'] ) ? $this->network['w'] : ''; |
206 | 206 | } |
207 | 207 | |
208 | - public function get_viewid(){ // also known as profileID |
|
208 | + public function get_viewid() { // also known as profileID |
|
209 | 209 | return ! empty( $this->profile['p'] ) ? $this->profile['p'] : ''; |
210 | 210 | } |
211 | 211 | |
212 | - public function get_network_viewid(){ // also known as profileID |
|
212 | + public function get_network_viewid() { // also known as profileID |
|
213 | 213 | return ! empty( $this->network['p'] ) ? $this->network['p'] : ''; |
214 | 214 | } |
215 | 215 | |
216 | - public function get_key(){ |
|
216 | + public function get_key() { |
|
217 | 217 | return ! empty( $this->profile['key'] ) ? $this->profile['key'] : ''; |
218 | 218 | } |
219 | 219 | |
220 | - public function get_network_key(){ |
|
220 | + public function get_network_key() { |
|
221 | 221 | return ! empty( $this->network['key'] ) ? $this->network['key'] : ''; |
222 | 222 | } |
223 | 223 | |
224 | - public function get_token(){ |
|
224 | + public function get_token() { |
|
225 | 225 | return ! empty( $this->profile['token'] ) ? $this->profile['token'] : ''; |
226 | 226 | } |
227 | 227 | |
228 | - public function get_network_token(){ |
|
228 | + public function get_network_token() { |
|
229 | 229 | return ! empty( $this->network['token'] ) ? $this->network['token'] : ''; |
230 | 230 | } |
231 | 231 | |
232 | - public function get_referral_url(){ |
|
232 | + public function get_referral_url() { |
|
233 | 233 | $url = ''; |
234 | 234 | |
235 | 235 | if ( $this->is_authed() ) { |
@@ -67,17 +67,17 @@ 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 | } |
74 | 74 | |
75 | - public function set_network_analytics_profile( $data = array() ){ |
|
75 | + public function set_network_analytics_profile( $data = array() ) { |
|
76 | 76 | update_site_option( 'monsterinsights_network_profile', $data ); |
77 | 77 | $this->network = $data; |
78 | 78 | } |
79 | 79 | |
80 | - public function delete_analytics_profile( $migrate = true ){ |
|
80 | + public function delete_analytics_profile( $migrate = true ) { |
|
81 | 81 | if ( $migrate ) { |
82 | 82 | $newdata = array(); |
83 | 83 | if ( isset( $this->profile['ua'] ) ) { |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | } |
92 | 92 | } |
93 | 93 | |
94 | - public function delete_network_analytics_profile( $migrate = true ){ |
|
94 | + public function delete_network_analytics_profile( $migrate = true ) { |
|
95 | 95 | if ( $migrate ) { |
96 | 96 | $newdata = array(); |
97 | 97 | if ( isset( $this->network['ua'] ) ) { |
@@ -181,55 +181,57 @@ discard block |
||
181 | 181 | return ! empty( $this->network['ua'] ) ? monsterinsights_is_valid_ua( $this->network['ua'] ) : ''; |
182 | 182 | } |
183 | 183 | |
184 | - public function get_viewname(){ |
|
184 | + public function get_viewname() { |
|
185 | 185 | return ! empty( $this->profile['viewname'] ) ? $this->profile['viewname'] : ''; |
186 | 186 | } |
187 | 187 | |
188 | - public function get_network_viewname(){ |
|
188 | + public function get_network_viewname() { |
|
189 | 189 | return ! empty( $this->network['viewname'] ) ? $this->network['viewname'] : ''; |
190 | 190 | } |
191 | 191 | |
192 | - public function get_accountid(){ |
|
192 | + public function get_accountid() { |
|
193 | 193 | return ! empty( $this->profile['a'] ) ? $this->profile['a'] : ''; |
194 | 194 | } |
195 | 195 | |
196 | - public function get_network_accountid(){ |
|
196 | + public function get_network_accountid() { |
|
197 | 197 | return ! empty( $this->network['a'] ) ? $this->network['a'] : ''; |
198 | 198 | } |
199 | 199 | |
200 | - public function get_propertyid(){ |
|
200 | + public function get_propertyid() { |
|
201 | 201 | return ! empty( $this->profile['w'] ) ? $this->profile['w'] : ''; |
202 | 202 | } |
203 | 203 | |
204 | - public function get_network_propertyid(){ |
|
204 | + public function get_network_propertyid() { |
|
205 | 205 | return ! empty( $this->network['w'] ) ? $this->network['w'] : ''; |
206 | 206 | } |
207 | 207 | |
208 | - public function get_viewid(){ // also known as profileID |
|
208 | + public function get_viewid() { |
|
209 | +// also known as profileID |
|
209 | 210 | return ! empty( $this->profile['p'] ) ? $this->profile['p'] : ''; |
210 | 211 | } |
211 | 212 | |
212 | - public function get_network_viewid(){ // also known as profileID |
|
213 | + public function get_network_viewid() { |
|
214 | +// also known as profileID |
|
213 | 215 | return ! empty( $this->network['p'] ) ? $this->network['p'] : ''; |
214 | 216 | } |
215 | 217 | |
216 | - public function get_key(){ |
|
218 | + public function get_key() { |
|
217 | 219 | return ! empty( $this->profile['key'] ) ? $this->profile['key'] : ''; |
218 | 220 | } |
219 | 221 | |
220 | - public function get_network_key(){ |
|
222 | + public function get_network_key() { |
|
221 | 223 | return ! empty( $this->network['key'] ) ? $this->network['key'] : ''; |
222 | 224 | } |
223 | 225 | |
224 | - public function get_token(){ |
|
226 | + public function get_token() { |
|
225 | 227 | return ! empty( $this->profile['token'] ) ? $this->profile['token'] : ''; |
226 | 228 | } |
227 | 229 | |
228 | - public function get_network_token(){ |
|
230 | + public function get_network_token() { |
|
229 | 231 | return ! empty( $this->network['token'] ) ? $this->network['token'] : ''; |
230 | 232 | } |
231 | 233 | |
232 | - public function get_referral_url(){ |
|
234 | + public function get_referral_url() { |
|
233 | 235 | $url = ''; |
234 | 236 | |
235 | 237 | if ( $this->is_authed() ) { |
@@ -23,7 +23,7 @@ |
||
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 |
@@ -23,7 +23,7 @@ |
||
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 |
@@ -23,7 +23,7 @@ |
||
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 | } |
@@ -23,7 +23,7 @@ |
||
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 | } |
@@ -23,7 +23,7 @@ |
||
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 |
@@ -23,7 +23,7 @@ |
||
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 |