@@ -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 | } |
@@ -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 |
@@ -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 |