@@ -166,7 +166,7 @@ |
||
166 | 166 | |
167 | 167 | // Deactivate the addon. |
168 | 168 | if ( isset( $_POST['plugin'] ) ) { |
169 | - if ( isset( $_POST['isnetwork'] ) && $_POST['isnetwork'] ) { |
|
169 | + if ( isset( $_POST['isnetwork'] ) && $_POST['isnetwork'] ) { |
|
170 | 170 | $deactivate = deactivate_plugins( $_POST['plugin'], false, true ); |
171 | 171 | } else { |
172 | 172 | $deactivate = deactivate_plugins( $_POST['plugin'] ); |
@@ -126,7 +126,7 @@ |
||
126 | 126 | function monsterinsights_rss_link_tagger( $guid ) { |
127 | 127 | global $post; |
128 | 128 | |
129 | - if ( monsterinsights_get_option( 'tag_links_in_rss', false ) ){ |
|
129 | + if ( monsterinsights_get_option( 'tag_links_in_rss', false ) ) { |
|
130 | 130 | if ( is_feed() ) { |
131 | 131 | if ( monsterinsights_get_option( 'allow_anchor', false ) ) { |
132 | 132 | $delimiter = '#'; |
@@ -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 | } |
@@ -34,13 +34,13 @@ discard block |
||
34 | 34 | } |
35 | 35 | |
36 | 36 | // Let's get the HTML to output for a particular report. This is not the AJAX endpoint. Args can hold things (generally start/end date range) |
37 | - protected function get_report_html( $args = array() ) { |
|
37 | + protected function get_report_html( $args = array() ) { |
|
38 | 38 | /* Defined in the report class */ |
39 | 39 | // For ajax, args start, end, and data will be set with the data to use. Else call $this->get_data( array( 'default' => true ) ) |
40 | 40 | return ''; |
41 | 41 | } |
42 | 42 | |
43 | - public function additional_data(){ |
|
43 | + public function additional_data() { |
|
44 | 44 | return array(); |
45 | 45 | } |
46 | 46 | |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | return monsterinsights_get_message( 'error', esc_html__( 'Access denied' , 'google-analytics-for-wordpress' ) ); |
55 | 55 | } |
56 | 56 | |
57 | - if ( monsterinsights_get_option( 'dashboard_disabled', false ) ) { |
|
57 | + if ( monsterinsights_get_option( 'dashboard_disabled', false ) ) { |
|
58 | 58 | if ( current_user_can( 'monsterinsights_save_settings' ) ) { |
59 | 59 | $url = is_network_admin() ? network_admin_url( 'admin.php?page=monsterinsights_settings' ) : admin_url( 'admin.php?page=monsterinsights_settings' ); |
60 | 60 | return monsterinsights_get_message( 'error', |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | } |
70 | 70 | } |
71 | 71 | |
72 | - if ( monsterinsights_is_pro_version() ){ |
|
72 | + if ( monsterinsights_is_pro_version() ) { |
|
73 | 73 | if ( ! MonsterInsights()->license->has_license() ) { |
74 | 74 | $url = is_network_admin() ? network_admin_url( 'admin.php?page=monsterinsights_settings' ) : admin_url( 'admin.php?page=monsterinsights_settings' ); |
75 | 75 | return monsterinsights_get_message( 'error', esc_html__( 'You do not have an active license. Please %1$scheck your license configuration.%2$s', 'google-analytics-for-wordpress' ),'<a href="' . $url . '">','</a>' ); |
@@ -351,7 +351,7 @@ discard block |
||
351 | 351 | if ( ! class_exists( 'MonsterInsightsDateTime' ) ) { |
352 | 352 | class MonsterInsightsDateTime extends DateTime { |
353 | 353 | public static function createFromFormat( $format, $time, $timezone = null ) { |
354 | - if ( ! $timezone ) { |
|
354 | + if ( ! $timezone ) { |
|
355 | 355 | $timezone = new DateTimeZone( date_default_timezone_get() ); |
356 | 356 | } |
357 | 357 | if ( version_compare( PHP_VERSION, '5.3', '>=' ) ) { |
@@ -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 | } |
@@ -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 |