@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | return; |
65 | 65 | } |
66 | 66 | |
67 | - $site_license = array( |
|
67 | + $site_license = array( |
|
68 | 68 | 'key' => MonsterInsights()->license->get_site_license_key(), |
69 | 69 | 'type' => MonsterInsights()->license->get_site_license_type(), |
70 | 70 | 'is_disabled' => MonsterInsights()->license->site_license_disabled(), |
@@ -124,8 +124,8 @@ discard block |
||
124 | 124 | // Array fields are needed even if empty. |
125 | 125 | $array_fields = array( 'view_reports', 'save_settings', 'ignore_users' ); |
126 | 126 | foreach ( $array_fields as $array_field ) { |
127 | - if ( ! isset( $options[ $array_field ] ) ) { |
|
128 | - $options[ $array_field ] = array(); |
|
127 | + if ( ! isset( $options[$array_field] ) ) { |
|
128 | + $options[$array_field] = array(); |
|
129 | 129 | } |
130 | 130 | } |
131 | 131 | if ( isset( $options['custom_code'] ) ) { |
@@ -256,7 +256,7 @@ discard block |
||
256 | 256 | } |
257 | 257 | } |
258 | 258 | if ( $empty ) { |
259 | - unset( $value[ $key ] ); |
|
259 | + unset( $value[$key] ); |
|
260 | 260 | } |
261 | 261 | } |
262 | 262 | } |
@@ -306,7 +306,7 @@ discard block |
||
306 | 306 | } else { |
307 | 307 | $addon = $this->get_addon( $installed_plugins, $addons_type, $addon, $slug ); |
308 | 308 | } |
309 | - $parsed_addons[ $addon->slug ] = $addon; |
|
309 | + $parsed_addons[$addon->slug] = $addon; |
|
310 | 310 | } |
311 | 311 | } |
312 | 312 | |
@@ -384,7 +384,7 @@ discard block |
||
384 | 384 | 'slug' => 'pretty-link', |
385 | 385 | ); |
386 | 386 | // SeedProd. |
387 | - $parsed_addons['coming-soon'] = array( |
|
387 | + $parsed_addons['coming-soon'] = array( |
|
388 | 388 | 'active' => function_exists( 'seed_csp4_activation' ), |
389 | 389 | 'icon' => plugin_dir_url( MONSTERINSIGHTS_PLUGIN_FILE ) . 'assets/images/seedprod.png', |
390 | 390 | 'title' => 'SeedProd', |
@@ -393,7 +393,7 @@ discard block |
||
393 | 393 | 'basename' => 'coming-soon/coming-soon.php', |
394 | 394 | 'slug' => 'coming-soon', |
395 | 395 | ); |
396 | - $parsed_addons['rafflepress'] = array( |
|
396 | + $parsed_addons['rafflepress'] = array( |
|
397 | 397 | 'active' => function_exists( 'rafflepress_lite_activation' ), |
398 | 398 | 'icon' => plugin_dir_url( MONSTERINSIGHTS_PLUGIN_FILE ) . 'assets/images/rafflepress.png', |
399 | 399 | 'title' => 'RafflePress', |
@@ -434,7 +434,7 @@ discard block |
||
434 | 434 | $installed = false; |
435 | 435 | $plugin_basename = monsterinsights_get_plugin_basename_from_slug( $slug ); |
436 | 436 | |
437 | - if ( isset( $installed_plugins[ $plugin_basename ] ) ) { |
|
437 | + if ( isset( $installed_plugins[$plugin_basename] ) ) { |
|
438 | 438 | $installed = true; |
439 | 439 | |
440 | 440 | if ( is_multisite() && is_network_admin() ) { |
@@ -577,8 +577,8 @@ discard block |
||
577 | 577 | ); |
578 | 578 | |
579 | 579 | foreach ( $exclude as $e ) { |
580 | - if ( ! empty( $new_settings[ $e ] ) ) { |
|
581 | - unset( $new_settings[ $e ] ); |
|
580 | + if ( ! empty( $new_settings[$e] ) ) { |
|
581 | + unset( $new_settings[$e] ); |
|
582 | 582 | } |
583 | 583 | } |
584 | 584 | |
@@ -589,8 +589,8 @@ discard block |
||
589 | 589 | } |
590 | 590 | |
591 | 591 | foreach ( $exclude as $e ) { |
592 | - if ( ! empty( $settings[ $e ] ) ) { |
|
593 | - $new_settings = $settings[ $e ]; |
|
592 | + if ( ! empty( $settings[$e] ) ) { |
|
593 | + $new_settings = $settings[$e]; |
|
594 | 594 | } |
595 | 595 | } |
596 | 596 | |
@@ -750,7 +750,7 @@ discard block |
||
750 | 750 | ), |
751 | 751 | admin_url( 'admin.php' ) |
752 | 752 | ); |
753 | - $url = esc_url( $url ); |
|
753 | + $url = esc_url( $url ); |
|
754 | 754 | |
755 | 755 | ob_start(); |
756 | 756 | if ( false === ( $creds = request_filesystem_credentials( $url, $method, false, false, null ) ) ) { |
@@ -856,7 +856,7 @@ discard block |
||
856 | 856 | $homepage = get_option( 'page_on_front' ); |
857 | 857 | if ( ! $homepage ) { |
858 | 858 | $array[] = array( |
859 | - 'id' => - 1, |
|
859 | + 'id' => -1, |
|
860 | 860 | 'title' => __( 'Homepage', 'google-analytics-for-wordpress' ), |
861 | 861 | ); |
862 | 862 | } |
@@ -930,7 +930,7 @@ discard block |
||
930 | 930 | if ( ! post_type_supports( $post_type->name, 'editor' ) || 'product' === $post_type->name ) { |
931 | 931 | continue; |
932 | 932 | } |
933 | - $post_types_parsed[ $post_type->name ] = $post_type->labels->singular_name; |
|
933 | + $post_types_parsed[$post_type->name] = $post_type->labels->singular_name; |
|
934 | 934 | } |
935 | 935 | |
936 | 936 | $post_types_parsed = apply_filters( 'monsterinsights_vue_post_types_editor', $post_types_parsed ); |
@@ -1052,18 +1052,18 @@ discard block |
||
1052 | 1052 | $value = sanitize_text_field( wp_unslash( $_POST['value'] ) ); // Value of custom style like 12px or #fff. |
1053 | 1053 | $settings = get_option( $settings_key, array() ); |
1054 | 1054 | |
1055 | - if ( ! isset( $settings[ $type ] ) ) { |
|
1056 | - $settings[ $type ] = array(); |
|
1055 | + if ( ! isset( $settings[$type] ) ) { |
|
1056 | + $settings[$type] = array(); |
|
1057 | 1057 | } |
1058 | - if ( ! isset( $settings[ $type ][ $theme ] ) ) { |
|
1059 | - $settings[ $type ][ $theme ] = array(); |
|
1058 | + if ( ! isset( $settings[$type][$theme] ) ) { |
|
1059 | + $settings[$type][$theme] = array(); |
|
1060 | 1060 | } |
1061 | 1061 | |
1062 | - if ( ! isset( $settings[ $type ][ $theme ][ $object ] ) ) { |
|
1063 | - $settings[ $type ][ $theme ][ $object ] = array(); |
|
1062 | + if ( ! isset( $settings[$type][$theme][$object] ) ) { |
|
1063 | + $settings[$type][$theme][$object] = array(); |
|
1064 | 1064 | } |
1065 | 1065 | |
1066 | - $settings[ $type ][ $theme ][ $object ][ $key ] = $value; |
|
1066 | + $settings[$type][$theme][$object][$key] = $value; |
|
1067 | 1067 | |
1068 | 1068 | update_option( $settings_key, $settings ); |
1069 | 1069 |
@@ -23,10 +23,10 @@ |
||
23 | 23 | public function prepare_notification_data( $notification ) { |
24 | 24 | $notification['title'] = __( 'Headline Analyzer to Boost Your Clicks & Traffic', 'google-analytics-for-wordpress' ); |
25 | 25 | // Translators: Headline Analyzer notification content |
26 | - $notification['content'] = sprintf( __( 'Did you know that 36%% of SEO experts think the headline is the most important SEO element? Yet many website owners don’t know how to optimize their headlines for SEO and clicks. Instead, they write copy and hope for the best, only to see disappointing results. Now there’s an easier way! <br><br>%sWith the MonsterInsights Headline Analyzer%s, you can get targeted suggestions to improve your headlines, right in the WordPress editor.', 'google-analytics-for-wordpress' ), '<a href="'. $this->build_external_link('https://www.monsterinsights.com/announcing-monsterinsights-new-headline-analyzer/' ) .'" target="_blank">', '</a>' ); |
|
26 | + $notification['content'] = sprintf( __( 'Did you know that 36%% of SEO experts think the headline is the most important SEO element? Yet many website owners don’t know how to optimize their headlines for SEO and clicks. Instead, they write copy and hope for the best, only to see disappointing results. Now there’s an easier way! <br><br>%sWith the MonsterInsights Headline Analyzer%s, you can get targeted suggestions to improve your headlines, right in the WordPress editor.', 'google-analytics-for-wordpress' ), '<a href="' . $this->build_external_link( 'https://www.monsterinsights.com/announcing-monsterinsights-new-headline-analyzer/' ) . '" target="_blank">', '</a>' ); |
|
27 | 27 | $notification['btns'] = array( |
28 | 28 | "learn_more" => array( |
29 | - 'url' => $this->build_external_link('https://www.monsterinsights.com/announcing-monsterinsights-new-headline-analyzer/' ), |
|
29 | + 'url' => $this->build_external_link( 'https://www.monsterinsights.com/announcing-monsterinsights-new-headline-analyzer/' ), |
|
30 | 30 | 'text' => __( 'Learn More', 'google-analytics-for-wordpress' ) |
31 | 31 | ), |
32 | 32 | ); |
@@ -26,7 +26,7 @@ |
||
26 | 26 | public function prepare_notification_data( $notification ) { |
27 | 27 | $notification['title'] = __( 'Get access to Google Search Keywords data by upgrading to MonsterInsights Pro', 'google-analytics-for-wordpress' ); |
28 | 28 | // Translators: upgrade for search console notification content |
29 | - $notification['content'] = sprintf( __( 'Do you want to find out which search terms from Google bring your site the most visitors? %sUpgrade to MonsterInsights PRO%s today and get access to the %sSearch Console Report%s and more directly in your WordPress admin.', 'google-analytics-for-wordpress' ), '<a href="' . $this->get_upgrade_url() . '" target="_blank">', '</a>', '<a href="'. $this->build_external_link( 'https://www.monsterinsights.com/feature/search-console-report/' ) .'" target="_blank">', '</a>' ); |
|
29 | + $notification['content'] = sprintf( __( 'Do you want to find out which search terms from Google bring your site the most visitors? %sUpgrade to MonsterInsights PRO%s today and get access to the %sSearch Console Report%s and more directly in your WordPress admin.', 'google-analytics-for-wordpress' ), '<a href="' . $this->get_upgrade_url() . '" target="_blank">', '</a>', '<a href="' . $this->build_external_link( 'https://www.monsterinsights.com/feature/search-console-report/' ) . '" target="_blank">', '</a>' ); |
|
30 | 30 | $notification['btns'] = array( |
31 | 31 | "get_monsterinsights_pro" => array( |
32 | 32 | 'url' => $this->get_upgrade_url(), |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | $translations = wp_get_available_translations(); |
45 | 45 | |
46 | 46 | if ( is_array( $translations ) && ! empty( $translations ) ) { |
47 | - $site_iso = isset( $translations[ $site_language ]['iso'] ) ? $translations[ $site_language ]['iso'] : array(); // keep empty array, because site language has no iso setup for en_US language |
|
47 | + $site_iso = isset( $translations[$site_language]['iso'] ) ? $translations[$site_language]['iso'] : array(); // keep empty array, because site language has no iso setup for en_US language |
|
48 | 48 | |
49 | 49 | if ( is_array( $site_iso ) && ! in_array( $country['iso'], $site_iso ) ) { |
50 | 50 | $data['country'] = $country['name']; |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | // Translators: Audience notification title |
80 | 80 | $notification['title'] = sprintf( __( '%s%% of your Audience is from %s', 'google-analytics-for-wordpress' ), $data['percentage'], $data['country'] ); |
81 | 81 | // Translators: Audience notification content |
82 | - $notification['content'] = sprintf( __( 'Is your site properly translated? By adding translated content specific to your audience you could gain big boosts in pageviews, time spent on page and a reduced bounce rate.<br><br>If you need help choosing a translation plugin to get you started take a look at %sthis article%s for the best options available.', 'google-analytics-for-wordpress' ), '<a href="'. $this->build_external_link('https://www.wpbeginner.com/showcase/9-best-translation-plugins-for-wordpress-websites/' ) .'" target="_blank">', '</a>' ); |
|
82 | + $notification['content'] = sprintf( __( 'Is your site properly translated? By adding translated content specific to your audience you could gain big boosts in pageviews, time spent on page and a reduced bounce rate.<br><br>If you need help choosing a translation plugin to get you started take a look at %sthis article%s for the best options available.', 'google-analytics-for-wordpress' ), '<a href="' . $this->build_external_link( 'https://www.wpbeginner.com/showcase/9-best-translation-plugins-for-wordpress-websites/' ) . '" target="_blank">', '</a>' ); |
|
83 | 83 | $notification['btns'] = array( |
84 | 84 | "view_report" => array( |
85 | 85 | 'url' => $this->get_view_url(), |
@@ -27,14 +27,14 @@ |
||
27 | 27 | // Translators: Mobile device notification title |
28 | 28 | $notification['title'] = sprintf( __( 'Traffic from Mobile Devices is %s%%', 'google-analytics-for-wordpress' ), $data['percentage_of_mobile_visitors'] ); |
29 | 29 | // Translators: Mobile device notification content |
30 | - $notification['content'] = sprintf( __( 'Traffic from mobile devices is considerably lower on your site compared to desktop devices. This could be an indicator that your site is not optimised for mobile devices.<br><br>Take a look now at %show your site looks%s on mobile and make sure all your content can be accessed correctly.', 'google-analytics-for-wordpress' ), '<a href="'. $this->build_external_link( 'https://www.wpbeginner.com/beginners-guide/how-to-preview-the-mobile-layout-of-your-site/' ) .'">', '</a>' ); |
|
30 | + $notification['content'] = sprintf( __( 'Traffic from mobile devices is considerably lower on your site compared to desktop devices. This could be an indicator that your site is not optimised for mobile devices.<br><br>Take a look now at %show your site looks%s on mobile and make sure all your content can be accessed correctly.', 'google-analytics-for-wordpress' ), '<a href="' . $this->build_external_link( 'https://www.wpbeginner.com/beginners-guide/how-to-preview-the-mobile-layout-of-your-site/' ) . '">', '</a>' ); |
|
31 | 31 | $notification['btns'] = array( |
32 | 32 | "view_report" => array( |
33 | 33 | 'url' => $this->get_view_url(), |
34 | 34 | 'text' => __( 'View Report', 'google-analytics-for-wordpress' ) |
35 | 35 | ), |
36 | 36 | "learn_more" => array( |
37 | - 'url' => $this->build_external_link('https://www.wpbeginner.com/beginners-guide/how-to-preview-the-mobile-layout-of-your-site/' ), |
|
37 | + 'url' => $this->build_external_link( 'https://www.wpbeginner.com/beginners-guide/how-to-preview-the-mobile-layout-of-your-site/' ), |
|
38 | 38 | 'text' => __( 'Learn More', 'google-analytics-for-wordpress' ) |
39 | 39 | ), |
40 | 40 | ); |
@@ -27,14 +27,14 @@ |
||
27 | 27 | if ( ! empty( $data ) && $data['bounce_rate'] > 70 ) { |
28 | 28 | $notification['title'] = __( 'Your website bounce rate is higher than 70%', 'google-analytics-for-wordpress' ); |
29 | 29 | // Translators: Bounce rate notification content |
30 | - $notification['content'] = sprintf( __( 'Your website bounce rate is %s. High bounce rates can hurt your site’s conversions rates. A high bounce rate might mean that people aren’t finding what they’re looking for on your site. %sHere%s are some points to remember and steps to follow to get your bounce rates back to manageable levels.', 'google-analytics-for-wordpress' ), $data['bounce_rate'] . '%', '<a href="'. $this->build_external_link('https://www.monsterinsights.com/how-to-reduce-bounce-rate/' ) .'" target="_blank">', '</a>' ); |
|
30 | + $notification['content'] = sprintf( __( 'Your website bounce rate is %s. High bounce rates can hurt your site’s conversions rates. A high bounce rate might mean that people aren’t finding what they’re looking for on your site. %sHere%s are some points to remember and steps to follow to get your bounce rates back to manageable levels.', 'google-analytics-for-wordpress' ), $data['bounce_rate'] . '%', '<a href="' . $this->build_external_link( 'https://www.monsterinsights.com/how-to-reduce-bounce-rate/' ) . '" target="_blank">', '</a>' ); |
|
31 | 31 | $notification['btns'] = array( |
32 | 32 | "view_report" => array( |
33 | 33 | 'url' => $this->get_view_url(), |
34 | 34 | 'text' => __( 'View Report', 'google-analytics-for-wordpress' ) |
35 | 35 | ), |
36 | 36 | "learn_more" => array( |
37 | - 'url' => $this->build_external_link('https://www.monsterinsights.com/how-to-reduce-bounce-rate/' ), |
|
37 | + 'url' => $this->build_external_link( 'https://www.monsterinsights.com/how-to-reduce-bounce-rate/' ), |
|
38 | 38 | 'text' => __( 'Learn More', 'google-analytics-for-wordpress' ) |
39 | 39 | ), |
40 | 40 | ); |
@@ -26,7 +26,7 @@ |
||
26 | 26 | public function prepare_notification_data( $notification ) { |
27 | 27 | $notification['title'] = __( 'Upgrade to MonsterInsights Pro to Enable Google Optimize', 'google-analytics-for-wordpress' ); |
28 | 28 | // Translators: upgrade for google optimize notification content |
29 | - $notification['content'] = sprintf( __( '%sGoogle Optimize%s is a free A/B testing and personalization product by Google that lets you easily conduct experiments to see what works best on your site. With Google Optimize, you can use split testing and personalization to create online experiences that engage and delight your customers. %sUpgrade to MonsterInsights Pro%s to unlock the Google Optimize addon.', 'google-analytics-for-wordpress' ), '<a href="'. $this->build_external_link( 'https://www.monsterinsights.com/addon/google-optimize/' ) .'" target="_blank">', '</a>', '<a href="' . $this->get_upgrade_url() . '" target="_blank">', '</a>' ); |
|
29 | + $notification['content'] = sprintf( __( '%sGoogle Optimize%s is a free A/B testing and personalization product by Google that lets you easily conduct experiments to see what works best on your site. With Google Optimize, you can use split testing and personalization to create online experiences that engage and delight your customers. %sUpgrade to MonsterInsights Pro%s to unlock the Google Optimize addon.', 'google-analytics-for-wordpress' ), '<a href="' . $this->build_external_link( 'https://www.monsterinsights.com/addon/google-optimize/' ) . '" target="_blank">', '</a>', '<a href="' . $this->get_upgrade_url() . '" target="_blank">', '</a>' ); |
|
30 | 30 | $notification['btns'] = array( |
31 | 31 | "get_monsterinsights_pro" => array( |
32 | 32 | 'url' => $this->get_upgrade_url(), |
@@ -27,7 +27,7 @@ |
||
27 | 27 | if ( ! empty( $data ) && $data['prev_sessions_difference'] < 0 ) { |
28 | 28 | $notification['title'] = __( 'Your Website Traffic Is Dropping', 'google-analytics-for-wordpress' ); |
29 | 29 | // Translators: Traffic dropping notification content |
30 | - $notification['content'] = sprintf( __( 'Your website traffic is decreasing and that’s a reason to take action now. Less traffic means less opportunities to make your brand known, make relationships and ultimately sell your service or product. <br><br>Follow the marketing hacks of %sthis article%s to start growing your traffic again.', 'google-analytics-for-wordpress' ), '<a href="'. $this->build_external_link( 'https://www.monsterinsights.com/marketing-hacks-guaranteed-to-grow-your-traffic/' ) .'" target="_blank">', '</a>' ); |
|
30 | + $notification['content'] = sprintf( __( 'Your website traffic is decreasing and that’s a reason to take action now. Less traffic means less opportunities to make your brand known, make relationships and ultimately sell your service or product. <br><br>Follow the marketing hacks of %sthis article%s to start growing your traffic again.', 'google-analytics-for-wordpress' ), '<a href="' . $this->build_external_link( 'https://www.monsterinsights.com/marketing-hacks-guaranteed-to-grow-your-traffic/' ) . '" target="_blank">', '</a>' ); |
|
31 | 31 | $notification['btns'] = array( |
32 | 32 | "learn_more" => array( |
33 | 33 | 'url' => $this->build_external_link( 'https://www.monsterinsights.com/marketing-hacks-guaranteed-to-grow-your-traffic/' ), |
@@ -28,7 +28,7 @@ |
||
28 | 28 | // Translators: Returning visitors notification title |
29 | 29 | $notification['title'] = sprintf( __( 'Only %s%% of your visitors return to your site', 'google-analytics-for-wordpress' ), $data['returning'] ); |
30 | 30 | // Translators: Returning visitors notification content |
31 | - $notification['content'] = sprintf( __( 'For any website, returning visitors are important because they indicate how successful your marketing campaigns are, who are your loyal customers, and how powerful your brand is. %sIn this article%s, we’ll show you 7 proven ways to increase your returning visitor rate.', 'google-analytics-for-wordpress' ), '<a href="'. $this->build_external_link( 'https://www.monsterinsights.com/proven-ways-to-increase-your-returning-visitor-rate/' ) .'" target="_blank">', '</a>' ); |
|
31 | + $notification['content'] = sprintf( __( 'For any website, returning visitors are important because they indicate how successful your marketing campaigns are, who are your loyal customers, and how powerful your brand is. %sIn this article%s, we’ll show you 7 proven ways to increase your returning visitor rate.', 'google-analytics-for-wordpress' ), '<a href="' . $this->build_external_link( 'https://www.monsterinsights.com/proven-ways-to-increase-your-returning-visitor-rate/' ) . '" target="_blank">', '</a>' ); |
|
32 | 32 | $notification['btns'] = array( |
33 | 33 | "view_report" => array( |
34 | 34 | 'url' => $this->get_view_url(), |