@@ -44,37 +44,37 @@ discard block |
||
| 44 | 44 | |
| 45 | 45 | // Get addons data from transient or perform API query if no transient. |
| 46 | 46 | if ( false === ( $addons = get_transient( '_monsterinsights_addons' ) ) ) { |
| 47 | - $addons = monsterinsights_get_addons_data( $key ); |
|
| 47 | + $addons = monsterinsights_get_addons_data( $key ); |
|
| 48 | 48 | } |
| 49 | 49 | |
| 50 | 50 | // If no Addons exist, return false |
| 51 | 51 | if ( ! $addons ) { |
| 52 | - return false; |
|
| 52 | + return false; |
|
| 53 | 53 | } |
| 54 | 54 | |
| 55 | 55 | // Iterate through Addons, to build two arrays: |
| 56 | 56 | // - Addons the user is licensed to use, |
| 57 | 57 | // - Addons the user isn't licensed to use. |
| 58 | 58 | $results = array( |
| 59 | - 'licensed' => array(), |
|
| 60 | - 'unlicensed'=> array(), |
|
| 59 | + 'licensed' => array(), |
|
| 60 | + 'unlicensed'=> array(), |
|
| 61 | 61 | ); |
| 62 | 62 | foreach ( (array) $addons as $i => $addon ) { |
| 63 | 63 | |
| 64 | - // Determine whether the user is licensed to use this Addon or not. |
|
| 65 | - if ( |
|
| 66 | - empty( $type ) || |
|
| 67 | - ( in_array( 'Pro', $addon->categories ) && ( $type != 'pro' && $type != 'master' ) ) || |
|
| 68 | - ( in_array( 'Plus', $addon->categories ) && $type != 'plus' && $type != 'pro' && $type != 'master' ) || |
|
| 69 | - ( in_array( 'Basic', $addon->categories ) && ( $type != 'basic' && $type != 'plus' && $type != 'pro' && $type != 'master' ) ) |
|
| 70 | - ) { |
|
| 71 | - // Unlicensed |
|
| 72 | - $results['unlicensed'][] = $addon; |
|
| 73 | - continue; |
|
| 74 | - } |
|
| 75 | - |
|
| 76 | - // Licensed |
|
| 77 | - $results['licensed'][] = $addon; |
|
| 64 | + // Determine whether the user is licensed to use this Addon or not. |
|
| 65 | + if ( |
|
| 66 | + empty( $type ) || |
|
| 67 | + ( in_array( 'Pro', $addon->categories ) && ( $type != 'pro' && $type != 'master' ) ) || |
|
| 68 | + ( in_array( 'Plus', $addon->categories ) && $type != 'plus' && $type != 'pro' && $type != 'master' ) || |
|
| 69 | + ( in_array( 'Basic', $addon->categories ) && ( $type != 'basic' && $type != 'plus' && $type != 'pro' && $type != 'master' ) ) |
|
| 70 | + ) { |
|
| 71 | + // Unlicensed |
|
| 72 | + $results['unlicensed'][] = $addon; |
|
| 73 | + continue; |
|
| 74 | + } |
|
| 75 | + |
|
| 76 | + // Licensed |
|
| 77 | + $results['licensed'][] = $addon; |
|
| 78 | 78 | |
| 79 | 79 | } |
| 80 | 80 | |
@@ -95,21 +95,21 @@ discard block |
||
| 95 | 95 | // Get Addons |
| 96 | 96 | // If the key is valid, we'll get personalised upgrade URLs for each Addon (if necessary) and plugin update information. |
| 97 | 97 | if ( monsterinsights_is_pro_version() && $key ) { |
| 98 | - $addons = MonsterInsights()->license_actions->perform_remote_request( 'get-addons-data-v600', array( 'tgm-updater-key' => $key ) ); |
|
| 98 | + $addons = MonsterInsights()->license_actions->perform_remote_request( 'get-addons-data-v600', array( 'tgm-updater-key' => $key ) ); |
|
| 99 | 99 | } else { |
| 100 | - $addons = monsterinsights_get_all_addons_data(); |
|
| 100 | + $addons = monsterinsights_get_all_addons_data(); |
|
| 101 | 101 | } |
| 102 | 102 | |
| 103 | 103 | // If there was an API error, set transient for only 10 minutes. |
| 104 | 104 | if ( ! $addons ) { |
| 105 | - set_transient( '_monsterinsights_addons', false, 10 * MINUTE_IN_SECONDS ); |
|
| 106 | - return false; |
|
| 105 | + set_transient( '_monsterinsights_addons', false, 10 * MINUTE_IN_SECONDS ); |
|
| 106 | + return false; |
|
| 107 | 107 | } |
| 108 | 108 | |
| 109 | 109 | // If there was an error retrieving the addons, set the error. |
| 110 | 110 | if ( isset( $addons->error ) ) { |
| 111 | - set_transient( '_monsterinsights_addons', false, 10 * MINUTE_IN_SECONDS ); |
|
| 112 | - return false; |
|
| 111 | + set_transient( '_monsterinsights_addons', false, 10 * MINUTE_IN_SECONDS ); |
|
| 112 | + return false; |
|
| 113 | 113 | } |
| 114 | 114 | |
| 115 | 115 | // Otherwise, our request worked. Save the data and return it. |
@@ -173,9 +173,9 @@ discard block |
||
| 173 | 173 | $keys = array_keys( get_plugins() ); |
| 174 | 174 | |
| 175 | 175 | foreach ( $keys as $key ) { |
| 176 | - if ( preg_match( '|^' . $slug . '|', $key ) ) { |
|
| 177 | - return $key; |
|
| 178 | - } |
|
| 176 | + if ( preg_match( '|^' . $slug . '|', $key ) ) { |
|
| 177 | + return $key; |
|
| 178 | + } |
|
| 179 | 179 | } |
| 180 | 180 | |
| 181 | 181 | return $slug; |
@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | return; |
| 43 | 43 | } |
| 44 | 44 | |
| 45 | - $site_license = array( |
|
| 45 | + $site_license = array( |
|
| 46 | 46 | 'key' => MonsterInsights()->license->get_site_license_key(), |
| 47 | 47 | 'type' => MonsterInsights()->license->get_site_license_type(), |
| 48 | 48 | 'is_disabled' => MonsterInsights()->license->site_license_disabled(), |
@@ -102,8 +102,8 @@ discard block |
||
| 102 | 102 | // Array fields are needed even if empty. |
| 103 | 103 | $array_fields = array( 'view_reports', 'save_settings', 'ignore_users' ); |
| 104 | 104 | foreach ( $array_fields as $array_field ) { |
| 105 | - if ( ! isset( $options[ $array_field ] ) ) { |
|
| 106 | - $options[ $array_field ] = array(); |
|
| 105 | + if ( ! isset( $options[$array_field] ) ) { |
|
| 106 | + $options[$array_field] = array(); |
|
| 107 | 107 | } |
| 108 | 108 | } |
| 109 | 109 | if ( isset( $options['custom_code'] ) ) { |
@@ -177,7 +177,7 @@ discard block |
||
| 177 | 177 | } |
| 178 | 178 | } |
| 179 | 179 | if ( $empty ) { |
| 180 | - unset( $value[ $key ] ); |
|
| 180 | + unset( $value[$key] ); |
|
| 181 | 181 | } |
| 182 | 182 | } |
| 183 | 183 | } |
@@ -227,7 +227,7 @@ discard block |
||
| 227 | 227 | } else { |
| 228 | 228 | $addon = $this->get_addon( $installed_plugins, $addons_type, $addon, $slug ); |
| 229 | 229 | } |
| 230 | - $parsed_addons[ $addon->slug ] = $addon; |
|
| 230 | + $parsed_addons[$addon->slug] = $addon; |
|
| 231 | 231 | } |
| 232 | 232 | } |
| 233 | 233 | |
@@ -316,7 +316,7 @@ discard block |
||
| 316 | 316 | $installed = false; |
| 317 | 317 | $plugin_basename = monsterinsights_get_plugin_basename_from_slug( $slug ); |
| 318 | 318 | |
| 319 | - if ( isset( $installed_plugins[ $plugin_basename ] ) ) { |
|
| 319 | + if ( isset( $installed_plugins[$plugin_basename] ) ) { |
|
| 320 | 320 | $installed = true; |
| 321 | 321 | |
| 322 | 322 | if ( is_multisite() && is_network_admin() ) { |
@@ -459,8 +459,8 @@ discard block |
||
| 459 | 459 | ); |
| 460 | 460 | |
| 461 | 461 | foreach ( $exclude as $e ) { |
| 462 | - if ( ! empty( $new_settings[ $e ] ) ) { |
|
| 463 | - unset( $new_settings[ $e ] ); |
|
| 462 | + if ( ! empty( $new_settings[$e] ) ) { |
|
| 463 | + unset( $new_settings[$e] ); |
|
| 464 | 464 | } |
| 465 | 465 | } |
| 466 | 466 | |
@@ -471,8 +471,8 @@ discard block |
||
| 471 | 471 | } |
| 472 | 472 | |
| 473 | 473 | foreach ( $exclude as $e ) { |
| 474 | - if ( ! empty( $settings[ $e ] ) ) { |
|
| 475 | - $new_settings = $settings[ $e ]; |
|
| 474 | + if ( ! empty( $settings[$e] ) ) { |
|
| 475 | + $new_settings = $settings[$e]; |
|
| 476 | 476 | } |
| 477 | 477 | } |
| 478 | 478 | |
@@ -630,7 +630,7 @@ discard block |
||
| 630 | 630 | ), |
| 631 | 631 | admin_url( 'admin.php' ) |
| 632 | 632 | ); |
| 633 | - $url = esc_url( $url ); |
|
| 633 | + $url = esc_url( $url ); |
|
| 634 | 634 | |
| 635 | 635 | ob_start(); |
| 636 | 636 | if ( false === ( $creds = request_filesystem_credentials( $url, $method, false, false, null ) ) ) { |
@@ -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 |
@@ -98,8 +98,8 @@ discard block |
||
| 98 | 98 | |
| 99 | 99 | if ( $create && ! empty( $create ) && is_array( $create ) ) { |
| 100 | 100 | $create = json_encode( $create ); |
| 101 | - $create = str_replace( '"', "'", $create ); |
|
| 102 | - $options['create'] = "'create', '" . esc_js( $ua_code ). "', '" . esc_js( $domain ) . "', " . $create; |
|
| 101 | + $create = str_replace( '"', "'", $create ); |
|
| 102 | + $options['create'] = "'create', '" . esc_js( $ua_code ) . "', '" . esc_js( $domain ) . "', " . $create; |
|
| 103 | 103 | } else { |
| 104 | 104 | $options['create'] = "'create', '" . esc_js( $ua_code ) . "', '" . esc_js( $domain ) . "'"; |
| 105 | 105 | } |
@@ -191,18 +191,18 @@ discard block |
||
| 191 | 191 | * @return string Javascript to output. |
| 192 | 192 | */ |
| 193 | 193 | public function frontend_output( ) { |
| 194 | - $options = $this->frontend_tracking_options(); |
|
| 194 | + $options = $this->frontend_tracking_options(); |
|
| 195 | 195 | $src = apply_filters( 'monsterinsights_frontend_output_analytics_src', '//www.google-analytics.com/analytics.js' ); |
| 196 | - $compat_mode = monsterinsights_get_option( 'gatracker_compatibility_mode', false ); |
|
| 196 | + $compat_mode = monsterinsights_get_option( 'gatracker_compatibility_mode', false ); |
|
| 197 | 197 | $compat = $compat_mode ? 'window.ga = __gaTracker;' : ''; |
| 198 | 198 | $track_user = monsterinsights_track_user(); |
| 199 | 199 | $ua = monsterinsights_get_ua(); |
| 200 | 200 | $output = ''; |
| 201 | 201 | $reason = ''; |
| 202 | - $attributes = apply_filters( 'monsterinsights_tracking_analytics_script_attributes', array( 'type' => "text/javascript", 'data-cfasync' => 'false' ) ); |
|
| 202 | + $attributes = apply_filters( 'monsterinsights_tracking_analytics_script_attributes', array( 'type' => "text/javascript", 'data-cfasync' => 'false' ) ); |
|
| 203 | 203 | $attr_string = ''; |
| 204 | 204 | if ( ! empty( $attributes ) ) { |
| 205 | - foreach( $attributes as $attr_name => $attr_value ) { |
|
| 205 | + foreach ( $attributes as $attr_name => $attr_value ) { |
|
| 206 | 206 | if ( ! empty( $attr_name ) ) { |
| 207 | 207 | $attr_string .= ' ' . sanitize_key( $attr_name ) . '="' . esc_attr( $attr_value ) . '"'; |
| 208 | 208 | } else { |
@@ -216,21 +216,21 @@ discard block |
||
| 216 | 216 | <?php if ( ! $track_user ) { |
| 217 | 217 | if ( empty( $ua ) ) { |
| 218 | 218 | $reason = __( 'Note: MonsterInsights is not currently configured on this site. The site owner needs to authenticate with Google Analytics in the MonsterInsights settings panel.', 'google-analytics-for-wordpress' ); |
| 219 | - $output .= '<!-- ' . esc_html( $reason ) . ' -->' . PHP_EOL; |
|
| 219 | + $output .= '<!-- ' . esc_html( $reason ) . ' -->' . PHP_EOL; |
|
| 220 | 220 | } else if ( current_user_can( 'monsterinsights_save_settings' ) ) { |
| 221 | - $reason = __( 'Note: MonsterInsights does not track you as a logged-in site administrator to prevent site owners from accidentally skewing their own Google Analytics data.'. PHP_EOL . 'If you are testing Google Analytics code, please do so either logged out or in the private browsing/incognito mode of your web browser.', 'google-analytics-for-wordpress' ); |
|
| 222 | - $output .= '<!-- ' . esc_html( $reason ) . ' -->' . PHP_EOL; |
|
| 221 | + $reason = __( 'Note: MonsterInsights does not track you as a logged-in site administrator to prevent site owners from accidentally skewing their own Google Analytics data.' . PHP_EOL . 'If you are testing Google Analytics code, please do so either logged out or in the private browsing/incognito mode of your web browser.', 'google-analytics-for-wordpress' ); |
|
| 222 | + $output .= '<!-- ' . esc_html( $reason ) . ' -->' . PHP_EOL; |
|
| 223 | 223 | } else { |
| 224 | 224 | $reason = __( 'Note: The site owner has disabled Google Analytics tracking for your user role.', 'google-analytics-for-wordpress' ); |
| 225 | - $output .= '<!-- ' . esc_html( $reason ) . ' -->' . PHP_EOL; |
|
| 225 | + $output .= '<!-- ' . esc_html( $reason ) . ' -->' . PHP_EOL; |
|
| 226 | 226 | } |
| 227 | 227 | echo $output; |
| 228 | 228 | } ?> |
| 229 | 229 | <?php if ( $ua ) { ?> |
| 230 | -<script<?php echo $attr_string;?>> |
|
| 230 | +<script<?php echo $attr_string; ?>> |
|
| 231 | 231 | var mi_version = '<?php echo MONSTERINSIGHTS_VERSION; ?>'; |
| 232 | 232 | var mi_track_user = <?php echo ( $track_user ? 'true' : 'false' ); ?>; |
| 233 | - var mi_no_track_reason = <?php echo ( $reason ? "'" . esc_js( $reason) . "'": "''" ); ?>; |
|
| 233 | + var mi_no_track_reason = <?php echo ( $reason ? "'" . esc_js( $reason ) . "'" : "''" ); ?>; |
|
| 234 | 234 | <?php do_action( 'monsterinsights_tracking_analytics_frontend_output_after_mi_track_user' ); ?> |
| 235 | 235 | |
| 236 | 236 | <?php if ( $this->should_do_optout() ) { ?> |
@@ -278,7 +278,7 @@ discard block |
||
| 278 | 278 | ?> |
| 279 | 279 | } else { |
| 280 | 280 | <?php if ( $this->should_do_optout() ) { ?> |
| 281 | - console.log( "<?php echo esc_js( $reason );?>" ); |
|
| 281 | + console.log( "<?php echo esc_js( $reason ); ?>" ); |
|
| 282 | 282 | (function() { |
| 283 | 283 | /* https://developers.google.com/analytics/devguides/collection/analyticsjs/ */ |
| 284 | 284 | var noopfn = function() { |
@@ -301,7 +301,7 @@ discard block |
||
| 301 | 301 | } |
| 302 | 302 | var f = arguments[len-1]; |
| 303 | 303 | if ( typeof f !== 'object' || f === null || typeof f.hitCallback !== 'function' ) { |
| 304 | - console.log( '<?php echo esc_js( __("Not running function", "google-analytics-for-wordpress" ) );?> __gaTracker(' + arguments[0] + " ....) <?php echo esc_js( __( "because you are not being tracked.", 'google-analytics-for-wordpress' ) );?> " + mi_no_track_reason ); |
|
| 304 | + console.log( '<?php echo esc_js( __( "Not running function", "google-analytics-for-wordpress" ) ); ?> __gaTracker(' + arguments[0] + " ....) <?php echo esc_js( __( "because you are not being tracked.", 'google-analytics-for-wordpress' ) ); ?> " + mi_no_track_reason ); |
|
| 305 | 305 | return; |
| 306 | 306 | } |
| 307 | 307 | try { |
@@ -47,17 +47,17 @@ |
||
| 47 | 47 | if ( ! empty( $data['data']['countries'] ) ) { |
| 48 | 48 | $country_names = monsterinsights_get_country_list( true ); |
| 49 | 49 | foreach ( $data['data']['countries'] as $key => $country ) { |
| 50 | - $data['data']['countries'][ $key ]['name'] = isset( $country_names[ $country['iso'] ] ) ? $country_names[ $country['iso'] ] : $country['iso']; |
|
| 50 | + $data['data']['countries'][$key]['name'] = isset( $country_names[$country['iso']] ) ? $country_names[$country['iso']] : $country['iso']; |
|
| 51 | 51 | } |
| 52 | 52 | } |
| 53 | 53 | |
| 54 | 54 | // Escape urls for the top pages report. |
| 55 | 55 | if ( ! empty( $data['data']['toppages'] ) ) { |
| 56 | 56 | foreach ( $data['data']['toppages'] as $key => $page ) { |
| 57 | - $title = $data['data']['toppages'][ $key ]['title']; |
|
| 58 | - $url = '(not set)' === $title ? '' : esc_url( $data['data']['toppages'][ $key ]['hostname'] ); |
|
| 57 | + $title = $data['data']['toppages'][$key]['title']; |
|
| 58 | + $url = '(not set)' === $title ? '' : esc_url( $data['data']['toppages'][$key]['hostname'] ); |
|
| 59 | 59 | |
| 60 | - $data['data']['toppages'][ $key ]['hostname'] = $url; |
|
| 60 | + $data['data']['toppages'][$key]['hostname'] = $url; |
|
| 61 | 61 | } |
| 62 | 62 | } |
| 63 | 63 | |
@@ -378,7 +378,7 @@ discard block |
||
| 378 | 378 | 'kad_admin_js', // Pinnacle theme |
| 379 | 379 | 'dt-chart', // DesignThemes core features plugin |
| 380 | 380 | 'tweeetshare_font_script', // TweetShare - Click To Tweet |
| 381 | - 'tweeetshare_jquery_script', // TweetShare - Click To Tweet |
|
| 381 | + 'tweeetshare_jquery_script', // TweetShare - Click To Tweet |
|
| 382 | 382 | 'tweeetshare_jqueryui_script', // TweetShare - Click To Tweet |
| 383 | 383 | 'tweeetshare_custom_script', // TweetShare - Click To Tweet |
| 384 | 384 | 'imagify-promise-polyfill', // Imagify |
@@ -397,16 +397,16 @@ discard block |
||
| 397 | 397 | 'rml-modal', // WP Real Media Library |
| 398 | 398 | 'rml-order', // WP Real Media Library |
| 399 | 399 | 'rml-meta', // WP Real Media Library |
| 400 | - 'rml-uploader', // WP Real Media Library |
|
| 401 | - 'rml-options', // WP Real Media Library |
|
| 402 | - 'rml-usersettings', // WP Real Media Library |
|
| 400 | + 'rml-uploader', // WP Real Media Library |
|
| 401 | + 'rml-options', // WP Real Media Library |
|
| 402 | + 'rml-usersettings', // WP Real Media Library |
|
| 403 | 403 | 'rml-main', // WP Real Media Library |
| 404 | 404 | 'control-panel-sweet-alert', // Ken Theme |
| 405 | 405 | 'sweet-alert-js', // Vitrine Theme |
| 406 | 406 | 'theme-admin-script', // Vitrine Theme |
| 407 | 407 | 'sweetalert', // Church Suite Theme by Webnus |
| 408 | 408 | 'be_alerts_charts', // WooCommerce bolder product alerts |
| 409 | - 'magayo-lottery-results', // Magayo Lottery Results |
|
| 409 | + 'magayo-lottery-results', // Magayo Lottery Results |
|
| 410 | 410 | 'control-panel-sweet-alert', // Ken Theme |
| 411 | 411 | 'cpm_chart', // WP Project Manager |
| 412 | 412 | 'adminscripts', // Artisan Nayma Theme |
@@ -501,20 +501,20 @@ discard block |
||
| 501 | 501 | |
| 502 | 502 | global $wp_styles; |
| 503 | 503 | foreach ( $wp_styles->queue as $handle ) { |
| 504 | - if ( strpos( $wp_styles->registered[ $handle ]->src, 'wp-content' ) === false ) { |
|
| 504 | + if ( strpos( $wp_styles->registered[$handle]->src, 'wp-content' ) === false ) { |
|
| 505 | 505 | return; |
| 506 | 506 | } |
| 507 | 507 | |
| 508 | - if ( strpos( $wp_styles->registered[ $handle ]->handle, 'monsterinsights' ) !== false ) { |
|
| 508 | + if ( strpos( $wp_styles->registered[$handle]->handle, 'monsterinsights' ) !== false ) { |
|
| 509 | 509 | return; |
| 510 | 510 | } |
| 511 | 511 | |
| 512 | 512 | foreach ( $third_party as $partial ) { |
| 513 | - if ( strpos( $wp_styles->registered[ $handle ]->handle, $partial ) !== false ) { |
|
| 513 | + if ( strpos( $wp_styles->registered[$handle]->handle, $partial ) !== false ) { |
|
| 514 | 514 | wp_dequeue_style( $handle ); // Remove css file from MI screen |
| 515 | 515 | wp_deregister_style( $handle ); |
| 516 | 516 | break; |
| 517 | - } else if ( strpos( $wp_styles->registered[ $handle ]->src, $partial ) !== false ) { |
|
| 517 | + } else if ( strpos( $wp_styles->registered[$handle]->src, $partial ) !== false ) { |
|
| 518 | 518 | wp_dequeue_style( $handle ); // Remove css file from MI screen |
| 519 | 519 | wp_deregister_style( $handle ); |
| 520 | 520 | break; |
@@ -524,20 +524,20 @@ discard block |
||
| 524 | 524 | |
| 525 | 525 | global $wp_scripts; |
| 526 | 526 | foreach ( $wp_scripts->queue as $handle ) { |
| 527 | - if ( strpos( $wp_scripts->registered[ $handle ]->src, 'wp-content' ) === false ) { |
|
| 527 | + if ( strpos( $wp_scripts->registered[$handle]->src, 'wp-content' ) === false ) { |
|
| 528 | 528 | return; |
| 529 | 529 | } |
| 530 | 530 | |
| 531 | - if ( strpos( $wp_scripts->registered[ $handle ]->handle, 'monsterinsights' ) !== false ) { |
|
| 531 | + if ( strpos( $wp_scripts->registered[$handle]->handle, 'monsterinsights' ) !== false ) { |
|
| 532 | 532 | return; |
| 533 | 533 | } |
| 534 | 534 | |
| 535 | 535 | foreach ( $third_party as $partial ) { |
| 536 | - if ( strpos( $wp_scripts->registered[ $handle ]->handle, $partial ) !== false ) { |
|
| 536 | + if ( strpos( $wp_scripts->registered[$handle]->handle, $partial ) !== false ) { |
|
| 537 | 537 | wp_dequeue_script( $handle ); // Remove JS file from MI screen |
| 538 | 538 | wp_deregister_script( $handle ); |
| 539 | 539 | break; |
| 540 | - } else if ( strpos( $wp_scripts->registered[ $handle ]->src, $partial ) !== false ) { |
|
| 540 | + } else if ( strpos( $wp_scripts->registered[$handle]->src, $partial ) !== false ) { |
|
| 541 | 541 | wp_dequeue_script( $handle ); // Remove JS file from MI screen |
| 542 | 542 | wp_deregister_script( $handle ); |
| 543 | 543 | break; |
@@ -611,14 +611,14 @@ discard block |
||
| 611 | 611 | foreach ( $wp_filter['user_admin_notices']->callbacks as $priority => $hooks ) { |
| 612 | 612 | foreach ( $hooks as $name => $arr ) { |
| 613 | 613 | if ( is_object( $arr['function'] ) && $arr['function'] instanceof Closure ) { |
| 614 | - unset( $wp_filter['user_admin_notices']->callbacks[ $priority ][ $name ] ); |
|
| 614 | + unset( $wp_filter['user_admin_notices']->callbacks[$priority][$name] ); |
|
| 615 | 615 | continue; |
| 616 | 616 | } |
| 617 | 617 | if ( ! empty( $arr['function'][0] ) && is_object( $arr['function'][0] ) && strpos( strtolower( get_class( $arr['function'][0] ) ), 'monsterinsights' ) !== false ) { |
| 618 | 618 | continue; |
| 619 | 619 | } |
| 620 | 620 | if ( ! empty( $name ) && strpos( $name, 'monsterinsights' ) === false ) { |
| 621 | - unset( $wp_filter['user_admin_notices']->callbacks[ $priority ][ $name ] ); |
|
| 621 | + unset( $wp_filter['user_admin_notices']->callbacks[$priority][$name] ); |
|
| 622 | 622 | } |
| 623 | 623 | } |
| 624 | 624 | } |
@@ -628,14 +628,14 @@ discard block |
||
| 628 | 628 | foreach ( $wp_filter['admin_notices']->callbacks as $priority => $hooks ) { |
| 629 | 629 | foreach ( $hooks as $name => $arr ) { |
| 630 | 630 | if ( is_object( $arr['function'] ) && $arr['function'] instanceof Closure ) { |
| 631 | - unset( $wp_filter['admin_notices']->callbacks[ $priority ][ $name ] ); |
|
| 631 | + unset( $wp_filter['admin_notices']->callbacks[$priority][$name] ); |
|
| 632 | 632 | continue; |
| 633 | 633 | } |
| 634 | 634 | if ( ! empty( $arr['function'][0] ) && is_object( $arr['function'][0] ) && strpos( strtolower( get_class( $arr['function'][0] ) ), 'monsterinsights' ) !== false ) { |
| 635 | 635 | continue; |
| 636 | 636 | } |
| 637 | 637 | if ( ! empty( $name ) && strpos( $name, 'monsterinsights' ) === false ) { |
| 638 | - unset( $wp_filter['admin_notices']->callbacks[ $priority ][ $name ] ); |
|
| 638 | + unset( $wp_filter['admin_notices']->callbacks[$priority][$name] ); |
|
| 639 | 639 | } |
| 640 | 640 | } |
| 641 | 641 | } |
@@ -645,14 +645,14 @@ discard block |
||
| 645 | 645 | foreach ( $wp_filter['all_admin_notices']->callbacks as $priority => $hooks ) { |
| 646 | 646 | foreach ( $hooks as $name => $arr ) { |
| 647 | 647 | if ( is_object( $arr['function'] ) && $arr['function'] instanceof Closure ) { |
| 648 | - unset( $wp_filter['all_admin_notices']->callbacks[ $priority ][ $name ] ); |
|
| 648 | + unset( $wp_filter['all_admin_notices']->callbacks[$priority][$name] ); |
|
| 649 | 649 | continue; |
| 650 | 650 | } |
| 651 | 651 | if ( ! empty( $arr['function'][0] ) && is_object( $arr['function'][0] ) && strpos( strtolower( get_class( $arr['function'][0] ) ), 'monsterinsights' ) !== false ) { |
| 652 | 652 | continue; |
| 653 | 653 | } |
| 654 | 654 | if ( ! empty( $name ) && strpos( $name, 'monsterinsights' ) === false ) { |
| 655 | - unset( $wp_filter['all_admin_notices']->callbacks[ $priority ][ $name ] ); |
|
| 655 | + unset( $wp_filter['all_admin_notices']->callbacks[$priority][$name] ); |
|
| 656 | 656 | } |
| 657 | 657 | } |
| 658 | 658 | } |
@@ -713,10 +713,10 @@ discard block |
||
| 713 | 713 | // Put together redirect URL |
| 714 | 714 | $url = add_query_arg( |
| 715 | 715 | array( |
| 716 | - 'utm_source' => $source, // Pro/Lite Plugin |
|
| 717 | - 'utm_medium' => sanitize_key( $medium ), // Area of MonsterInsights (example Reports) |
|
| 716 | + 'utm_source' => $source, // Pro/Lite Plugin |
|
| 717 | + 'utm_medium' => sanitize_key( $medium ), // Area of MonsterInsights (example Reports) |
|
| 718 | 718 | 'utm_campaign' => sanitize_key( $campaign ), // Which link (example eCommerce Report) |
| 719 | - 'utm_content' => $content, // Version number of MI |
|
| 719 | + 'utm_content' => $content, // Version number of MI |
|
| 720 | 720 | ), |
| 721 | 721 | trailingslashit( $url ) |
| 722 | 722 | ); |
@@ -811,10 +811,10 @@ discard block |
||
| 811 | 811 | */ |
| 812 | 812 | function monsterinsights_yearinreview_admin_menu_tooltip() { |
| 813 | 813 | |
| 814 | - $dismiss_tooltip = get_option( 'monsterinsights_yearinreview_dismiss_admin_tooltip', false ); |
|
| 815 | - $activated = get_option( 'monsterinsights_over_time', array() ); |
|
| 816 | - $ua_code = monsterinsights_get_ua(); |
|
| 817 | - $dashboards_disabled = monsterinsights_get_option( 'dashboards_disabled', false ); |
|
| 814 | + $dismiss_tooltip = get_option( 'monsterinsights_yearinreview_dismiss_admin_tooltip', false ); |
|
| 815 | + $activated = get_option( 'monsterinsights_over_time', array() ); |
|
| 816 | + $ua_code = monsterinsights_get_ua(); |
|
| 817 | + $dashboards_disabled = monsterinsights_get_option( 'dashboards_disabled', false ); |
|
| 818 | 818 | |
| 819 | 819 | if ( $dashboards_disabled ) { |
| 820 | 820 | return; |
@@ -830,7 +830,7 @@ discard block |
||
| 830 | 830 | } |
| 831 | 831 | |
| 832 | 832 | // equivalent to: 01/01/2020 @ 12:00am (UTC) |
| 833 | - $new_year = '1577836800'; |
|
| 833 | + $new_year = '1577836800'; |
|
| 834 | 834 | |
| 835 | 835 | // equivalent to: 01/02/2020 @ 12:00am (UTC) |
| 836 | 836 | $start_time = '1577923200'; |
@@ -838,7 +838,7 @@ discard block |
||
| 838 | 838 | // equivalent to: 01/13/2020 @ 12:00am (UTC) |
| 839 | 839 | $end_time = '1578873600'; |
| 840 | 840 | |
| 841 | - if ( $dismiss_tooltip ) { |
|
| 841 | + if ( $dismiss_tooltip ) { |
|
| 842 | 842 | return; |
| 843 | 843 | } |
| 844 | 844 | |
@@ -838,7 +838,7 @@ |
||
| 838 | 838 | // equivalent to: 01/13/2020 @ 12:00am (UTC) |
| 839 | 839 | $end_time = '1578873600'; |
| 840 | 840 | |
| 841 | - if ( $dismiss_tooltip ) { |
|
| 841 | + if ( $dismiss_tooltip ) { |
|
| 842 | 842 | return; |
| 843 | 843 | } |
| 844 | 844 | |
@@ -54,9 +54,9 @@ discard block |
||
| 54 | 54 | return; |
| 55 | 55 | } |
| 56 | 56 | |
| 57 | - add_action( 'admin_print_scripts', array( $this, 'js' ), 20 ); |
|
| 58 | - add_action( 'admin_print_scripts', array( $this, 'css' ) ); |
|
| 59 | - add_action( 'admin_footer', array( $this, 'modal' ) ); |
|
| 57 | + add_action( 'admin_print_scripts', array( $this, 'js' ), 20 ); |
|
| 58 | + add_action( 'admin_print_scripts', array( $this, 'css' ) ); |
|
| 59 | + add_action( 'admin_footer', array( $this, 'modal' ) ); |
|
| 60 | 60 | } |
| 61 | 61 | |
| 62 | 62 | /** |
@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | */ |
| 68 | 68 | public function is_dev_url() { |
| 69 | 69 | // If it is an AM dev site, return false, so we can see them on our dev sites. |
| 70 | - if ( defined ('AWESOMEMOTIVE_DEV_MODE' ) && AWESOMEMOTIVE_DEV_MODE ) { |
|
| 70 | + if ( defined( 'AWESOMEMOTIVE_DEV_MODE' ) && AWESOMEMOTIVE_DEV_MODE ) { |
|
| 71 | 71 | return false; |
| 72 | 72 | } |
| 73 | 73 | |
@@ -101,7 +101,7 @@ discard block |
||
| 101 | 101 | |
| 102 | 102 | } |
| 103 | 103 | if ( substr_count( $host, '.' ) > 1 ) { |
| 104 | - $subdomains_to_check = array( 'dev.', '*.staging.', 'beta.', 'test.' ); |
|
| 104 | + $subdomains_to_check = array( 'dev.', '*.staging.', 'beta.', 'test.' ); |
|
| 105 | 105 | foreach ( $subdomains_to_check as $subdomain ) { |
| 106 | 106 | $subdomain = str_replace( '.', '(.)', $subdomain ); |
| 107 | 107 | $subdomain = str_replace( array( '*', '(.)' ), '(.*)', $subdomain ); |
@@ -319,7 +319,7 @@ discard block |
||
| 319 | 319 | <span class="am-deactivate-survey-desc"> |
| 320 | 320 | <?php |
| 321 | 321 | // Translators: Placeholder for the plugin name. |
| 322 | - echo sprintf( esc_html__('If you have a moment, please share why you are deactivating %s:', 'google-analytics-for-wordpress' ), $this->name ); |
|
| 322 | + echo sprintf( esc_html__( 'If you have a moment, please share why you are deactivating %s:', 'google-analytics-for-wordpress' ), $this->name ); |
|
| 323 | 323 | ?> |
| 324 | 324 | </span> |
| 325 | 325 | <div class="am-deactivate-survey-options"> |
@@ -339,13 +339,13 @@ discard block |
||
| 339 | 339 | <button type="submit" class="am-deactivate-survey-submit button button-primary button-large"> |
| 340 | 340 | <?php |
| 341 | 341 | // Translators: Adds an ampersand. |
| 342 | - echo sprintf( esc_html__('Submit %s Deactivate', 'google-analytics-for-wordpress' ), '&' ); |
|
| 342 | + echo sprintf( esc_html__( 'Submit %s Deactivate', 'google-analytics-for-wordpress' ), '&' ); |
|
| 343 | 343 | ?> |
| 344 | 344 | </button> |
| 345 | 345 | <a href="#" class="am-deactivate-survey-deactivate"> |
| 346 | 346 | <?php |
| 347 | 347 | // Translators: Adds an ampersand. |
| 348 | - echo sprintf( esc_html__('Skip %s Deactivate', 'google-analytics-for-wordpress' ), '&' ); |
|
| 348 | + echo sprintf( esc_html__( 'Skip %s Deactivate', 'google-analytics-for-wordpress' ), '&' ); |
|
| 349 | 349 | ?> |
| 350 | 350 | </a> |
| 351 | 351 | </div> |
@@ -193,7 +193,7 @@ discard block |
||
| 193 | 193 | |
| 194 | 194 | foreach ( $addresses as $key => $address ) { |
| 195 | 195 | if ( ! is_email( $address ) ) { |
| 196 | - unset( $addresses[ $key ] ); |
|
| 196 | + unset( $addresses[$key] ); |
|
| 197 | 197 | } |
| 198 | 198 | } |
| 199 | 199 | |
@@ -294,11 +294,11 @@ discard block |
||
| 294 | 294 | continue; |
| 295 | 295 | } |
| 296 | 296 | |
| 297 | - if ( ! isset( $this->args[ $type ] ) || ! is_array( $this->args[ $type ] ) ) { |
|
| 298 | - $this->args[ $type ] = array(); |
|
| 297 | + if ( ! isset( $this->args[$type] ) || ! is_array( $this->args[$type] ) ) { |
|
| 298 | + $this->args[$type] = array(); |
|
| 299 | 299 | } |
| 300 | 300 | |
| 301 | - $this->args[ $type ] = $merge ? array_merge( $this->args[ $type ], $value ) : $value; |
|
| 301 | + $this->args[$type] = $merge ? array_merge( $this->args[$type], $value ) : $value; |
|
| 302 | 302 | } |
| 303 | 303 | |
| 304 | 304 | return $this; |
@@ -315,7 +315,7 @@ discard block |
||
| 315 | 315 | */ |
| 316 | 316 | public function get_args( $type ) { |
| 317 | 317 | if ( ! empty( $type ) ) { |
| 318 | - return isset( $this->args[ $type ] ) ? apply_filters( 'monsterinsights_emails_templates_get_args_' . $type, $this->args[ $type ], $this ) : array(); |
|
| 318 | + return isset( $this->args[$type] ) ? apply_filters( 'monsterinsights_emails_templates_get_args_' . $type, $this->args[$type], $this ) : array(); |
|
| 319 | 319 | } |
| 320 | 320 | |
| 321 | 321 | return apply_filters( 'monsterinsights_emails_templates_get_args', $this->args, $this ); |
@@ -330,12 +330,12 @@ discard block |
||
| 330 | 330 | * |
| 331 | 331 | * @return string |
| 332 | 332 | */ |
| 333 | - public function build_email( $message=null ) { |
|
| 333 | + public function build_email( $message = null ) { |
|
| 334 | 334 | // process plain text email |
| 335 | 335 | if ( false === $this->html ) { |
| 336 | - $body = $this->get_template_part( 'body', $this->get_template(), true ); |
|
| 337 | - $body = wp_strip_all_tags( $body ); |
|
| 338 | - $message = str_replace( '{email}', $message, $body ); |
|
| 336 | + $body = $this->get_template_part( 'body', $this->get_template(), true ); |
|
| 337 | + $body = wp_strip_all_tags( $body ); |
|
| 338 | + $message = str_replace( '{email}', $message, $body ); |
|
| 339 | 339 | |
| 340 | 340 | return apply_filters( 'monsterinsights_email_message', $message, $this ); |
| 341 | 341 | } |
@@ -358,7 +358,7 @@ discard block |
||
| 358 | 358 | do_action( 'monsterinsights_email_footer', $email_parts['footer'] ); |
| 359 | 359 | |
| 360 | 360 | |
| 361 | - $body = implode( $email_parts ); |
|
| 361 | + $body = implode( $email_parts ); |
|
| 362 | 362 | $message = $this->process_tag( $message, false ); |
| 363 | 363 | $message = nl2br( $message ); |
| 364 | 364 | $message = str_replace( '{email}', $message, $body ); |
@@ -379,7 +379,7 @@ discard block |
||
| 379 | 379 | * |
| 380 | 380 | * @return bool |
| 381 | 381 | */ |
| 382 | - public function send( $to, $subject, $message=null, $attachments = array() ) { |
|
| 382 | + public function send( $to, $subject, $message = null, $attachments = array() ) { |
|
| 383 | 383 | |
| 384 | 384 | if ( ! did_action( 'init' ) && ! did_action( 'admin_init' ) ) { |
| 385 | 385 | _doing_it_wrong( __FUNCTION__, esc_html__( 'You cannot send emails with MI_WP_Emails() until init/admin_init has been reached.', 'google-analytics-for-wordpress' ), null ); |
@@ -510,7 +510,7 @@ discard block |
||
| 510 | 510 | $this->template = 'default'; |
| 511 | 511 | } |
| 512 | 512 | |
| 513 | - return apply_filters( 'monsterinsights_email_template', $this->template); |
|
| 513 | + return apply_filters( 'monsterinsights_email_template', $this->template ); |
|
| 514 | 514 | } |
| 515 | 515 | |
| 516 | 516 | /** |
@@ -303,7 +303,7 @@ |
||
| 303 | 303 | // 3. License key not valid/okay for pro |
| 304 | 304 | if ( monsterinsights_is_pro_version() ) { |
| 305 | 305 | $message = ''; |
| 306 | - if ( MonsterInsights()->license->get_site_license_key() ){ |
|
| 306 | + if ( MonsterInsights()->license->get_site_license_key() ) { |
|
| 307 | 307 | if ( MonsterInsights()->license->site_license_expired() ) { |
| 308 | 308 | // Translators: Adds a link to the license renewal. |
| 309 | 309 | $message = sprintf( esc_html__( 'Your license key for MonsterInsights has expired. %1$sPlease click here to renew your license key.%2$s', 'google-analytics-for-wordpress' ), '<a href="'. monsterinsights_get_url( 'admin-notices', 'expired-license', "https://www.monsterinsights.com/login/" ) .'" target="_blank" rel="noopener noreferrer" referrer="no-referrer">', '</a>' ); |
@@ -27,22 +27,22 @@ discard block |
||
| 27 | 27 | $menu_icon_inline = monsterinsights_get_inline_menu_icon(); |
| 28 | 28 | |
| 29 | 29 | if ( $hook === 'monsterinsights_settings' ) { |
| 30 | - // If dashboards disabled, first settings page |
|
| 31 | - add_menu_page( __( 'MonsterInsights', 'google-analytics-for-wordpress' ), __( 'Insights', 'google-analytics-for-wordpress' ) . MonsterInsights()->notifications->get_menu_count(), 'monsterinsights_save_settings', 'monsterinsights_settings', 'monsterinsights_settings_page', $menu_icon_inline, '100.00013467543' ); |
|
| 32 | - $hook = 'monsterinsights_settings'; |
|
| 30 | + // If dashboards disabled, first settings page |
|
| 31 | + add_menu_page( __( 'MonsterInsights', 'google-analytics-for-wordpress' ), __( 'Insights', 'google-analytics-for-wordpress' ) . MonsterInsights()->notifications->get_menu_count(), 'monsterinsights_save_settings', 'monsterinsights_settings', 'monsterinsights_settings_page', $menu_icon_inline, '100.00013467543' ); |
|
| 32 | + $hook = 'monsterinsights_settings'; |
|
| 33 | 33 | |
| 34 | - add_submenu_page( $hook, __( 'MonsterInsights', 'google-analytics-for-wordpress' ), __( 'Settings', 'google-analytics-for-wordpress' ), 'monsterinsights_save_settings', 'monsterinsights_settings' ); |
|
| 34 | + add_submenu_page( $hook, __( 'MonsterInsights', 'google-analytics-for-wordpress' ), __( 'Settings', 'google-analytics-for-wordpress' ), 'monsterinsights_save_settings', 'monsterinsights_settings' ); |
|
| 35 | 35 | } else { |
| 36 | - // if dashboards enabled, first dashboard |
|
| 37 | - add_menu_page( __( 'General:', 'google-analytics-for-wordpress' ), __( 'Insights', 'google-analytics-for-wordpress' ) . MonsterInsights()->notifications->get_menu_count(), 'monsterinsights_view_dashboard', 'monsterinsights_reports', 'monsterinsights_reports_page', $menu_icon_inline, '100.00013467543' ); |
|
| 36 | + // if dashboards enabled, first dashboard |
|
| 37 | + add_menu_page( __( 'General:', 'google-analytics-for-wordpress' ), __( 'Insights', 'google-analytics-for-wordpress' ) . MonsterInsights()->notifications->get_menu_count(), 'monsterinsights_view_dashboard', 'monsterinsights_reports', 'monsterinsights_reports_page', $menu_icon_inline, '100.00013467543' ); |
|
| 38 | 38 | |
| 39 | - add_submenu_page( $hook, __( 'General Reports:', 'google-analytics-for-wordpress' ), __( 'Reports', 'google-analytics-for-wordpress' ), 'monsterinsights_view_dashboard', 'monsterinsights_reports', 'monsterinsights_reports_page' ); |
|
| 39 | + add_submenu_page( $hook, __( 'General Reports:', 'google-analytics-for-wordpress' ), __( 'Reports', 'google-analytics-for-wordpress' ), 'monsterinsights_view_dashboard', 'monsterinsights_reports', 'monsterinsights_reports_page' ); |
|
| 40 | 40 | |
| 41 | - // then settings page |
|
| 42 | - add_submenu_page( $hook, __( 'MonsterInsights', 'google-analytics-for-wordpress' ), __( 'Settings', 'google-analytics-for-wordpress' ), 'monsterinsights_save_settings', 'monsterinsights_settings', 'monsterinsights_settings_page' ); |
|
| 41 | + // then settings page |
|
| 42 | + add_submenu_page( $hook, __( 'MonsterInsights', 'google-analytics-for-wordpress' ), __( 'Settings', 'google-analytics-for-wordpress' ), 'monsterinsights_save_settings', 'monsterinsights_settings', 'monsterinsights_settings_page' ); |
|
| 43 | 43 | |
| 44 | - // Add dashboard submenu. |
|
| 45 | - add_submenu_page( 'index.php', __( 'General Reports:', 'google-analytics-for-wordpress' ), __( 'Insights', 'google-analytics-for-wordpress' ), 'monsterinsights_view_dashboard', 'admin.php?page=monsterinsights_reports' ); |
|
| 44 | + // Add dashboard submenu. |
|
| 45 | + add_submenu_page( 'index.php', __( 'General Reports:', 'google-analytics-for-wordpress' ), __( 'Insights', 'google-analytics-for-wordpress' ), 'monsterinsights_view_dashboard', 'admin.php?page=monsterinsights_reports' ); |
|
| 46 | 46 | } |
| 47 | 47 | |
| 48 | 48 | $submenu_base = add_query_arg( 'page', 'monsterinsights_settings', admin_url( 'admin.php' ) ); |
@@ -53,7 +53,7 @@ discard block |
||
| 53 | 53 | // then addons |
| 54 | 54 | $network_key = monsterinsights_is_pro_version() ? MonsterInsights()->license->get_network_license_key() : ''; |
| 55 | 55 | if ( ! monsterinsights_is_network_active() || ( monsterinsights_is_network_active() && empty( $network_key ) ) ) { |
| 56 | - add_submenu_page( $hook, __( 'Addons:', 'google-analytics-for-wordpress' ), '<span style="color:' . monsterinsights_menu_highlight_color() . '"> ' . __( 'Addons', 'google-analytics-for-wordpress' ) . '</span>', 'monsterinsights_save_settings', $submenu_base . '#/addons' ); |
|
| 56 | + add_submenu_page( $hook, __( 'Addons:', 'google-analytics-for-wordpress' ), '<span style="color:' . monsterinsights_menu_highlight_color() . '"> ' . __( 'Addons', 'google-analytics-for-wordpress' ) . '</span>', 'monsterinsights_save_settings', $submenu_base . '#/addons' ); |
|
| 57 | 57 | } |
| 58 | 58 | |
| 59 | 59 | // Add About us page. |
@@ -64,9 +64,9 @@ discard block |
||
| 64 | 64 | function monsterinsights_get_menu_hook() { |
| 65 | 65 | $dashboards_disabled = monsterinsights_get_option( 'dashboards_disabled', false ); |
| 66 | 66 | if ( $dashboards_disabled || ( current_user_can( 'monsterinsights_save_settings' ) && ! current_user_can( 'monsterinsights_view_dashboard' ) ) ) { |
| 67 | - return 'monsterinsights_settings'; |
|
| 67 | + return 'monsterinsights_settings'; |
|
| 68 | 68 | } else { |
| 69 | - return 'monsterinsights_reports'; |
|
| 69 | + return 'monsterinsights_reports'; |
|
| 70 | 70 | } |
| 71 | 71 | } |
| 72 | 72 | |
@@ -77,12 +77,12 @@ discard block |
||
| 77 | 77 | // First, let's see if this is an MS network enabled plugin. If it is, we should load the license |
| 78 | 78 | // menu page and the updater on the network panel |
| 79 | 79 | if ( ! function_exists( 'is_plugin_active_for_network' ) ) { |
| 80 | - require_once( ABSPATH . '/wp-admin/includes/plugin.php' ); |
|
| 80 | + require_once( ABSPATH . '/wp-admin/includes/plugin.php' ); |
|
| 81 | 81 | } |
| 82 | 82 | |
| 83 | 83 | $plugin = plugin_basename( MONSTERINSIGHTS_PLUGIN_FILE ); |
| 84 | 84 | if ( ! is_plugin_active_for_network( $plugin ) ) { |
| 85 | - return; |
|
| 85 | + return; |
|
| 86 | 86 | } |
| 87 | 87 | |
| 88 | 88 | $menu_icon_inline = monsterinsights_get_inline_menu_icon(); |
@@ -113,7 +113,7 @@ discard block |
||
| 113 | 113 | function monsterinsights_add_admin_body_class( $classes ) { |
| 114 | 114 | $screen = function_exists( 'get_current_screen' ) ? get_current_screen() : false; |
| 115 | 115 | if ( empty( $screen ) || empty( $screen->id ) || strpos( $screen->id, 'monsterinsights' ) === false ) { |
| 116 | - return $classes; |
|
| 116 | + return $classes; |
|
| 117 | 117 | } |
| 118 | 118 | |
| 119 | 119 | return "$classes monsterinsights_page "; |
@@ -130,7 +130,7 @@ discard block |
||
| 130 | 130 | $screen = function_exists( 'get_current_screen' ) ? get_current_screen() : false; |
| 131 | 131 | |
| 132 | 132 | if ( empty( $screen ) || empty( $screen->id ) || strpos( $screen->id, 'monsterinsights_tools' ) === false || 'insights_page_monsterinsights_tools' === $screen->id ) { |
| 133 | - return $classes; |
|
| 133 | + return $classes; |
|
| 134 | 134 | } |
| 135 | 135 | |
| 136 | 136 | return "$classes insights_page_monsterinsights_tools "; |
@@ -146,7 +146,7 @@ discard block |
||
| 146 | 146 | function monsterinsights_add_admin_body_class_addons_page( $classes ) { |
| 147 | 147 | $screen = function_exists( 'get_current_screen' ) ? get_current_screen() : false; |
| 148 | 148 | if ( empty( $screen ) || empty( $screen->id ) || strpos( $screen->id, 'monsterinsights_addons' ) === false || 'insights_page_monsterinsights_addons' === $screen->id ) { |
| 149 | - return $classes; |
|
| 149 | + return $classes; |
|
| 150 | 150 | } |
| 151 | 151 | |
| 152 | 152 | return "$classes insights_page_monsterinsights_addons "; |
@@ -166,17 +166,17 @@ discard block |
||
| 166 | 166 | |
| 167 | 167 | // If lite, show a link where they can get pro from |
| 168 | 168 | if ( ! monsterinsights_is_pro_version() ) { |
| 169 | - $get_pro = '<a title="' . esc_html__( 'Get MonsterInsights Pro', 'google-analytics-for-wordpress' ) .'" href="'. monsterinsights_get_upgrade_link( 'all-plugins', 'upgrade-link', "https://www.monsterinsights.com/docs/" ) .'">' . esc_html__( 'Get MonsterInsights Pro', 'google-analytics-for-wordpress' ) . '</a>'; |
|
| 170 | - array_unshift( $links, $get_pro ); |
|
| 169 | + $get_pro = '<a title="' . esc_html__( 'Get MonsterInsights Pro', 'google-analytics-for-wordpress' ) .'" href="'. monsterinsights_get_upgrade_link( 'all-plugins', 'upgrade-link', "https://www.monsterinsights.com/docs/" ) .'">' . esc_html__( 'Get MonsterInsights Pro', 'google-analytics-for-wordpress' ) . '</a>'; |
|
| 170 | + array_unshift( $links, $get_pro ); |
|
| 171 | 171 | } |
| 172 | 172 | |
| 173 | 173 | // If Lite, support goes to forum. If pro, it goes to our website |
| 174 | 174 | if ( monsterinsights_is_pro_version() ) { |
| 175 | - $support = '<a title="MonsterInsights Pro Support" href="'. monsterinsights_get_url( 'all-plugins', 'pro-support-link', "https://www.monsterinsights.com/my-account/support/" ) .'">' . esc_html__( 'Support', 'google-analytics-for-wordpress' ) . '</a>'; |
|
| 176 | - array_unshift( $links, $support ); |
|
| 175 | + $support = '<a title="MonsterInsights Pro Support" href="'. monsterinsights_get_url( 'all-plugins', 'pro-support-link', "https://www.monsterinsights.com/my-account/support/" ) .'">' . esc_html__( 'Support', 'google-analytics-for-wordpress' ) . '</a>'; |
|
| 176 | + array_unshift( $links, $support ); |
|
| 177 | 177 | } else { |
| 178 | - $support = '<a title="MonsterInsights Lite Support" href="'. monsterinsights_get_url( 'all-plugins', 'lite-support-link', "https://www.monsterinsights.com/lite-support/" ) .'">' . esc_html__( 'Support', 'google-analytics-for-wordpress' ) . '</a>'; |
|
| 179 | - array_unshift( $links, $support ); |
|
| 178 | + $support = '<a title="MonsterInsights Lite Support" href="'. monsterinsights_get_url( 'all-plugins', 'lite-support-link', "https://www.monsterinsights.com/lite-support/" ) .'">' . esc_html__( 'Support', 'google-analytics-for-wordpress' ) . '</a>'; |
|
| 179 | + array_unshift( $links, $support ); |
|
| 180 | 180 | } |
| 181 | 181 | |
| 182 | 182 | if ( is_network_admin() ) { |
@@ -205,26 +205,26 @@ discard block |
||
| 205 | 205 | function monsterinsights_load_admin_partial( $template, $data = array() ) { |
| 206 | 206 | |
| 207 | 207 | if ( monsterinsights_is_pro_version() ) { |
| 208 | - $dir = trailingslashit( plugin_dir_path( MonsterInsights()->file ) . 'pro/includes/admin/partials' ); |
|
| 208 | + $dir = trailingslashit( plugin_dir_path( MonsterInsights()->file ) . 'pro/includes/admin/partials' ); |
|
| 209 | 209 | |
| 210 | - if ( file_exists( $dir . $template . '.php' ) ) { |
|
| 211 | - require_once( $dir . $template . '.php' ); |
|
| 212 | - return true; |
|
| 213 | - } |
|
| 210 | + if ( file_exists( $dir . $template . '.php' ) ) { |
|
| 211 | + require_once( $dir . $template . '.php' ); |
|
| 212 | + return true; |
|
| 213 | + } |
|
| 214 | 214 | } else { |
| 215 | - $dir = trailingslashit( plugin_dir_path( MonsterInsights()->file ) . 'lite/includes/admin/partials' ); |
|
| 215 | + $dir = trailingslashit( plugin_dir_path( MonsterInsights()->file ) . 'lite/includes/admin/partials' ); |
|
| 216 | 216 | |
| 217 | - if ( file_exists( $dir . $template . '.php' ) ) { |
|
| 218 | - require_once( $dir . $template . '.php' ); |
|
| 219 | - return true; |
|
| 220 | - } |
|
| 217 | + if ( file_exists( $dir . $template . '.php' ) ) { |
|
| 218 | + require_once( $dir . $template . '.php' ); |
|
| 219 | + return true; |
|
| 220 | + } |
|
| 221 | 221 | } |
| 222 | 222 | |
| 223 | 223 | $dir = trailingslashit( plugin_dir_path( MonsterInsights()->file ) . 'includes/admin/partials' ); |
| 224 | 224 | |
| 225 | 225 | if ( file_exists( $dir . $template . '.php' ) ) { |
| 226 | - require_once( $dir . $template . '.php' ); |
|
| 227 | - return true; |
|
| 226 | + require_once( $dir . $template . '.php' ); |
|
| 227 | + return true; |
|
| 228 | 228 | } |
| 229 | 229 | |
| 230 | 230 | return false; |
@@ -241,9 +241,9 @@ discard block |
||
| 241 | 241 | function monsterinsights_admin_footer( $text ) { |
| 242 | 242 | global $current_screen; |
| 243 | 243 | if ( ! empty( $current_screen->id ) && strpos( $current_screen->id, 'monsterinsights' ) !== false ) { |
| 244 | - $url = 'https://wordpress.org/support/view/plugin-reviews/google-analytics-for-wordpress?filter=5'; |
|
| 245 | - // Translators: Placeholders add a link to the wordpress.org repository. |
|
| 246 | - $text = sprintf( esc_html__( 'Please rate %1$sMonsterInsights%2$s on %3$s %4$sWordPress.org%5$s to help us spread the word. Thank you from the MonsterInsights team!', 'google-analytics-for-wordpress' ), '<strong>', '</strong>', '<a class="monsterinsights-no-text-decoration" href="' . $url . '" target="_blank" rel="noopener noreferrer"><i class="monstericon-star"></i><i class="monstericon-star"></i><i class="monstericon-star"></i><i class="monstericon-star"></i><i class="monstericon-star"></i></a>', '<a href="' . $url . '" target="_blank" rel="noopener noreferrer">', '</a>' ); |
|
| 244 | + $url = 'https://wordpress.org/support/view/plugin-reviews/google-analytics-for-wordpress?filter=5'; |
|
| 245 | + // Translators: Placeholders add a link to the wordpress.org repository. |
|
| 246 | + $text = sprintf( esc_html__( 'Please rate %1$sMonsterInsights%2$s on %3$s %4$sWordPress.org%5$s to help us spread the word. Thank you from the MonsterInsights team!', 'google-analytics-for-wordpress' ), '<strong>', '</strong>', '<a class="monsterinsights-no-text-decoration" href="' . $url . '" target="_blank" rel="noopener noreferrer"><i class="monstericon-star"></i><i class="monstericon-star"></i><i class="monstericon-star"></i><i class="monstericon-star"></i><i class="monstericon-star"></i></a>', '<a href="' . $url . '" target="_blank" rel="noopener noreferrer">', '</a>' ); |
|
| 247 | 247 | } |
| 248 | 248 | return $text; |
| 249 | 249 | } |
@@ -254,12 +254,12 @@ discard block |
||
| 254 | 254 | // Don't show on MonsterInsights pages |
| 255 | 255 | $screen = get_current_screen(); |
| 256 | 256 | if ( empty( $screen->id ) || strpos( $screen->id, 'monsterinsights' ) !== false ) { |
| 257 | - return; |
|
| 257 | + return; |
|
| 258 | 258 | } |
| 259 | 259 | |
| 260 | 260 | // Make sure they have the permissions to do something |
| 261 | 261 | if ( ! current_user_can( 'monsterinsights_save_settings' ) ) { |
| 262 | - return; |
|
| 262 | + return; |
|
| 263 | 263 | } |
| 264 | 264 | |
| 265 | 265 | // Priority: |
@@ -277,89 +277,89 @@ discard block |
||
| 277 | 277 | // 1. Google Analytics not authenticated |
| 278 | 278 | if ( ! is_network_admin() && ! monsterinsights_get_ua() && ! defined( 'MONSTERINSIGHTS_DISABLE_TRACKING' ) ) { |
| 279 | 279 | |
| 280 | - $submenu_base = is_network_admin() ? add_query_arg( 'page', 'monsterinsights_network', network_admin_url( 'admin.php' ) ) : add_query_arg( 'page', 'monsterinsights_settings', admin_url( 'admin.php' ) ); |
|
| 281 | - $title = esc_html__( 'Please Setup Website Analytics to See Audience Insights', 'google-analytics-for-wordpress' ); |
|
| 282 | - $primary = esc_html__( 'Connect MonsterInsights and Setup Website Analytics', 'google-analytics-for-wordpress' ); |
|
| 283 | - $urlone = is_network_admin() ? network_admin_url( 'admin.php?page=monsterinsights-onboarding' ) : admin_url( 'admin.php?page=monsterinsights-onboarding' ); |
|
| 284 | - $secondary = esc_html__( 'Learn More', 'google-analytics-for-wordpress' ); |
|
| 285 | - $urltwo = $submenu_base . '#/about/getting-started'; |
|
| 286 | - $message = esc_html__( 'MonsterInsights, WordPress analytics plugin, helps you connect your website with Google Analytics, so you can see how people find and use your website. Over 2 million website owners use MonsterInsights to see the stats that matter and grow their business.', 'google-analytics-for-wordpress' ); |
|
| 287 | - echo '<div class="notice notice-info"><p style="font-weight:700">'. $title .'</p><p>'. $message.'</p><p><a href="'. $urlone .'" class="button-primary">'. $primary .'</a> <a href="'. $urltwo .'" class="button-secondary">'. $secondary .'</a></p></div>'; |
|
| 288 | - return; |
|
| 280 | + $submenu_base = is_network_admin() ? add_query_arg( 'page', 'monsterinsights_network', network_admin_url( 'admin.php' ) ) : add_query_arg( 'page', 'monsterinsights_settings', admin_url( 'admin.php' ) ); |
|
| 281 | + $title = esc_html__( 'Please Setup Website Analytics to See Audience Insights', 'google-analytics-for-wordpress' ); |
|
| 282 | + $primary = esc_html__( 'Connect MonsterInsights and Setup Website Analytics', 'google-analytics-for-wordpress' ); |
|
| 283 | + $urlone = is_network_admin() ? network_admin_url( 'admin.php?page=monsterinsights-onboarding' ) : admin_url( 'admin.php?page=monsterinsights-onboarding' ); |
|
| 284 | + $secondary = esc_html__( 'Learn More', 'google-analytics-for-wordpress' ); |
|
| 285 | + $urltwo = $submenu_base . '#/about/getting-started'; |
|
| 286 | + $message = esc_html__( 'MonsterInsights, WordPress analytics plugin, helps you connect your website with Google Analytics, so you can see how people find and use your website. Over 2 million website owners use MonsterInsights to see the stats that matter and grow their business.', 'google-analytics-for-wordpress' ); |
|
| 287 | + echo '<div class="notice notice-info"><p style="font-weight:700">'. $title .'</p><p>'. $message.'</p><p><a href="'. $urlone .'" class="button-primary">'. $primary .'</a> <a href="'. $urltwo .'" class="button-secondary">'. $secondary .'</a></p></div>'; |
|
| 288 | + return; |
|
| 289 | 289 | } |
| 290 | 290 | |
| 291 | 291 | // 2. License key not entered for pro |
| 292 | 292 | $key = monsterinsights_is_pro_version() ? MonsterInsights()->license->get_license_key() : ''; |
| 293 | 293 | if ( monsterinsights_is_pro_version() && empty( $key ) ) { |
| 294 | - $page = is_network_admin() ? network_admin_url( 'admin.php?page=monsterinsights_network' ) : admin_url( 'admin.php?page=monsterinsights_settings' ); |
|
| 295 | - // Translators: Adds a link to retrieve the license. |
|
| 296 | - $message = sprintf( esc_html__( 'Warning: No valid license key has been entered for MonsterInsights. You are currently not getting updates, and are not able to view reports. %1$sPlease click here to enter your license key and begin receiving updates and reports.%2$s', 'google-analytics-for-wordpress' ), '<a href="'. esc_url( $page ) . '">', '</a>' ); |
|
| 297 | - echo '<div class="error"><p>'. $message.'</p></div>'; |
|
| 298 | - return; |
|
| 294 | + $page = is_network_admin() ? network_admin_url( 'admin.php?page=monsterinsights_network' ) : admin_url( 'admin.php?page=monsterinsights_settings' ); |
|
| 295 | + // Translators: Adds a link to retrieve the license. |
|
| 296 | + $message = sprintf( esc_html__( 'Warning: No valid license key has been entered for MonsterInsights. You are currently not getting updates, and are not able to view reports. %1$sPlease click here to enter your license key and begin receiving updates and reports.%2$s', 'google-analytics-for-wordpress' ), '<a href="'. esc_url( $page ) . '">', '</a>' ); |
|
| 297 | + echo '<div class="error"><p>'. $message.'</p></div>'; |
|
| 298 | + return; |
|
| 299 | 299 | } |
| 300 | 300 | |
| 301 | 301 | // 3. License key not valid/okay for pro |
| 302 | 302 | if ( monsterinsights_is_pro_version() ) { |
| 303 | - $message = ''; |
|
| 304 | - if ( MonsterInsights()->license->get_site_license_key() ){ |
|
| 305 | - if ( MonsterInsights()->license->site_license_expired() ) { |
|
| 306 | - // Translators: Adds a link to the license renewal. |
|
| 307 | - $message = sprintf( esc_html__( 'Your license key for MonsterInsights has expired. %1$sPlease click here to renew your license key.%2$s', 'google-analytics-for-wordpress' ), '<a href="'. monsterinsights_get_url( 'admin-notices', 'expired-license', "https://www.monsterinsights.com/login/" ) .'" target="_blank" rel="noopener noreferrer" referrer="no-referrer">', '</a>' ); |
|
| 308 | - } else if ( MonsterInsights()->license->site_license_disabled() ) { |
|
| 309 | - $message = esc_html__( 'Your license key for MonsterInsights has been disabled. Please use a different key.', 'google-analytics-for-wordpress' ); |
|
| 310 | - } else if ( MonsterInsights()->license->site_license_invalid() ) { |
|
| 311 | - $message = esc_html__( 'Your license key for MonsterInsights is invalid. The key no longer exists or the user associated with the key has been deleted. Please use a different key.', 'google-analytics-for-wordpress' ); |
|
| 312 | - } |
|
| 313 | - } else if ( MonsterInsights()->license->get_network_license_key() ) { |
|
| 314 | - if ( MonsterInsights()->license->network_license_expired() ) { |
|
| 315 | - // Translators: Adds a link to renew license. |
|
| 316 | - $message = sprintf( esc_html__( 'Your network license key for MonsterInsights has expired. %1$sPlease click here to renew your license key.%2$s', 'google-analytics-for-wordpress' ), '<a href="'. monsterinsights_get_url( 'admin-notices', 'expired-license', "https://www.monsterinsights.com/login/" ) .'" target="_blank" rel="noopener noreferrer" referrer="no-referrer">', '</a>' ); |
|
| 317 | - } else if ( MonsterInsights()->license->network_license_disabled() ) { |
|
| 318 | - $message = esc_html__( 'Your network license key for MonsterInsights has been disabled. Please use a different key.', 'google-analytics-for-wordpress' ); |
|
| 319 | - } else if ( MonsterInsights()->license->network_license_invalid() ) { |
|
| 320 | - $message = esc_html__( 'Your network license key for MonsterInsights is invalid. The key no longer exists or the user associated with the key has been deleted. Please use a different key.', 'google-analytics-for-wordpress' ); |
|
| 321 | - } |
|
| 322 | - } |
|
| 323 | - if ( ! empty( $message ) ) { |
|
| 324 | - echo '<div class="error"><p>'. $message.'</p></div>'; |
|
| 325 | - return; |
|
| 326 | - } |
|
| 303 | + $message = ''; |
|
| 304 | + if ( MonsterInsights()->license->get_site_license_key() ){ |
|
| 305 | + if ( MonsterInsights()->license->site_license_expired() ) { |
|
| 306 | + // Translators: Adds a link to the license renewal. |
|
| 307 | + $message = sprintf( esc_html__( 'Your license key for MonsterInsights has expired. %1$sPlease click here to renew your license key.%2$s', 'google-analytics-for-wordpress' ), '<a href="'. monsterinsights_get_url( 'admin-notices', 'expired-license', "https://www.monsterinsights.com/login/" ) .'" target="_blank" rel="noopener noreferrer" referrer="no-referrer">', '</a>' ); |
|
| 308 | + } else if ( MonsterInsights()->license->site_license_disabled() ) { |
|
| 309 | + $message = esc_html__( 'Your license key for MonsterInsights has been disabled. Please use a different key.', 'google-analytics-for-wordpress' ); |
|
| 310 | + } else if ( MonsterInsights()->license->site_license_invalid() ) { |
|
| 311 | + $message = esc_html__( 'Your license key for MonsterInsights is invalid. The key no longer exists or the user associated with the key has been deleted. Please use a different key.', 'google-analytics-for-wordpress' ); |
|
| 312 | + } |
|
| 313 | + } else if ( MonsterInsights()->license->get_network_license_key() ) { |
|
| 314 | + if ( MonsterInsights()->license->network_license_expired() ) { |
|
| 315 | + // Translators: Adds a link to renew license. |
|
| 316 | + $message = sprintf( esc_html__( 'Your network license key for MonsterInsights has expired. %1$sPlease click here to renew your license key.%2$s', 'google-analytics-for-wordpress' ), '<a href="'. monsterinsights_get_url( 'admin-notices', 'expired-license', "https://www.monsterinsights.com/login/" ) .'" target="_blank" rel="noopener noreferrer" referrer="no-referrer">', '</a>' ); |
|
| 317 | + } else if ( MonsterInsights()->license->network_license_disabled() ) { |
|
| 318 | + $message = esc_html__( 'Your network license key for MonsterInsights has been disabled. Please use a different key.', 'google-analytics-for-wordpress' ); |
|
| 319 | + } else if ( MonsterInsights()->license->network_license_invalid() ) { |
|
| 320 | + $message = esc_html__( 'Your network license key for MonsterInsights is invalid. The key no longer exists or the user associated with the key has been deleted. Please use a different key.', 'google-analytics-for-wordpress' ); |
|
| 321 | + } |
|
| 322 | + } |
|
| 323 | + if ( ! empty( $message ) ) { |
|
| 324 | + echo '<div class="error"><p>'. $message.'</p></div>'; |
|
| 325 | + return; |
|
| 326 | + } |
|
| 327 | 327 | } |
| 328 | 328 | |
| 329 | 329 | // 4. Notices for PHP/WP version deprecations |
| 330 | 330 | if ( current_user_can( 'update_core' ) ) { |
| 331 | - global $wp_version; |
|
| 332 | - |
|
| 333 | - // PHP 5.2-5.5 |
|
| 334 | - if ( version_compare( phpversion(), '5.6', '<' ) ) { |
|
| 335 | - $url = monsterinsights_get_url( 'global-notice', 'settings-page', 'https://www.monsterinsights.com/docs/update-php/' ); |
|
| 336 | - // Translators: Placeholders add the PHP version, a link to the MonsterInsights blog and a line break. |
|
| 337 | - $message = sprintf( esc_html__( 'Your site is running an outdated, insecure version of PHP (%1$s), which could be putting your site at risk for being hacked.%4$sWordPress stopped supporting your PHP version in April, 2019.%4$sUpdating PHP only takes a few minutes and will make your website significantly faster and more secure.%4$s%2$sLearn more about updating PHP%3$s', 'google-analytics-for-wordpress' ), phpversion(), '<a href="' . $url . '" target="_blank">', '</a>', '<br>' ); |
|
| 338 | - echo '<div class="error"><p>'. $message.'</p></div>'; |
|
| 339 | - return; |
|
| 340 | - } |
|
| 341 | - // WordPress 3.0 - 4.5 |
|
| 342 | - else if ( version_compare( $wp_version, '4.9', '<' ) ) { |
|
| 343 | - $url = monsterinsights_get_url( 'global-notice', 'settings-page', 'https://www.monsterinsights.com/docs/update-wordpress/' ); |
|
| 344 | - // Translators: Placeholders add the current WordPress version and links to the MonsterInsights blog |
|
| 345 | - $message = sprintf( esc_html__( 'Your site is running an outdated version of WordPress (%1$s).%4$sMonsterInsights will stop supporting WordPress versions lower than 4.9 in 2020.%4$sUpdating WordPress takes just a few minutes and will also solve many bugs that exist in your WordPress install.%4$s%2$sLearn more about updating WordPress%3$s', 'google-analytics-for-wordpress' ), $wp_version, '<a href="' . $url . '" target="_blank">', '</a>', '<br>' ); |
|
| 346 | - echo '<div class="error"><p>'. $message.'</p></div>'; |
|
| 347 | - return; |
|
| 348 | - } |
|
| 349 | - // PHP 5.4/5.5 |
|
| 350 | - // else if ( version_compare( phpversion(), '5.6', '<' ) ) { |
|
| 351 | - // $url = monsterinsights_get_url( 'global-notice', 'settings-page', 'https://www.monsterinsights.com/docs/update-php/' ); |
|
| 352 | - // $message = sprintf( esc_html__( 'Your site is running an outdated, insecure version of PHP (%1$s), which could be putting your site at risk for being hacked.%4$sWordPress will stop supporting your PHP version in April, 2019.%4$sUpdating PHP only takes a few minutes and will make your website significantly faster and more secure.%4$s%2$sLearn more about updating PHP%3$s', 'google-analytics-for-wordpress' ), phpversion(), '<a href="' . $url . '" target="_blank">', '</a>', '<br>' ); |
|
| 353 | - // echo '<div class="error"><p>'. $message.'</p></div>'; |
|
| 354 | - // return; |
|
| 355 | - // } |
|
| 356 | - // // WordPress 4.6 - 4.8 |
|
| 357 | - // else if ( version_compare( $wp_version, '4.9', '<' ) ) { |
|
| 358 | - // $url = monsterinsights_get_url( 'global-notice', 'settings-page', 'https://www.monsterinsights.com/docs/update-wordpress/' ); |
|
| 359 | - // $message = sprintf( esc_html__( 'Your site is running an outdated version of WordPress (%1$s).%4$sMonsterInsights will stop supporting WordPress versions lower than 4.9 in October, 2019.%4$sUpdating WordPress takes just a few minutes and will also solve many bugs that exist in your WordPress install.%4$s%2$sLearn more about updating WordPress%3$s', 'google-analytics-for-wordpress' ), $wp_version, '<a href="' . $url . '" target="_blank">', '</a>', '<br>' ); |
|
| 360 | - // echo '<div class="error"><p>'. $message.'</p></div>'; |
|
| 361 | - // return; |
|
| 362 | - // } |
|
| 331 | + global $wp_version; |
|
| 332 | + |
|
| 333 | + // PHP 5.2-5.5 |
|
| 334 | + if ( version_compare( phpversion(), '5.6', '<' ) ) { |
|
| 335 | + $url = monsterinsights_get_url( 'global-notice', 'settings-page', 'https://www.monsterinsights.com/docs/update-php/' ); |
|
| 336 | + // Translators: Placeholders add the PHP version, a link to the MonsterInsights blog and a line break. |
|
| 337 | + $message = sprintf( esc_html__( 'Your site is running an outdated, insecure version of PHP (%1$s), which could be putting your site at risk for being hacked.%4$sWordPress stopped supporting your PHP version in April, 2019.%4$sUpdating PHP only takes a few minutes and will make your website significantly faster and more secure.%4$s%2$sLearn more about updating PHP%3$s', 'google-analytics-for-wordpress' ), phpversion(), '<a href="' . $url . '" target="_blank">', '</a>', '<br>' ); |
|
| 338 | + echo '<div class="error"><p>'. $message.'</p></div>'; |
|
| 339 | + return; |
|
| 340 | + } |
|
| 341 | + // WordPress 3.0 - 4.5 |
|
| 342 | + else if ( version_compare( $wp_version, '4.9', '<' ) ) { |
|
| 343 | + $url = monsterinsights_get_url( 'global-notice', 'settings-page', 'https://www.monsterinsights.com/docs/update-wordpress/' ); |
|
| 344 | + // Translators: Placeholders add the current WordPress version and links to the MonsterInsights blog |
|
| 345 | + $message = sprintf( esc_html__( 'Your site is running an outdated version of WordPress (%1$s).%4$sMonsterInsights will stop supporting WordPress versions lower than 4.9 in 2020.%4$sUpdating WordPress takes just a few minutes and will also solve many bugs that exist in your WordPress install.%4$s%2$sLearn more about updating WordPress%3$s', 'google-analytics-for-wordpress' ), $wp_version, '<a href="' . $url . '" target="_blank">', '</a>', '<br>' ); |
|
| 346 | + echo '<div class="error"><p>'. $message.'</p></div>'; |
|
| 347 | + return; |
|
| 348 | + } |
|
| 349 | + // PHP 5.4/5.5 |
|
| 350 | + // else if ( version_compare( phpversion(), '5.6', '<' ) ) { |
|
| 351 | + // $url = monsterinsights_get_url( 'global-notice', 'settings-page', 'https://www.monsterinsights.com/docs/update-php/' ); |
|
| 352 | + // $message = sprintf( esc_html__( 'Your site is running an outdated, insecure version of PHP (%1$s), which could be putting your site at risk for being hacked.%4$sWordPress will stop supporting your PHP version in April, 2019.%4$sUpdating PHP only takes a few minutes and will make your website significantly faster and more secure.%4$s%2$sLearn more about updating PHP%3$s', 'google-analytics-for-wordpress' ), phpversion(), '<a href="' . $url . '" target="_blank">', '</a>', '<br>' ); |
|
| 353 | + // echo '<div class="error"><p>'. $message.'</p></div>'; |
|
| 354 | + // return; |
|
| 355 | + // } |
|
| 356 | + // // WordPress 4.6 - 4.8 |
|
| 357 | + // else if ( version_compare( $wp_version, '4.9', '<' ) ) { |
|
| 358 | + // $url = monsterinsights_get_url( 'global-notice', 'settings-page', 'https://www.monsterinsights.com/docs/update-wordpress/' ); |
|
| 359 | + // $message = sprintf( esc_html__( 'Your site is running an outdated version of WordPress (%1$s).%4$sMonsterInsights will stop supporting WordPress versions lower than 4.9 in October, 2019.%4$sUpdating WordPress takes just a few minutes and will also solve many bugs that exist in your WordPress install.%4$s%2$sLearn more about updating WordPress%3$s', 'google-analytics-for-wordpress' ), $wp_version, '<a href="' . $url . '" target="_blank">', '</a>', '<br>' ); |
|
| 360 | + // echo '<div class="error"><p>'. $message.'</p></div>'; |
|
| 361 | + // return; |
|
| 362 | + // } |
|
| 363 | 363 | } |
| 364 | 364 | |
| 365 | 365 | // 5. Optin setting not configured |
@@ -389,7 +389,7 @@ discard block |
||
| 389 | 389 | |
| 390 | 390 | $notices = get_option( 'monsterinsights_notices' ); |
| 391 | 391 | if ( ! is_array( $notices ) ) { |
| 392 | - $notices = array(); |
|
| 392 | + $notices = array(); |
|
| 393 | 393 | } |
| 394 | 394 | |
| 395 | 395 | // 6. Authenticate, not manual |
@@ -433,74 +433,74 @@ discard block |
||
| 433 | 433 | |
| 434 | 434 | // 8. WooUpsell |
| 435 | 435 | if ( ! monsterinsights_is_pro_version() && class_exists( 'WooCommerce' ) ) { |
| 436 | - if ( ! isset( $notices['monsterinsights_woocommerce_tracking_available' ] ) ) { |
|
| 437 | - echo '<div class="notice notice-success is-dismissible monsterinsights-notice monsterinsights-wooedd-upsell-row" data-notice="monsterinsights_woocommerce_tracking_available">'; |
|
| 438 | - echo '<div class="monsterinsights-wooedd-upsell-left">'; |
|
| 439 | - echo '<p><strong>'; |
|
| 440 | - echo esc_html( 'Enhanced Ecommerce Analytics for Your WooCommerce Store', 'google-analytics-for-wordpress' ); |
|
| 441 | - echo '</strong></p>'; |
|
| 442 | - echo '<img class="monsterinsights-wooedd-upsell-image monsterinsights-wooedd-upsell-image-small" src="' . trailingslashit( MONSTERINSIGHTS_PLUGIN_URL ) . 'assets/images/upsell/woo-edd-upsell.png">'; |
|
| 443 | - echo '<p>'; |
|
| 444 | - echo esc_html( 'MonsterInsights Pro gives you detailed stats and insights about your customers.', 'google-analytics-for-wordpress' ); |
|
| 445 | - echo '</p>'; |
|
| 446 | - echo '<p>'; |
|
| 447 | - echo esc_html( 'This helps you make data-driven decisions about your content, and marketing strategy so you can increase your website traffic, leads, and sales.', 'google-analytics-for-wordpress' ); |
|
| 448 | - echo '</p>'; |
|
| 449 | - echo '<p>'; |
|
| 450 | - echo esc_html( 'Pro customers also get Form Tracking, Custom Dimensions Tracking, UserID Tracking and much more.', 'google-analytics-for-wordpress' ); |
|
| 451 | - echo '</p>'; |
|
| 452 | - echo '<p>'; |
|
| 453 | - echo esc_html( 'Start making data-driven decisions to grow your business.', 'google-analytics-for-wordpress' ); |
|
| 454 | - echo '</p>'; |
|
| 455 | - // Translators: Placeholders add a link to the MonsterInsights website. |
|
| 456 | - echo sprintf( esc_html__( '%1$sGet MonsterInsights Pro%2$s', 'google-analytics-for-wordpress' ), '<a class="button button-primary button-hero" href="'. monsterinsights_get_upgrade_link( 'admin-notices', 'woocommerce-upgrade' ) .'">', ' »</a>' ); |
|
| 457 | - echo '</p>'; |
|
| 458 | - echo '</div><div class="monsterinsights-wooedd-upsell-right">'; |
|
| 459 | - echo '<img class="monsterinsights-wooedd-upsell-image monsterinsights-wooedd-upsell-image-large" src="' . trailingslashit( MONSTERINSIGHTS_PLUGIN_URL ) . 'assets/images/upsell/woo-edd-upsell.png">'; |
|
| 460 | - echo '</div>'; |
|
| 461 | - echo '</div>'; |
|
| 462 | - return; |
|
| 463 | - } |
|
| 436 | + if ( ! isset( $notices['monsterinsights_woocommerce_tracking_available' ] ) ) { |
|
| 437 | + echo '<div class="notice notice-success is-dismissible monsterinsights-notice monsterinsights-wooedd-upsell-row" data-notice="monsterinsights_woocommerce_tracking_available">'; |
|
| 438 | + echo '<div class="monsterinsights-wooedd-upsell-left">'; |
|
| 439 | + echo '<p><strong>'; |
|
| 440 | + echo esc_html( 'Enhanced Ecommerce Analytics for Your WooCommerce Store', 'google-analytics-for-wordpress' ); |
|
| 441 | + echo '</strong></p>'; |
|
| 442 | + echo '<img class="monsterinsights-wooedd-upsell-image monsterinsights-wooedd-upsell-image-small" src="' . trailingslashit( MONSTERINSIGHTS_PLUGIN_URL ) . 'assets/images/upsell/woo-edd-upsell.png">'; |
|
| 443 | + echo '<p>'; |
|
| 444 | + echo esc_html( 'MonsterInsights Pro gives you detailed stats and insights about your customers.', 'google-analytics-for-wordpress' ); |
|
| 445 | + echo '</p>'; |
|
| 446 | + echo '<p>'; |
|
| 447 | + echo esc_html( 'This helps you make data-driven decisions about your content, and marketing strategy so you can increase your website traffic, leads, and sales.', 'google-analytics-for-wordpress' ); |
|
| 448 | + echo '</p>'; |
|
| 449 | + echo '<p>'; |
|
| 450 | + echo esc_html( 'Pro customers also get Form Tracking, Custom Dimensions Tracking, UserID Tracking and much more.', 'google-analytics-for-wordpress' ); |
|
| 451 | + echo '</p>'; |
|
| 452 | + echo '<p>'; |
|
| 453 | + echo esc_html( 'Start making data-driven decisions to grow your business.', 'google-analytics-for-wordpress' ); |
|
| 454 | + echo '</p>'; |
|
| 455 | + // Translators: Placeholders add a link to the MonsterInsights website. |
|
| 456 | + echo sprintf( esc_html__( '%1$sGet MonsterInsights Pro%2$s', 'google-analytics-for-wordpress' ), '<a class="button button-primary button-hero" href="'. monsterinsights_get_upgrade_link( 'admin-notices', 'woocommerce-upgrade' ) .'">', ' »</a>' ); |
|
| 457 | + echo '</p>'; |
|
| 458 | + echo '</div><div class="monsterinsights-wooedd-upsell-right">'; |
|
| 459 | + echo '<img class="monsterinsights-wooedd-upsell-image monsterinsights-wooedd-upsell-image-large" src="' . trailingslashit( MONSTERINSIGHTS_PLUGIN_URL ) . 'assets/images/upsell/woo-edd-upsell.png">'; |
|
| 460 | + echo '</div>'; |
|
| 461 | + echo '</div>'; |
|
| 462 | + return; |
|
| 463 | + } |
|
| 464 | 464 | } |
| 465 | 465 | |
| 466 | 466 | // 9. EDDUpsell |
| 467 | 467 | if ( ! monsterinsights_is_pro_version() && class_exists( 'Easy_Digital_Downloads' ) ) { |
| 468 | - if ( ! isset( $notices['monsterinsights_edd_tracking_available' ] ) ) { |
|
| 469 | - echo '<div class="notice notice-success is-dismissible monsterinsights-notice monsterinsights-wooedd-upsell-row" data-notice="monsterinsights_edd_tracking_available">'; |
|
| 470 | - echo '<div class="monsterinsights-wooedd-upsell-left">'; |
|
| 471 | - echo '<p><strong>'; |
|
| 472 | - echo esc_html( 'Enhanced Ecommerce Analytics for Your Easy Digital Downloads Store', 'google-analytics-for-wordpress' ); |
|
| 473 | - echo '</strong></p>'; |
|
| 474 | - echo '<img class="monsterinsights-wooedd-upsell-image monsterinsights-wooedd-upsell-image-small" src="' . trailingslashit( MONSTERINSIGHTS_PLUGIN_URL ) . 'assets/images/upsell/woo-edd-upsell.png">'; |
|
| 475 | - echo '<p>'; |
|
| 476 | - echo esc_html( 'MonsterInsights Pro gives you detailed stats and insights about your customers.', 'google-analytics-for-wordpress' ); |
|
| 477 | - echo '</p>'; |
|
| 478 | - echo '<p>'; |
|
| 479 | - echo esc_html( 'This helps you make data-driven decisions about your content, and marketing strategy so you can increase your website traffic, leads, and sales.', 'google-analytics-for-wordpress' ); |
|
| 480 | - echo '</p>'; |
|
| 481 | - echo '<p>'; |
|
| 482 | - echo esc_html( 'Pro customers also get Form Tracking, Custom Dimensions Tracking, UserID Tracking and much more.', 'google-analytics-for-wordpress' ); |
|
| 483 | - echo '</p>'; |
|
| 484 | - echo '<p>'; |
|
| 485 | - echo esc_html( 'Start making data-driven decisions to grow your business.', 'google-analytics-for-wordpress' ); |
|
| 486 | - echo '</p>'; |
|
| 487 | - echo sprintf( esc_html__( '%1$sGet MonsterInsights Pro%2$s', 'google-analytics-for-wordpress' ), '<a class="button button-primary button-hero" href="'. monsterinsights_get_upgrade_link( 'admin-notices', 'edd-upgrade' ) .'">', ' »</a>' ); |
|
| 488 | - echo '</p>'; |
|
| 489 | - echo '</div><div class="monsterinsights-wooedd-upsell-right">'; |
|
| 490 | - echo '<img class="monsterinsights-wooedd-upsell-image monsterinsights-wooedd-upsell-image-large" src="' . trailingslashit( MONSTERINSIGHTS_PLUGIN_URL ) . 'assets/images/upsell/woo-edd-upsell.png">'; |
|
| 491 | - echo '</div>'; |
|
| 492 | - echo '</div>'; |
|
| 493 | - return; |
|
| 494 | - } |
|
| 468 | + if ( ! isset( $notices['monsterinsights_edd_tracking_available' ] ) ) { |
|
| 469 | + echo '<div class="notice notice-success is-dismissible monsterinsights-notice monsterinsights-wooedd-upsell-row" data-notice="monsterinsights_edd_tracking_available">'; |
|
| 470 | + echo '<div class="monsterinsights-wooedd-upsell-left">'; |
|
| 471 | + echo '<p><strong>'; |
|
| 472 | + echo esc_html( 'Enhanced Ecommerce Analytics for Your Easy Digital Downloads Store', 'google-analytics-for-wordpress' ); |
|
| 473 | + echo '</strong></p>'; |
|
| 474 | + echo '<img class="monsterinsights-wooedd-upsell-image monsterinsights-wooedd-upsell-image-small" src="' . trailingslashit( MONSTERINSIGHTS_PLUGIN_URL ) . 'assets/images/upsell/woo-edd-upsell.png">'; |
|
| 475 | + echo '<p>'; |
|
| 476 | + echo esc_html( 'MonsterInsights Pro gives you detailed stats and insights about your customers.', 'google-analytics-for-wordpress' ); |
|
| 477 | + echo '</p>'; |
|
| 478 | + echo '<p>'; |
|
| 479 | + echo esc_html( 'This helps you make data-driven decisions about your content, and marketing strategy so you can increase your website traffic, leads, and sales.', 'google-analytics-for-wordpress' ); |
|
| 480 | + echo '</p>'; |
|
| 481 | + echo '<p>'; |
|
| 482 | + echo esc_html( 'Pro customers also get Form Tracking, Custom Dimensions Tracking, UserID Tracking and much more.', 'google-analytics-for-wordpress' ); |
|
| 483 | + echo '</p>'; |
|
| 484 | + echo '<p>'; |
|
| 485 | + echo esc_html( 'Start making data-driven decisions to grow your business.', 'google-analytics-for-wordpress' ); |
|
| 486 | + echo '</p>'; |
|
| 487 | + echo sprintf( esc_html__( '%1$sGet MonsterInsights Pro%2$s', 'google-analytics-for-wordpress' ), '<a class="button button-primary button-hero" href="'. monsterinsights_get_upgrade_link( 'admin-notices', 'edd-upgrade' ) .'">', ' »</a>' ); |
|
| 488 | + echo '</p>'; |
|
| 489 | + echo '</div><div class="monsterinsights-wooedd-upsell-right">'; |
|
| 490 | + echo '<img class="monsterinsights-wooedd-upsell-image monsterinsights-wooedd-upsell-image-large" src="' . trailingslashit( MONSTERINSIGHTS_PLUGIN_URL ) . 'assets/images/upsell/woo-edd-upsell.png">'; |
|
| 491 | + echo '</div>'; |
|
| 492 | + echo '</div>'; |
|
| 493 | + return; |
|
| 494 | + } |
|
| 495 | 495 | } |
| 496 | 496 | |
| 497 | 497 | if ( isset( $notices['monsterinsights_cross_domains_extracted'] ) && false === $notices['monsterinsights_cross_domains_extracted'] ) { |
| 498 | - $page = is_network_admin() ? network_admin_url( 'admin.php?page=monsterinsights_network' ) : admin_url( 'admin.php?page=monsterinsights_settings' ); |
|
| 499 | - $page = $page . '#/advanced'; |
|
| 500 | - // Translators: Adds a link to the settings panel. |
|
| 501 | - $message = sprintf( esc_html__( 'Warning: MonsterInsights found cross-domain settings in the custom code field and converted them to the new settings structure. %1$sPlease click here to review and remove the code no longer needed.%2$s', 'google-analytics-for-wordpress' ), '<a href="'. esc_url( $page ) . '">', '</a>' ); |
|
| 502 | - echo '<div class="notice notice-success is-dismissible monsterinsights-notice" data-notice="monsterinsights_cross_domains_extracted"><p>'. $message.'</p></div>'; |
|
| 503 | - return; |
|
| 498 | + $page = is_network_admin() ? network_admin_url( 'admin.php?page=monsterinsights_network' ) : admin_url( 'admin.php?page=monsterinsights_settings' ); |
|
| 499 | + $page = $page . '#/advanced'; |
|
| 500 | + // Translators: Adds a link to the settings panel. |
|
| 501 | + $message = sprintf( esc_html__( 'Warning: MonsterInsights found cross-domain settings in the custom code field and converted them to the new settings structure. %1$sPlease click here to review and remove the code no longer needed.%2$s', 'google-analytics-for-wordpress' ), '<a href="'. esc_url( $page ) . '">', '</a>' ); |
|
| 502 | + echo '<div class="notice notice-success is-dismissible monsterinsights-notice" data-notice="monsterinsights_cross_domains_extracted"><p>'. $message.'</p></div>'; |
|
| 503 | + return; |
|
| 504 | 504 | } |
| 505 | 505 | } |
| 506 | 506 | add_action( 'admin_notices', 'monsterinsights_admin_setup_notices' ); |
@@ -510,7 +510,7 @@ discard block |
||
| 510 | 510 | // AM Notices |
| 511 | 511 | function monsterinsights_am_notice_optout( $super_admin ) { |
| 512 | 512 | if ( monsterinsights_get_option( 'hide_am_notices', false ) || monsterinsights_get_option( 'network_hide_am_notices', false ) ) { |
| 513 | - return false; |
|
| 513 | + return false; |
|
| 514 | 514 | } |
| 515 | 515 | return $super_admin; |
| 516 | 516 | } |
@@ -28,13 +28,13 @@ discard block |
||
| 28 | 28 | |
| 29 | 29 | if ( $hook === 'monsterinsights_settings' ) { |
| 30 | 30 | // If dashboards disabled, first settings page |
| 31 | - add_menu_page( __( 'MonsterInsights', 'google-analytics-for-wordpress' ), __( 'Insights', 'google-analytics-for-wordpress' ) . MonsterInsights()->notifications->get_menu_count(), 'monsterinsights_save_settings', 'monsterinsights_settings', 'monsterinsights_settings_page', $menu_icon_inline, '100.00013467543' ); |
|
| 31 | + add_menu_page( __( 'MonsterInsights', 'google-analytics-for-wordpress' ), __( 'Insights', 'google-analytics-for-wordpress' ) . MonsterInsights()->notifications->get_menu_count(), 'monsterinsights_save_settings', 'monsterinsights_settings', 'monsterinsights_settings_page', $menu_icon_inline, '100.00013467543' ); |
|
| 32 | 32 | $hook = 'monsterinsights_settings'; |
| 33 | 33 | |
| 34 | 34 | add_submenu_page( $hook, __( 'MonsterInsights', 'google-analytics-for-wordpress' ), __( 'Settings', 'google-analytics-for-wordpress' ), 'monsterinsights_save_settings', 'monsterinsights_settings' ); |
| 35 | 35 | } else { |
| 36 | 36 | // if dashboards enabled, first dashboard |
| 37 | - add_menu_page( __( 'General:', 'google-analytics-for-wordpress' ), __( 'Insights', 'google-analytics-for-wordpress' ) . MonsterInsights()->notifications->get_menu_count(), 'monsterinsights_view_dashboard', 'monsterinsights_reports', 'monsterinsights_reports_page', $menu_icon_inline, '100.00013467543' ); |
|
| 37 | + add_menu_page( __( 'General:', 'google-analytics-for-wordpress' ), __( 'Insights', 'google-analytics-for-wordpress' ) . MonsterInsights()->notifications->get_menu_count(), 'monsterinsights_view_dashboard', 'monsterinsights_reports', 'monsterinsights_reports_page', $menu_icon_inline, '100.00013467543' ); |
|
| 38 | 38 | |
| 39 | 39 | add_submenu_page( $hook, __( 'General Reports:', 'google-analytics-for-wordpress' ), __( 'Reports', 'google-analytics-for-wordpress' ), 'monsterinsights_view_dashboard', 'monsterinsights_reports', 'monsterinsights_reports_page' ); |
| 40 | 40 | |
@@ -88,7 +88,7 @@ discard block |
||
| 88 | 88 | $menu_icon_inline = monsterinsights_get_inline_menu_icon(); |
| 89 | 89 | $hook = 'monsterinsights_network'; |
| 90 | 90 | $submenu_base = add_query_arg( 'page', 'monsterinsights_network', network_admin_url( 'admin.php' ) ); |
| 91 | - add_menu_page( __( 'Network Settings:', 'google-analytics-for-wordpress' ), __( 'Insights', 'google-analytics-for-wordpress' ) . MonsterInsights()->notifications->get_menu_count(), 'monsterinsights_save_settings', 'monsterinsights_network', 'monsterinsights_network_page', $menu_icon_inline, '100.00013467543' ); |
|
| 91 | + add_menu_page( __( 'Network Settings:', 'google-analytics-for-wordpress' ), __( 'Insights', 'google-analytics-for-wordpress' ) . MonsterInsights()->notifications->get_menu_count(), 'monsterinsights_save_settings', 'monsterinsights_network', 'monsterinsights_network_page', $menu_icon_inline, '100.00013467543' ); |
|
| 92 | 92 | |
| 93 | 93 | add_submenu_page( $hook, __( 'Network Settings:', 'google-analytics-for-wordpress' ), __( 'Network Settings', 'google-analytics-for-wordpress' ), 'monsterinsights_save_settings', 'monsterinsights_network', 'monsterinsights_network_page' ); |
| 94 | 94 | |
@@ -129,7 +129,7 @@ discard block |
||
| 129 | 129 | function monsterinsights_add_admin_body_class_tools_page( $classes ) { |
| 130 | 130 | $screen = function_exists( 'get_current_screen' ) ? get_current_screen() : false; |
| 131 | 131 | |
| 132 | - if ( empty( $screen ) || empty( $screen->id ) || strpos( $screen->id, 'monsterinsights_tools' ) === false || 'insights_page_monsterinsights_tools' === $screen->id ) { |
|
| 132 | + if ( empty( $screen ) || empty( $screen->id ) || strpos( $screen->id, 'monsterinsights_tools' ) === false || 'insights_page_monsterinsights_tools' === $screen->id ) { |
|
| 133 | 133 | return $classes; |
| 134 | 134 | } |
| 135 | 135 | |
@@ -145,7 +145,7 @@ discard block |
||
| 145 | 145 | */ |
| 146 | 146 | function monsterinsights_add_admin_body_class_addons_page( $classes ) { |
| 147 | 147 | $screen = function_exists( 'get_current_screen' ) ? get_current_screen() : false; |
| 148 | - if ( empty( $screen ) || empty( $screen->id ) || strpos( $screen->id, 'monsterinsights_addons' ) === false || 'insights_page_monsterinsights_addons' === $screen->id ) { |
|
| 148 | + if ( empty( $screen ) || empty( $screen->id ) || strpos( $screen->id, 'monsterinsights_addons' ) === false || 'insights_page_monsterinsights_addons' === $screen->id ) { |
|
| 149 | 149 | return $classes; |
| 150 | 150 | } |
| 151 | 151 | |
@@ -161,21 +161,21 @@ discard block |
||
| 161 | 161 | * @return array $links |
| 162 | 162 | */ |
| 163 | 163 | function monsterinsights_add_action_links( $links ) { |
| 164 | - $docs = '<a title="' . esc_html__( 'MonsterInsights Knowledge Base', 'google-analytics-for-wordpress' ) . '" href="'. monsterinsights_get_url( 'all-plugins', 'kb-link', "https://www.monsterinsights.com/docs/" ) .'">' . esc_html__( 'Documentation', 'google-analytics-for-wordpress' ) . '</a>'; |
|
| 164 | + $docs = '<a title="' . esc_html__( 'MonsterInsights Knowledge Base', 'google-analytics-for-wordpress' ) . '" href="' . monsterinsights_get_url( 'all-plugins', 'kb-link', "https://www.monsterinsights.com/docs/" ) . '">' . esc_html__( 'Documentation', 'google-analytics-for-wordpress' ) . '</a>'; |
|
| 165 | 165 | array_unshift( $links, $docs ); |
| 166 | 166 | |
| 167 | 167 | // If lite, show a link where they can get pro from |
| 168 | 168 | if ( ! monsterinsights_is_pro_version() ) { |
| 169 | - $get_pro = '<a title="' . esc_html__( 'Get MonsterInsights Pro', 'google-analytics-for-wordpress' ) .'" href="'. monsterinsights_get_upgrade_link( 'all-plugins', 'upgrade-link', "https://www.monsterinsights.com/docs/" ) .'">' . esc_html__( 'Get MonsterInsights Pro', 'google-analytics-for-wordpress' ) . '</a>'; |
|
| 169 | + $get_pro = '<a title="' . esc_html__( 'Get MonsterInsights Pro', 'google-analytics-for-wordpress' ) . '" href="' . monsterinsights_get_upgrade_link( 'all-plugins', 'upgrade-link', "https://www.monsterinsights.com/docs/" ) . '">' . esc_html__( 'Get MonsterInsights Pro', 'google-analytics-for-wordpress' ) . '</a>'; |
|
| 170 | 170 | array_unshift( $links, $get_pro ); |
| 171 | 171 | } |
| 172 | 172 | |
| 173 | 173 | // If Lite, support goes to forum. If pro, it goes to our website |
| 174 | 174 | if ( monsterinsights_is_pro_version() ) { |
| 175 | - $support = '<a title="MonsterInsights Pro Support" href="'. monsterinsights_get_url( 'all-plugins', 'pro-support-link', "https://www.monsterinsights.com/my-account/support/" ) .'">' . esc_html__( 'Support', 'google-analytics-for-wordpress' ) . '</a>'; |
|
| 175 | + $support = '<a title="MonsterInsights Pro Support" href="' . monsterinsights_get_url( 'all-plugins', 'pro-support-link', "https://www.monsterinsights.com/my-account/support/" ) . '">' . esc_html__( 'Support', 'google-analytics-for-wordpress' ) . '</a>'; |
|
| 176 | 176 | array_unshift( $links, $support ); |
| 177 | 177 | } else { |
| 178 | - $support = '<a title="MonsterInsights Lite Support" href="'. monsterinsights_get_url( 'all-plugins', 'lite-support-link', "https://www.monsterinsights.com/lite-support/" ) .'">' . esc_html__( 'Support', 'google-analytics-for-wordpress' ) . '</a>'; |
|
| 178 | + $support = '<a title="MonsterInsights Lite Support" href="' . monsterinsights_get_url( 'all-plugins', 'lite-support-link', "https://www.monsterinsights.com/lite-support/" ) . '">' . esc_html__( 'Support', 'google-analytics-for-wordpress' ) . '</a>'; |
|
| 179 | 179 | array_unshift( $links, $support ); |
| 180 | 180 | } |
| 181 | 181 | |
@@ -208,14 +208,14 @@ discard block |
||
| 208 | 208 | $dir = trailingslashit( plugin_dir_path( MonsterInsights()->file ) . 'pro/includes/admin/partials' ); |
| 209 | 209 | |
| 210 | 210 | if ( file_exists( $dir . $template . '.php' ) ) { |
| 211 | - require_once( $dir . $template . '.php' ); |
|
| 211 | + require_once( $dir . $template . '.php' ); |
|
| 212 | 212 | return true; |
| 213 | 213 | } |
| 214 | 214 | } else { |
| 215 | 215 | $dir = trailingslashit( plugin_dir_path( MonsterInsights()->file ) . 'lite/includes/admin/partials' ); |
| 216 | 216 | |
| 217 | 217 | if ( file_exists( $dir . $template . '.php' ) ) { |
| 218 | - require_once( $dir . $template . '.php' ); |
|
| 218 | + require_once( $dir . $template . '.php' ); |
|
| 219 | 219 | return true; |
| 220 | 220 | } |
| 221 | 221 | } |
@@ -223,7 +223,7 @@ discard block |
||
| 223 | 223 | $dir = trailingslashit( plugin_dir_path( MonsterInsights()->file ) . 'includes/admin/partials' ); |
| 224 | 224 | |
| 225 | 225 | if ( file_exists( $dir . $template . '.php' ) ) { |
| 226 | - require_once( $dir . $template . '.php' ); |
|
| 226 | + require_once( $dir . $template . '.php' ); |
|
| 227 | 227 | return true; |
| 228 | 228 | } |
| 229 | 229 | |
@@ -243,7 +243,7 @@ discard block |
||
| 243 | 243 | if ( ! empty( $current_screen->id ) && strpos( $current_screen->id, 'monsterinsights' ) !== false ) { |
| 244 | 244 | $url = 'https://wordpress.org/support/view/plugin-reviews/google-analytics-for-wordpress?filter=5'; |
| 245 | 245 | // Translators: Placeholders add a link to the wordpress.org repository. |
| 246 | - $text = sprintf( esc_html__( 'Please rate %1$sMonsterInsights%2$s on %3$s %4$sWordPress.org%5$s to help us spread the word. Thank you from the MonsterInsights team!', 'google-analytics-for-wordpress' ), '<strong>', '</strong>', '<a class="monsterinsights-no-text-decoration" href="' . $url . '" target="_blank" rel="noopener noreferrer"><i class="monstericon-star"></i><i class="monstericon-star"></i><i class="monstericon-star"></i><i class="monstericon-star"></i><i class="monstericon-star"></i></a>', '<a href="' . $url . '" target="_blank" rel="noopener noreferrer">', '</a>' ); |
|
| 246 | + $text = sprintf( esc_html__( 'Please rate %1$sMonsterInsights%2$s on %3$s %4$sWordPress.org%5$s to help us spread the word. Thank you from the MonsterInsights team!', 'google-analytics-for-wordpress' ), '<strong>', '</strong>', '<a class="monsterinsights-no-text-decoration" href="' . $url . '" target="_blank" rel="noopener noreferrer"><i class="monstericon-star"></i><i class="monstericon-star"></i><i class="monstericon-star"></i><i class="monstericon-star"></i><i class="monstericon-star"></i></a>', '<a href="' . $url . '" target="_blank" rel="noopener noreferrer">', '</a>' ); |
|
| 247 | 247 | } |
| 248 | 248 | return $text; |
| 249 | 249 | } |
@@ -284,7 +284,7 @@ discard block |
||
| 284 | 284 | $secondary = esc_html__( 'Learn More', 'google-analytics-for-wordpress' ); |
| 285 | 285 | $urltwo = $submenu_base . '#/about/getting-started'; |
| 286 | 286 | $message = esc_html__( 'MonsterInsights, WordPress analytics plugin, helps you connect your website with Google Analytics, so you can see how people find and use your website. Over 2 million website owners use MonsterInsights to see the stats that matter and grow their business.', 'google-analytics-for-wordpress' ); |
| 287 | - echo '<div class="notice notice-info"><p style="font-weight:700">'. $title .'</p><p>'. $message.'</p><p><a href="'. $urlone .'" class="button-primary">'. $primary .'</a> <a href="'. $urltwo .'" class="button-secondary">'. $secondary .'</a></p></div>'; |
|
| 287 | + echo '<div class="notice notice-info"><p style="font-weight:700">' . $title . '</p><p>' . $message . '</p><p><a href="' . $urlone . '" class="button-primary">' . $primary . '</a> <a href="' . $urltwo . '" class="button-secondary">' . $secondary . '</a></p></div>'; |
|
| 288 | 288 | return; |
| 289 | 289 | } |
| 290 | 290 | |
@@ -293,18 +293,18 @@ discard block |
||
| 293 | 293 | if ( monsterinsights_is_pro_version() && empty( $key ) ) { |
| 294 | 294 | $page = is_network_admin() ? network_admin_url( 'admin.php?page=monsterinsights_network' ) : admin_url( 'admin.php?page=monsterinsights_settings' ); |
| 295 | 295 | // Translators: Adds a link to retrieve the license. |
| 296 | - $message = sprintf( esc_html__( 'Warning: No valid license key has been entered for MonsterInsights. You are currently not getting updates, and are not able to view reports. %1$sPlease click here to enter your license key and begin receiving updates and reports.%2$s', 'google-analytics-for-wordpress' ), '<a href="'. esc_url( $page ) . '">', '</a>' ); |
|
| 297 | - echo '<div class="error"><p>'. $message.'</p></div>'; |
|
| 296 | + $message = sprintf( esc_html__( 'Warning: No valid license key has been entered for MonsterInsights. You are currently not getting updates, and are not able to view reports. %1$sPlease click here to enter your license key and begin receiving updates and reports.%2$s', 'google-analytics-for-wordpress' ), '<a href="' . esc_url( $page ) . '">', '</a>' ); |
|
| 297 | + echo '<div class="error"><p>' . $message . '</p></div>'; |
|
| 298 | 298 | return; |
| 299 | 299 | } |
| 300 | 300 | |
| 301 | 301 | // 3. License key not valid/okay for pro |
| 302 | 302 | if ( monsterinsights_is_pro_version() ) { |
| 303 | 303 | $message = ''; |
| 304 | - if ( MonsterInsights()->license->get_site_license_key() ){ |
|
| 304 | + if ( MonsterInsights()->license->get_site_license_key() ) { |
|
| 305 | 305 | if ( MonsterInsights()->license->site_license_expired() ) { |
| 306 | 306 | // Translators: Adds a link to the license renewal. |
| 307 | - $message = sprintf( esc_html__( 'Your license key for MonsterInsights has expired. %1$sPlease click here to renew your license key.%2$s', 'google-analytics-for-wordpress' ), '<a href="'. monsterinsights_get_url( 'admin-notices', 'expired-license', "https://www.monsterinsights.com/login/" ) .'" target="_blank" rel="noopener noreferrer" referrer="no-referrer">', '</a>' ); |
|
| 307 | + $message = sprintf( esc_html__( 'Your license key for MonsterInsights has expired. %1$sPlease click here to renew your license key.%2$s', 'google-analytics-for-wordpress' ), '<a href="' . monsterinsights_get_url( 'admin-notices', 'expired-license', "https://www.monsterinsights.com/login/" ) . '" target="_blank" rel="noopener noreferrer" referrer="no-referrer">', '</a>' ); |
|
| 308 | 308 | } else if ( MonsterInsights()->license->site_license_disabled() ) { |
| 309 | 309 | $message = esc_html__( 'Your license key for MonsterInsights has been disabled. Please use a different key.', 'google-analytics-for-wordpress' ); |
| 310 | 310 | } else if ( MonsterInsights()->license->site_license_invalid() ) { |
@@ -313,7 +313,7 @@ discard block |
||
| 313 | 313 | } else if ( MonsterInsights()->license->get_network_license_key() ) { |
| 314 | 314 | if ( MonsterInsights()->license->network_license_expired() ) { |
| 315 | 315 | // Translators: Adds a link to renew license. |
| 316 | - $message = sprintf( esc_html__( 'Your network license key for MonsterInsights has expired. %1$sPlease click here to renew your license key.%2$s', 'google-analytics-for-wordpress' ), '<a href="'. monsterinsights_get_url( 'admin-notices', 'expired-license', "https://www.monsterinsights.com/login/" ) .'" target="_blank" rel="noopener noreferrer" referrer="no-referrer">', '</a>' ); |
|
| 316 | + $message = sprintf( esc_html__( 'Your network license key for MonsterInsights has expired. %1$sPlease click here to renew your license key.%2$s', 'google-analytics-for-wordpress' ), '<a href="' . monsterinsights_get_url( 'admin-notices', 'expired-license', "https://www.monsterinsights.com/login/" ) . '" target="_blank" rel="noopener noreferrer" referrer="no-referrer">', '</a>' ); |
|
| 317 | 317 | } else if ( MonsterInsights()->license->network_license_disabled() ) { |
| 318 | 318 | $message = esc_html__( 'Your network license key for MonsterInsights has been disabled. Please use a different key.', 'google-analytics-for-wordpress' ); |
| 319 | 319 | } else if ( MonsterInsights()->license->network_license_invalid() ) { |
@@ -321,7 +321,7 @@ discard block |
||
| 321 | 321 | } |
| 322 | 322 | } |
| 323 | 323 | if ( ! empty( $message ) ) { |
| 324 | - echo '<div class="error"><p>'. $message.'</p></div>'; |
|
| 324 | + echo '<div class="error"><p>' . $message . '</p></div>'; |
|
| 325 | 325 | return; |
| 326 | 326 | } |
| 327 | 327 | } |
@@ -335,7 +335,7 @@ discard block |
||
| 335 | 335 | $url = monsterinsights_get_url( 'global-notice', 'settings-page', 'https://www.monsterinsights.com/docs/update-php/' ); |
| 336 | 336 | // Translators: Placeholders add the PHP version, a link to the MonsterInsights blog and a line break. |
| 337 | 337 | $message = sprintf( esc_html__( 'Your site is running an outdated, insecure version of PHP (%1$s), which could be putting your site at risk for being hacked.%4$sWordPress stopped supporting your PHP version in April, 2019.%4$sUpdating PHP only takes a few minutes and will make your website significantly faster and more secure.%4$s%2$sLearn more about updating PHP%3$s', 'google-analytics-for-wordpress' ), phpversion(), '<a href="' . $url . '" target="_blank">', '</a>', '<br>' ); |
| 338 | - echo '<div class="error"><p>'. $message.'</p></div>'; |
|
| 338 | + echo '<div class="error"><p>' . $message . '</p></div>'; |
|
| 339 | 339 | return; |
| 340 | 340 | } |
| 341 | 341 | // WordPress 3.0 - 4.5 |
@@ -343,7 +343,7 @@ discard block |
||
| 343 | 343 | $url = monsterinsights_get_url( 'global-notice', 'settings-page', 'https://www.monsterinsights.com/docs/update-wordpress/' ); |
| 344 | 344 | // Translators: Placeholders add the current WordPress version and links to the MonsterInsights blog |
| 345 | 345 | $message = sprintf( esc_html__( 'Your site is running an outdated version of WordPress (%1$s).%4$sMonsterInsights will stop supporting WordPress versions lower than 4.9 in 2020.%4$sUpdating WordPress takes just a few minutes and will also solve many bugs that exist in your WordPress install.%4$s%2$sLearn more about updating WordPress%3$s', 'google-analytics-for-wordpress' ), $wp_version, '<a href="' . $url . '" target="_blank">', '</a>', '<br>' ); |
| 346 | - echo '<div class="error"><p>'. $message.'</p></div>'; |
|
| 346 | + echo '<div class="error"><p>' . $message . '</p></div>'; |
|
| 347 | 347 | return; |
| 348 | 348 | } |
| 349 | 349 | // PHP 5.4/5.5 |
@@ -387,7 +387,7 @@ discard block |
||
| 387 | 387 | // } |
| 388 | 388 | // } |
| 389 | 389 | |
| 390 | - $notices = get_option( 'monsterinsights_notices' ); |
|
| 390 | + $notices = get_option( 'monsterinsights_notices' ); |
|
| 391 | 391 | if ( ! is_array( $notices ) ) { |
| 392 | 392 | $notices = array(); |
| 393 | 393 | } |
@@ -433,7 +433,7 @@ discard block |
||
| 433 | 433 | |
| 434 | 434 | // 8. WooUpsell |
| 435 | 435 | if ( ! monsterinsights_is_pro_version() && class_exists( 'WooCommerce' ) ) { |
| 436 | - if ( ! isset( $notices['monsterinsights_woocommerce_tracking_available' ] ) ) { |
|
| 436 | + if ( ! isset( $notices['monsterinsights_woocommerce_tracking_available'] ) ) { |
|
| 437 | 437 | echo '<div class="notice notice-success is-dismissible monsterinsights-notice monsterinsights-wooedd-upsell-row" data-notice="monsterinsights_woocommerce_tracking_available">'; |
| 438 | 438 | echo '<div class="monsterinsights-wooedd-upsell-left">'; |
| 439 | 439 | echo '<p><strong>'; |
@@ -453,7 +453,7 @@ discard block |
||
| 453 | 453 | echo esc_html( 'Start making data-driven decisions to grow your business.', 'google-analytics-for-wordpress' ); |
| 454 | 454 | echo '</p>'; |
| 455 | 455 | // Translators: Placeholders add a link to the MonsterInsights website. |
| 456 | - echo sprintf( esc_html__( '%1$sGet MonsterInsights Pro%2$s', 'google-analytics-for-wordpress' ), '<a class="button button-primary button-hero" href="'. monsterinsights_get_upgrade_link( 'admin-notices', 'woocommerce-upgrade' ) .'">', ' »</a>' ); |
|
| 456 | + echo sprintf( esc_html__( '%1$sGet MonsterInsights Pro%2$s', 'google-analytics-for-wordpress' ), '<a class="button button-primary button-hero" href="' . monsterinsights_get_upgrade_link( 'admin-notices', 'woocommerce-upgrade' ) . '">', ' »</a>' ); |
|
| 457 | 457 | echo '</p>'; |
| 458 | 458 | echo '</div><div class="monsterinsights-wooedd-upsell-right">'; |
| 459 | 459 | echo '<img class="monsterinsights-wooedd-upsell-image monsterinsights-wooedd-upsell-image-large" src="' . trailingslashit( MONSTERINSIGHTS_PLUGIN_URL ) . 'assets/images/upsell/woo-edd-upsell.png">'; |
@@ -465,7 +465,7 @@ discard block |
||
| 465 | 465 | |
| 466 | 466 | // 9. EDDUpsell |
| 467 | 467 | if ( ! monsterinsights_is_pro_version() && class_exists( 'Easy_Digital_Downloads' ) ) { |
| 468 | - if ( ! isset( $notices['monsterinsights_edd_tracking_available' ] ) ) { |
|
| 468 | + if ( ! isset( $notices['monsterinsights_edd_tracking_available'] ) ) { |
|
| 469 | 469 | echo '<div class="notice notice-success is-dismissible monsterinsights-notice monsterinsights-wooedd-upsell-row" data-notice="monsterinsights_edd_tracking_available">'; |
| 470 | 470 | echo '<div class="monsterinsights-wooedd-upsell-left">'; |
| 471 | 471 | echo '<p><strong>'; |
@@ -484,7 +484,7 @@ discard block |
||
| 484 | 484 | echo '<p>'; |
| 485 | 485 | echo esc_html( 'Start making data-driven decisions to grow your business.', 'google-analytics-for-wordpress' ); |
| 486 | 486 | echo '</p>'; |
| 487 | - echo sprintf( esc_html__( '%1$sGet MonsterInsights Pro%2$s', 'google-analytics-for-wordpress' ), '<a class="button button-primary button-hero" href="'. monsterinsights_get_upgrade_link( 'admin-notices', 'edd-upgrade' ) .'">', ' »</a>' ); |
|
| 487 | + echo sprintf( esc_html__( '%1$sGet MonsterInsights Pro%2$s', 'google-analytics-for-wordpress' ), '<a class="button button-primary button-hero" href="' . monsterinsights_get_upgrade_link( 'admin-notices', 'edd-upgrade' ) . '">', ' »</a>' ); |
|
| 488 | 488 | echo '</p>'; |
| 489 | 489 | echo '</div><div class="monsterinsights-wooedd-upsell-right">'; |
| 490 | 490 | echo '<img class="monsterinsights-wooedd-upsell-image monsterinsights-wooedd-upsell-image-large" src="' . trailingslashit( MONSTERINSIGHTS_PLUGIN_URL ) . 'assets/images/upsell/woo-edd-upsell.png">'; |
@@ -498,8 +498,8 @@ discard block |
||
| 498 | 498 | $page = is_network_admin() ? network_admin_url( 'admin.php?page=monsterinsights_network' ) : admin_url( 'admin.php?page=monsterinsights_settings' ); |
| 499 | 499 | $page = $page . '#/advanced'; |
| 500 | 500 | // Translators: Adds a link to the settings panel. |
| 501 | - $message = sprintf( esc_html__( 'Warning: MonsterInsights found cross-domain settings in the custom code field and converted them to the new settings structure. %1$sPlease click here to review and remove the code no longer needed.%2$s', 'google-analytics-for-wordpress' ), '<a href="'. esc_url( $page ) . '">', '</a>' ); |
|
| 502 | - echo '<div class="notice notice-success is-dismissible monsterinsights-notice" data-notice="monsterinsights_cross_domains_extracted"><p>'. $message.'</p></div>'; |
|
| 501 | + $message = sprintf( esc_html__( 'Warning: MonsterInsights found cross-domain settings in the custom code field and converted them to the new settings structure. %1$sPlease click here to review and remove the code no longer needed.%2$s', 'google-analytics-for-wordpress' ), '<a href="' . esc_url( $page ) . '">', '</a>' ); |
|
| 502 | + echo '<div class="notice notice-success is-dismissible monsterinsights-notice" data-notice="monsterinsights_cross_domains_extracted"><p>' . $message . '</p></div>'; |
|
| 503 | 503 | return; |
| 504 | 504 | } |
| 505 | 505 | } |