@@ -55,7 +55,7 @@ discard block |
||
| 55 | 55 | */ |
| 56 | 56 | |
| 57 | 57 | public function is_dismissed( $notice ) { |
| 58 | - if ( ! isset( $this->notices[ $notice ] ) ) { |
|
| 58 | + if ( ! isset( $this->notices[$notice] ) ) { |
|
| 59 | 59 | return false; |
| 60 | 60 | } |
| 61 | 61 | return true; |
@@ -72,7 +72,7 @@ discard block |
||
| 72 | 72 | * @return null |
| 73 | 73 | */ |
| 74 | 74 | public function dismiss( $notice ) { |
| 75 | - $this->notices[ $notice ] = true; |
|
| 75 | + $this->notices[$notice] = true; |
|
| 76 | 76 | update_option( 'monsterinsights_notices', $this->notices ); |
| 77 | 77 | |
| 78 | 78 | } |
@@ -88,7 +88,7 @@ discard block |
||
| 88 | 88 | * @return null |
| 89 | 89 | */ |
| 90 | 90 | public function undismiss( $notice ) { |
| 91 | - unset( $this->notices[ $notice ] ); |
|
| 91 | + unset( $this->notices[$notice] ); |
|
| 92 | 92 | update_option( 'monsterinsights_notices', $this->notices ); |
| 93 | 93 | |
| 94 | 94 | } |
@@ -133,7 +133,7 @@ discard block |
||
| 133 | 133 | return ''; |
| 134 | 134 | } |
| 135 | 135 | |
| 136 | - $dismissible = ( $is_dismissible ) ? ' is-dismissible': ''; |
|
| 136 | + $dismissible = ( $is_dismissible ) ? ' is-dismissible' : ''; |
|
| 137 | 137 | |
| 138 | 138 | // Display inline notice |
| 139 | 139 | ob_start(); |
@@ -177,16 +177,16 @@ discard block |
||
| 177 | 177 | } |
| 178 | 178 | |
| 179 | 179 | $target = ''; |
| 180 | - if ( ! empty( $args['primary']['target'] ) && $args['primary']['target'] === 'blank') { |
|
| 180 | + if ( ! empty( $args['primary']['target'] ) && $args['primary']['target'] === 'blank' ) { |
|
| 181 | 181 | $target = ' target="_blank" rel="noopener noreferrer"'; |
| 182 | 182 | } |
| 183 | 183 | |
| 184 | 184 | $class = 'button button-primary'; |
| 185 | 185 | if ( ! empty( $args['primary']['class'] ) ) { |
| 186 | - $class = ' class="'. $args['primary']['class'] . '"'; |
|
| 186 | + $class = ' class="' . $args['primary']['class'] . '"'; |
|
| 187 | 187 | } |
| 188 | 188 | ?> |
| 189 | - <a href="<?php echo esc_attr( $url ); ?>"<?php echo $target; ?><?php echo $class;?>><?php echo esc_html( $text ); ?></a> |
|
| 189 | + <a href="<?php echo esc_attr( $url ); ?>"<?php echo $target; ?><?php echo $class; ?>><?php echo esc_html( $text ); ?></a> |
|
| 190 | 190 | <?php |
| 191 | 191 | } |
| 192 | 192 | |
@@ -204,16 +204,16 @@ discard block |
||
| 204 | 204 | } |
| 205 | 205 | |
| 206 | 206 | $target = ''; |
| 207 | - if ( ! empty( $args['secondary']['target'] ) && $args['secondary']['target'] === 'blank') { |
|
| 207 | + if ( ! empty( $args['secondary']['target'] ) && $args['secondary']['target'] === 'blank' ) { |
|
| 208 | 208 | $target = ' target="_blank" rel="noopener noreferrer"'; |
| 209 | 209 | } |
| 210 | 210 | |
| 211 | 211 | $class = 'button button-secondary'; |
| 212 | 212 | if ( ! empty( $args['secondary']['class'] ) ) { |
| 213 | - $class = ' class="'. $args['secondary']['class'] . '"'; |
|
| 213 | + $class = ' class="' . $args['secondary']['class'] . '"'; |
|
| 214 | 214 | } |
| 215 | 215 | ?> |
| 216 | - <a href="<?php echo esc_attr( $url ); ?>"<?php echo $target; ?><?php echo $class;?>><?php echo esc_html( $text ); ?></a> |
|
| 216 | + <a href="<?php echo esc_attr( $url ); ?>"<?php echo $target; ?><?php echo $class; ?>><?php echo esc_html( $text ); ?></a> |
|
| 217 | 217 | <?php |
| 218 | 218 | } |
| 219 | 219 | |
@@ -39,7 +39,7 @@ |
||
| 39 | 39 | public function set_upgrader( &$upgrader ) { |
| 40 | 40 | |
| 41 | 41 | if ( is_object( $upgrader ) ) { |
| 42 | - $this->upgrader =& $upgrader; |
|
| 42 | + $this->upgrader = & $upgrader; |
|
| 43 | 43 | } |
| 44 | 44 | |
| 45 | 45 | } |
@@ -84,9 +84,9 @@ |
||
| 84 | 84 | * @return string Javascript to output. |
| 85 | 85 | */ |
| 86 | 86 | public function frontend_output( ) { |
| 87 | - $output = '<!-- This site uses the Google Analytics by MonsterInsights plugin v ' . MONSTERINSIGHTS_VERSION .' - https://www.monsterinsights.com/ -->'; |
|
| 88 | - $output .= '<!-- ' . esc_html__( "You are currently in a preview window. MonsterInsights doesn't track preview window traffic to avoid false visit reports.", 'google-analytics-for-wordpress' ) . ' -->'; |
|
| 89 | - $output .= '<!-- / Google Analytics by MonsterInsights -->'; |
|
| 87 | + $output = '<!-- This site uses the Google Analytics by MonsterInsights plugin v ' . MONSTERINSIGHTS_VERSION . ' - https://www.monsterinsights.com/ -->'; |
|
| 88 | + $output .= '<!-- ' . esc_html__( "You are currently in a preview window. MonsterInsights doesn't track preview window traffic to avoid false visit reports.", 'google-analytics-for-wordpress' ) . ' -->'; |
|
| 89 | + $output .= '<!-- / Google Analytics by MonsterInsights -->'; |
|
| 90 | 90 | return $output; |
| 91 | 91 | } |
| 92 | 92 | } |
| 93 | 93 | \ No newline at end of file |
@@ -5,7 +5,7 @@ |
||
| 5 | 5 | } |
| 6 | 6 | |
| 7 | 7 | function monsterinsights_tools_url_builder() { |
| 8 | - ob_start();?> |
|
| 8 | + ob_start(); ?> |
|
| 9 | 9 | <div class="monsterinsights-upsell-under-box"> |
| 10 | 10 | <h2><?php esc_html_e( "Want even more fine tuned control over your website analytics?", 'google-analytics-for-wordpress' ); ?></h2> |
| 11 | 11 | <p class="monsterinsights-upsell-lite-text"><?php esc_html_e( "By upgrading to MonsterInsights Pro, you can unlock the MonsterInsights URL builder that helps you better track your advertising and email marketing campaigns.", 'google-analytics-for-wordpress' ); ?></p> |
@@ -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 ); |
@@ -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 | } |
@@ -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 |