@@ -1,7 +1,7 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | 3 | // Exit if accessed directly |
4 | -if ( ! defined( 'ABSPATH' ) ) { |
|
4 | +if ( ! defined( 'ABSPATH' ) ) { |
|
5 | 5 | exit; |
6 | 6 | } |
7 | 7 |
@@ -11,7 +11,7 @@ discard block |
||
11 | 11 | $settings['social']['social_notice'] = array( |
12 | 12 | 'id' => 'social_notice', |
13 | 13 | 'no_label' => true, |
14 | - 'name' => __( 'Want to increase your traffic, conversion, & engagement?', 'google-analytics-for-wordpress'), |
|
14 | + 'name' => __( 'Want to increase your traffic, conversion, & engagement?', 'google-analytics-for-wordpress' ), |
|
15 | 15 | 'type' => 'upgrade_notice', |
16 | 16 | 'desc' => esc_html__( "By upgrading to MonsterInsights Pro, you can add Social tracking to see who's clicking on your social share links, so you can track and maximize your social sharing exposure.", 'google-analytics-for-wordpress' ) |
17 | 17 | ); |
@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | $settings['ads']['ads_notice'] = array( |
21 | 21 | 'id' => 'ads_notice', |
22 | 22 | 'no_label' => true, |
23 | - 'name' => __( 'Want to increase your traffic, conversion, & engagement?', 'google-analytics-for-wordpress'), |
|
23 | + 'name' => __( 'Want to increase your traffic, conversion, & engagement?', 'google-analytics-for-wordpress' ), |
|
24 | 24 | 'type' => 'upgrade_notice', |
25 | 25 | 'desc' => esc_html__( "By upgrading to MonsterInsights Pro, you can add Ads tracking to see who's clicking on your Google Ads, so you can increase your revenue.", 'google-analytics-for-wordpress' ) |
26 | 26 | ); |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | $settings['forms']['forms_notice'] = array( |
30 | 30 | 'id' => 'forms_notice', |
31 | 31 | 'no_label' => true, |
32 | - 'name' => __( 'Want to increase your traffic, conversion, & engagement?', 'google-analytics-for-wordpress'), |
|
32 | + 'name' => __( 'Want to increase your traffic, conversion, & engagement?', 'google-analytics-for-wordpress' ), |
|
33 | 33 | 'type' => 'upgrade_notice', |
34 | 34 | 'desc' => esc_html__( "By upgrading to MonsterInsights Pro, you can add Forms tracking to see who's seeing and submitting your forms, so you can increase your conversion rate.", 'google-analytics-for-wordpress' ) |
35 | 35 | ); |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | $settings['media']['media_notice'] = array( |
39 | 39 | 'id' => 'media_notice', |
40 | 40 | 'no_label' => true, |
41 | - 'name' => __( 'Want to increase your traffic, conversion, & engagement?', 'google-analytics-for-wordpress'), |
|
41 | + 'name' => __( 'Want to increase your traffic, conversion, & engagement?', 'google-analytics-for-wordpress' ), |
|
42 | 42 | 'type' => 'upgrade_notice', |
43 | 43 | 'desc' => esc_html__( "By upgrading to MonsterInsights Pro, you can add Media tracking to see who's interacting with the media on your site, so you know what your users are most interested in on your site. You can use this to tailor future content to meet your audience's interest to promote repeat visitors and expand your average user's time spent visiting your website on each visit.", 'google-analytics-for-wordpress' ) |
44 | 44 | ); |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | $settings['membership']['membership_notice'] = array( |
48 | 48 | 'id' => 'membership_notice', |
49 | 49 | 'no_label' => true, |
50 | - 'name' => __( 'Want to increase your traffic, conversion, & engagement?', 'google-analytics-for-wordpress'), |
|
50 | + 'name' => __( 'Want to increase your traffic, conversion, & engagement?', 'google-analytics-for-wordpress' ), |
|
51 | 51 | 'type' => 'upgrade_notice', |
52 | 52 | 'desc' => esc_html__( "By upgrading to MonsterInsights Pro, you can add Membership tracking.", 'google-analytics-for-wordpress' ) |
53 | 53 | ); |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | $settings['dimensions']['dimensions_notice'] = array( |
57 | 57 | 'id' => 'dimensions_notice', |
58 | 58 | 'no_label' => true, |
59 | - 'name' => __( 'Want to increase your traffic, conversion, & engagement?', 'google-analytics-for-wordpress'), |
|
59 | + 'name' => __( 'Want to increase your traffic, conversion, & engagement?', 'google-analytics-for-wordpress' ), |
|
60 | 60 | 'type' => 'upgrade_notice', |
61 | 61 | 'desc' => esc_html__( "By upgrading to MonsterInsights Pro, you can add Custom Dimensions and track who's the most popular author on your site, which post types get the most traffic, and more. Why not check it out?", 'google-analytics-for-wordpress' ) |
62 | 62 | ); |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | $settings['performance']['performance_notice'] = array( |
66 | 66 | 'id' => 'performance_notice', |
67 | 67 | 'no_label' => true, |
68 | - 'name' => __( 'Want to increase your traffic, conversion, & engagement?', 'google-analytics-for-wordpress'), |
|
68 | + 'name' => __( 'Want to increase your traffic, conversion, & engagement?', 'google-analytics-for-wordpress' ), |
|
69 | 69 | 'type' => 'upgrade_notice', |
70 | 70 | 'desc' => esc_html__( "By upgrading to MonsterInsights Pro, you can adjust the sample rate so you don't exceed Google Analytics' processing limit. You can also use it to enable Google Optimize for A/B testing and personalization.", 'google-analytics-for-wordpress' ) |
71 | 71 | ); |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | $settings['reporting']['reporting_notice'] = array( |
75 | 75 | 'id' => 'reporting_notice', |
76 | 76 | 'no_label' => true, |
77 | - 'name' => __( 'Want to increase your traffic, conversion, & engagement?', 'google-analytics-for-wordpress'), |
|
77 | + 'name' => __( 'Want to increase your traffic, conversion, & engagement?', 'google-analytics-for-wordpress' ), |
|
78 | 78 | 'type' => 'upgrade_notice', |
79 | 79 | 'desc' => esc_html__( "By upgrading to MonsterInsights Pro, you can enable enhanced reporting.", 'google-analytics-for-wordpress' ) |
80 | 80 | ); |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | $settings['amp']['amp_notice'] = array( |
84 | 84 | 'id' => 'amp_notice', |
85 | 85 | 'no_label' => true, |
86 | - 'name' => __( 'Want to use track users visiting your AMP pages?', 'google-analytics-for-wordpress'), |
|
86 | + 'name' => __( 'Want to use track users visiting your AMP pages?', 'google-analytics-for-wordpress' ), |
|
87 | 87 | 'type' => 'upgrade_notice', |
88 | 88 | 'desc' => esc_html__( "By upgrading to MonsterInsights Pro, you can enable AMP page tracking.", 'google-analytics-for-wordpress' ) |
89 | 89 | ); |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | $settings['goptimize']['goptimize_notice'] = array( |
93 | 93 | 'id' => 'goptimize_notice', |
94 | 94 | 'no_label' => true, |
95 | - 'name' => __( 'Want to use Google Optimize to retarget your website visitors and perform A/B split tests with ease?', 'google-analytics-for-wordpress'), |
|
95 | + 'name' => __( 'Want to use Google Optimize to retarget your website visitors and perform A/B split tests with ease?', 'google-analytics-for-wordpress' ), |
|
96 | 96 | 'type' => 'upgrade_notice', |
97 | 97 | 'desc' => esc_html__( "By upgrading to MonsterInsights Pro, you can enable Google Optimize.", 'google-analytics-for-wordpress' ) |
98 | 98 | ); |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | $settings['fbia']['fbia_notice'] = array( |
102 | 102 | 'id' => 'fbia_notice', |
103 | 103 | 'no_label' => true, |
104 | - 'name' => __( 'Want to expand your website audience beyond your website with Facebook Instant Articles?', 'google-analytics-for-wordpress'), |
|
104 | + 'name' => __( 'Want to expand your website audience beyond your website with Facebook Instant Articles?', 'google-analytics-for-wordpress' ), |
|
105 | 105 | 'type' => 'upgrade_notice', |
106 | 106 | 'desc' => esc_html__( "By upgrading to MonsterInsights Pro, you can track your Facebook Instant Article visitors with MonsterInsights.", 'google-analytics-for-wordpress' ) |
107 | 107 | ); |
@@ -110,7 +110,7 @@ discard block |
||
110 | 110 | $settings['bounce']['bounce_notice'] = array( |
111 | 111 | 'id' => 'bounce_notice', |
112 | 112 | 'no_label' => true, |
113 | - 'name' => __( 'Want to adjust your website bounce rate?', 'google-analytics-for-wordpress'), |
|
113 | + 'name' => __( 'Want to adjust your website bounce rate?', 'google-analytics-for-wordpress' ), |
|
114 | 114 | 'type' => 'upgrade_notice', |
115 | 115 | 'desc' => esc_html__( "By upgrading to MonsterInsights Pro, you can adjust your Google Analytics bounce rate with MonsterInsights.", 'google-analytics-for-wordpress' ) |
116 | 116 | ); |
@@ -119,7 +119,7 @@ discard block |
||
119 | 119 | $settings['notifications']['notifications_notice'] = array( |
120 | 120 | 'id' => 'notifications_notice', |
121 | 121 | 'no_label' => true, |
122 | - 'name' => __( 'Want to increase your traffic, conversion, & engagement?', 'google-analytics-for-wordpress'), |
|
122 | + 'name' => __( 'Want to increase your traffic, conversion, & engagement?', 'google-analytics-for-wordpress' ), |
|
123 | 123 | 'type' => 'upgrade_notice', |
124 | 124 | 'desc' => esc_html__( "By upgrading to MonsterInsights Pro, you can enable notifications.", 'google-analytics-for-wordpress' ) |
125 | 125 | ); |
@@ -128,7 +128,7 @@ discard block |
||
128 | 128 | $settings['ecommerce']['ecommerce_notice'] = array( |
129 | 129 | 'id' => 'ecommerce_notice', |
130 | 130 | 'no_label' => true, |
131 | - 'name' => __( 'Want to increase your traffic, conversion, & engagement?', 'google-analytics-for-wordpress'), |
|
131 | + 'name' => __( 'Want to increase your traffic, conversion, & engagement?', 'google-analytics-for-wordpress' ), |
|
132 | 132 | 'type' => 'upgrade_notice', |
133 | 133 | 'desc' => esc_html__( "By upgrading to MonsterInsights Pro, you can add Ecommerce tracking to see who's buying your product, what's the most popular item on your store, the average order value, and tons more.", 'google-analytics-for-wordpress' ) |
134 | 134 | ); |
@@ -23,7 +23,7 @@ |
||
23 | 23 | parent::__construct(); |
24 | 24 | } |
25 | 25 | |
26 | - protected function get_report_html( $data = array() ){ |
|
26 | + protected function get_report_html( $data = array() ) { |
|
27 | 27 | return $this->get_upsell_notice(); |
28 | 28 | } |
29 | 29 | } |
30 | 30 | \ No newline at end of file |
@@ -23,7 +23,7 @@ |
||
23 | 23 | parent::__construct(); |
24 | 24 | } |
25 | 25 | |
26 | - protected function get_report_html( $data = array() ){ |
|
26 | + protected function get_report_html( $data = array() ) { |
|
27 | 27 | return $this->get_upsell_notice(); |
28 | 28 | } |
29 | 29 | } |
30 | 30 | \ No newline at end of file |
@@ -23,7 +23,7 @@ |
||
23 | 23 | parent::__construct(); |
24 | 24 | } |
25 | 25 | |
26 | - protected function get_report_html( $data = array() ){ |
|
26 | + protected function get_report_html( $data = array() ) { |
|
27 | 27 | return $this->get_upsell_notice(); |
28 | 28 | } |
29 | 29 | } |
@@ -23,7 +23,7 @@ |
||
23 | 23 | parent::__construct(); |
24 | 24 | } |
25 | 25 | |
26 | - protected function get_report_html( $data = array() ){ |
|
26 | + protected function get_report_html( $data = array() ) { |
|
27 | 27 | return $this->get_upsell_notice(); |
28 | 28 | } |
29 | 29 | } |
@@ -227,7 +227,7 @@ discard block |
||
227 | 227 | self::$instance->notices = new MonsterInsights_Notice_Admin(); |
228 | 228 | self::$instance->license_actions = new MonsterInsights_License_Actions(); |
229 | 229 | self::$instance->reporting = new MonsterInsights_Reporting(); |
230 | - self::$instance->api_auth = new MonsterInsights_API_Auth(); |
|
230 | + self::$instance->api_auth = new MonsterInsights_API_Auth(); |
|
231 | 231 | if ( defined( 'DOING_CRON' ) && DOING_CRON ) { |
232 | 232 | self::$instance->require_updater(); |
233 | 233 | } else { |
@@ -351,19 +351,19 @@ discard block |
||
351 | 351 | } |
352 | 352 | |
353 | 353 | if ( ! defined( 'MONSTERINSIGHTS_PLUGIN_DIR' ) ) { |
354 | - define( 'MONSTERINSIGHTS_PLUGIN_DIR', plugin_dir_path( $this->file ) ); |
|
354 | + define( 'MONSTERINSIGHTS_PLUGIN_DIR', plugin_dir_path( $this->file ) ); |
|
355 | 355 | } |
356 | 356 | |
357 | 357 | if ( ! defined( 'GAWP_PATH' ) ) { |
358 | - define( 'GAWP_PATH', MONSTERINSIGHTS_PLUGIN_DIR ); |
|
358 | + define( 'GAWP_PATH', MONSTERINSIGHTS_PLUGIN_DIR ); |
|
359 | 359 | } |
360 | 360 | |
361 | 361 | if ( ! defined( 'MONSTERINSIGHTS_PLUGIN_URL' ) ) { |
362 | - define( 'MONSTERINSIGHTS_PLUGIN_URL', plugin_dir_url( $this->file ) ); |
|
362 | + define( 'MONSTERINSIGHTS_PLUGIN_URL', plugin_dir_url( $this->file ) ); |
|
363 | 363 | } |
364 | 364 | |
365 | 365 | if ( ! defined( 'GAWP_URL' ) ) { |
366 | - define( 'GAWP_URL', MONSTERINSIGHTS_PLUGIN_URL ); |
|
366 | + define( 'GAWP_URL', MONSTERINSIGHTS_PLUGIN_URL ); |
|
367 | 367 | } |
368 | 368 | } |
369 | 369 | |
@@ -383,7 +383,7 @@ discard block |
||
383 | 383 | } |
384 | 384 | |
385 | 385 | // Traditional WordPress plugin locale filter. |
386 | - $mi_locale = apply_filters( 'plugin_locale', $mi_locale, 'google-analytics-for-wordpress' ); |
|
386 | + $mi_locale = apply_filters( 'plugin_locale', $mi_locale, 'google-analytics-for-wordpress' ); |
|
387 | 387 | $mi_mofile = sprintf( '%1$s-%2$s.mo', 'google-analytics-for-wordpress', $mi_locale ); |
388 | 388 | |
389 | 389 | // Look for wp-content/languages/google-analytics-for-wordpress/google-analytics-for-wordpress-{lang}_{country}.mo |
@@ -440,7 +440,7 @@ discard block |
||
440 | 440 | public function monsterinsights_wp_notice() { |
441 | 441 | $url = admin_url( 'plugins.php' ); |
442 | 442 | // Check for MS dashboard |
443 | - if( is_network_admin() ) { |
|
443 | + if ( is_network_admin() ) { |
|
444 | 444 | $url = network_admin_url( 'plugins.php' ); |
445 | 445 | } |
446 | 446 | ?> |
@@ -461,7 +461,7 @@ discard block |
||
461 | 461 | public function monsterinsights_pro_notice() { |
462 | 462 | $url = admin_url( 'plugins.php' ); |
463 | 463 | // Check for MS dashboard |
464 | - if( is_network_admin() ) { |
|
464 | + if ( is_network_admin() ) { |
|
465 | 465 | $url = network_admin_url( 'plugins.php' ); |
466 | 466 | } |
467 | 467 | ?> |
@@ -487,7 +487,7 @@ discard block |
||
487 | 487 | require_once MONSTERINSIGHTS_PLUGIN_DIR . 'includes/options.php'; |
488 | 488 | require_once MONSTERINSIGHTS_PLUGIN_DIR . 'includes/helpers.php'; |
489 | 489 | require_once MONSTERINSIGHTS_PLUGIN_DIR . 'includes/deprecated.php'; |
490 | - $monsterinsights_settings = monsterinsights_get_options(); |
|
490 | + $monsterinsights_settings = monsterinsights_get_options(); |
|
491 | 491 | } |
492 | 492 | |
493 | 493 | |
@@ -501,7 +501,7 @@ discard block |
||
501 | 501 | * |
502 | 502 | * @return void |
503 | 503 | */ |
504 | - public function load_licensing(){ |
|
504 | + public function load_licensing() { |
|
505 | 505 | if ( is_admin() || ( defined( 'DOING_CRON' ) && DOING_CRON ) ) { |
506 | 506 | require_once MONSTERINSIGHTS_PLUGIN_DIR . 'includes/license.php'; |
507 | 507 | self::$instance->license = new MonsterInsights_License(); |
@@ -672,7 +672,7 @@ discard block |
||
672 | 672 | $instance->api_auth->delete_auth(); |
673 | 673 | |
674 | 674 | // Delete network data |
675 | - $instance->reporting->delete_aggregate_data('network'); |
|
675 | + $instance->reporting->delete_aggregate_data( 'network' ); |
|
676 | 676 | |
677 | 677 | // Delete network license |
678 | 678 | $instance->license->delete_network_license(); |
@@ -686,7 +686,7 @@ discard block |
||
686 | 686 | $instance->api_auth->delete_auth(); |
687 | 687 | |
688 | 688 | // Delete data |
689 | - $instance->reporting->delete_aggregate_data('site'); |
|
689 | + $instance->reporting->delete_aggregate_data( 'site' ); |
|
690 | 690 | |
691 | 691 | // Delete license |
692 | 692 | $instance->license->delete_site_license(); |
@@ -698,7 +698,7 @@ discard block |
||
698 | 698 | $instance->api_auth->delete_auth(); |
699 | 699 | |
700 | 700 | // Delete data |
701 | - $instance->reporting->delete_aggregate_data('site'); |
|
701 | + $instance->reporting->delete_aggregate_data( 'site' ); |
|
702 | 702 | |
703 | 703 | // Delete license |
704 | 704 | $instance->license->delete_site_license(); |
@@ -793,7 +793,7 @@ discard block |
||
793 | 793 | * |
794 | 794 | * @return void |
795 | 795 | */ |
796 | -function monsterinsights_lite_call_install_and_upgrade(){ |
|
796 | +function monsterinsights_lite_call_install_and_upgrade() { |
|
797 | 797 | add_action( 'wp_loaded', 'monsterinsights_lite_install_and_upgrade' ); |
798 | 798 | } |
799 | 799 |
@@ -501,7 +501,7 @@ discard block |
||
501 | 501 | * |
502 | 502 | * @return void |
503 | 503 | */ |
504 | - public function load_licensing(){ |
|
504 | + public function load_licensing() { |
|
505 | 505 | if ( is_admin() || ( defined( 'DOING_CRON' ) && DOING_CRON ) ) { |
506 | 506 | require_once MONSTERINSIGHTS_PLUGIN_DIR . 'includes/license.php'; |
507 | 507 | self::$instance->license = new MonsterInsights_License(); |
@@ -793,7 +793,7 @@ discard block |
||
793 | 793 | * |
794 | 794 | * @return void |
795 | 795 | */ |
796 | -function monsterinsights_lite_call_install_and_upgrade(){ |
|
796 | +function monsterinsights_lite_call_install_and_upgrade() { |
|
797 | 797 | add_action( 'wp_loaded', 'monsterinsights_lite_install_and_upgrade' ); |
798 | 798 | } |
799 | 799 |
@@ -23,7 +23,7 @@ |
||
23 | 23 | parent::__construct(); |
24 | 24 | } |
25 | 25 | |
26 | - protected function get_report_html( $data = array() ){ |
|
26 | + protected function get_report_html( $data = array() ) { |
|
27 | 27 | return $this->get_upsell_notice(); |
28 | 28 | } |
29 | 29 | } |
30 | 30 | \ No newline at end of file |
@@ -23,7 +23,7 @@ |
||
23 | 23 | parent::__construct(); |
24 | 24 | } |
25 | 25 | |
26 | - protected function get_report_html( $data = array() ){ |
|
26 | + protected function get_report_html( $data = array() ) { |
|
27 | 27 | return $this->get_upsell_notice(); |
28 | 28 | } |
29 | 29 | } |
30 | 30 | \ No newline at end of file |
@@ -23,7 +23,7 @@ |
||
23 | 23 | parent::__construct(); |
24 | 24 | } |
25 | 25 | |
26 | - protected function get_report_html( $data = array() ){ |
|
26 | + protected function get_report_html( $data = array() ) { |
|
27 | 27 | return $this->get_upsell_notice(); |
28 | 28 | } |
29 | 29 | } |
30 | 30 | \ No newline at end of file |
@@ -23,7 +23,7 @@ |
||
23 | 23 | parent::__construct(); |
24 | 24 | } |
25 | 25 | |
26 | - protected function get_report_html( $data = array() ){ |
|
26 | + protected function get_report_html( $data = array() ) { |
|
27 | 27 | return $this->get_upsell_notice(); |
28 | 28 | } |
29 | 29 | } |
30 | 30 | \ No newline at end of file |
@@ -172,13 +172,13 @@ discard block |
||
172 | 172 | ) |
173 | 173 | ), |
174 | 174 | /** Demographics Settings */ |
175 | - 'demographics' => apply_filters('monsterinsights_settings_demographics', |
|
175 | + 'demographics' => apply_filters( 'monsterinsights_settings_demographics', |
|
176 | 176 | array( |
177 | 177 | 'demographics' => array( |
178 | 178 | 'id' => 'demographics', |
179 | 179 | 'name' => __( 'Enable Demographics and Interests Reports for Remarketing and Advertising', 'google-analytics-for-wordpress' ), |
180 | 180 | 'desc' => sprintf( esc_html__( 'Check this setting to add the Demographics and Remarketing features to your Google Analytics tracking code. Make sure to enable Demographics and Remarketing in your Google Analytics account. We have a guide for how to do that in our %1$sknowledge base%2$s. For more information about Remarketing, we refer you to %3$sGoogle\'s documentation%2$s. Note that usage of this function is affected by privacy and cookie laws around the world. Be sure to follow the laws that affect your target audience.', 'google-analytics-for-wordpress' ), '<a href="https://www.monsterinsights.com/docs/enable-demographics-and-interests-report-in-google-analytics/#utm_medium=kb-link&utm_source=gawp-config&utm_campaign=wpgaplugin" target="_blank" rel="noopener noreferrer" referrer="no-referrer">', |
181 | - '</a>','<a href="https://support.google.com/analytics/answer/2444872?hl=' . get_locale() . '" target="_blank" rel="noopener noreferrer" referrer="no-referrer">' |
|
181 | + '</a>', '<a href="https://support.google.com/analytics/answer/2444872?hl=' . get_locale() . '" target="_blank" rel="noopener noreferrer" referrer="no-referrer">' |
|
182 | 182 | ), |
183 | 183 | 'type' => 'checkbox', |
184 | 184 | ), |
@@ -191,7 +191,7 @@ discard block |
||
191 | 191 | ) |
192 | 192 | ), |
193 | 193 | /** Enhanced Link Attribution Settings */ |
194 | - 'links' => apply_filters('monsterinsights_settings_links', |
|
194 | + 'links' => apply_filters( 'monsterinsights_settings_links', |
|
195 | 195 | array( |
196 | 196 | 'enhanced_link_attribution' => array( |
197 | 197 | 'id' => 'enhanced_link_attribution', |
@@ -226,7 +226,7 @@ discard block |
||
226 | 226 | ) |
227 | 227 | ), |
228 | 228 | /** File Download Settings */ |
229 | - 'files' => apply_filters('monsterinsights_settings_files', |
|
229 | + 'files' => apply_filters( 'monsterinsights_settings_files', |
|
230 | 230 | array( |
231 | 231 | 'track_download_as' => array( |
232 | 232 | 'id' => 'track_download_as', |
@@ -248,7 +248,7 @@ discard block |
||
248 | 248 | ) |
249 | 249 | ), |
250 | 250 | /** Affiliate Tracking Settings */ |
251 | - 'affiliates' => apply_filters('monsterinsights_settings_affiliates', |
|
251 | + 'affiliates' => apply_filters( 'monsterinsights_settings_affiliates', |
|
252 | 252 | array( |
253 | 253 | 'track_internal_as_outbound' => array( |
254 | 254 | 'id' => 'track_internal_as_outbound', |
@@ -265,68 +265,68 @@ discard block |
||
265 | 265 | ) |
266 | 266 | ), |
267 | 267 | /** Social Tracking Settings */ |
268 | - 'social' => apply_filters('monsterinsights_settings_social', |
|
268 | + 'social' => apply_filters( 'monsterinsights_settings_social', |
|
269 | 269 | array() |
270 | 270 | ), |
271 | 271 | /** Ad Tracking Settings */ |
272 | - 'ads' => apply_filters('monsterinsights_settings_ads', |
|
272 | + 'ads' => apply_filters( 'monsterinsights_settings_ads', |
|
273 | 273 | array() |
274 | 274 | ), |
275 | 275 | /** Forms Tracking Settings */ |
276 | - 'forms' => apply_filters('monsterinsights_settings_forms', |
|
276 | + 'forms' => apply_filters( 'monsterinsights_settings_forms', |
|
277 | 277 | array() |
278 | 278 | ), |
279 | 279 | /** eCommerce Tracking Settings */ |
280 | - 'ecommerce' => apply_filters('monsterinsights_settings_ecommerce', |
|
280 | + 'ecommerce' => apply_filters( 'monsterinsights_settings_ecommerce', |
|
281 | 281 | array() |
282 | 282 | ), |
283 | 283 | /** Media Tracking Settings */ |
284 | - 'media' => apply_filters('monsterinsights_settings_media', |
|
284 | + 'media' => apply_filters( 'monsterinsights_settings_media', |
|
285 | 285 | array() |
286 | 286 | ), |
287 | 287 | /** Members Tracking Settings */ |
288 | - 'memberships' => apply_filters('monsterinsights_settings_memberships', |
|
288 | + 'memberships' => apply_filters( 'monsterinsights_settings_memberships', |
|
289 | 289 | array() |
290 | 290 | ), |
291 | 291 | /** Dimensions Tracking Settings */ |
292 | - 'dimensions' => apply_filters('monsterinsights_settings_dimensions', |
|
292 | + 'dimensions' => apply_filters( 'monsterinsights_settings_dimensions', |
|
293 | 293 | array() |
294 | 294 | ), |
295 | 295 | /** Performance Tracking Settings */ |
296 | - 'performance' => apply_filters('monsterinsights_settings_performance', |
|
296 | + 'performance' => apply_filters( 'monsterinsights_settings_performance', |
|
297 | 297 | array() |
298 | 298 | ), |
299 | 299 | /** AMP Tracking Settings */ |
300 | - 'amp' => apply_filters('monsterinsights_settings_amp', |
|
300 | + 'amp' => apply_filters( 'monsterinsights_settings_amp', |
|
301 | 301 | array() |
302 | 302 | ), |
303 | 303 | /** Google Optimize Tracking Settings */ |
304 | - 'goptimize' => apply_filters('monsterinsights_settings_goptimize', |
|
304 | + 'goptimize' => apply_filters( 'monsterinsights_settings_goptimize', |
|
305 | 305 | array() |
306 | 306 | ), |
307 | 307 | /** Facebook Instant Articles Tracking Settings */ |
308 | - 'fbia' => apply_filters('monsterinsights_settings_fbia', |
|
308 | + 'fbia' => apply_filters( 'monsterinsights_settings_fbia', |
|
309 | 309 | array() |
310 | 310 | ), |
311 | 311 | /** Bounce Reduction Settings */ |
312 | - 'bounce' => apply_filters('monsterinsights_settings_bounce', |
|
312 | + 'bounce' => apply_filters( 'monsterinsights_settings_bounce', |
|
313 | 313 | array() |
314 | 314 | ), |
315 | 315 | /** Reporting Tracking Settings */ |
316 | - 'reporting' => apply_filters('monsterinsights_settings_reporting', |
|
316 | + 'reporting' => apply_filters( 'monsterinsights_settings_reporting', |
|
317 | 317 | array() |
318 | 318 | ), |
319 | 319 | /** Notifications Tracking Settings */ |
320 | - 'notifications' => apply_filters('monsterinsights_settings_notifications', |
|
320 | + 'notifications' => apply_filters( 'monsterinsights_settings_notifications', |
|
321 | 321 | array() |
322 | 322 | ), |
323 | 323 | /** Compatibility Tracking Settings */ |
324 | - 'compatibility' => apply_filters('monsterinsights_settings_compatibility', |
|
324 | + 'compatibility' => apply_filters( 'monsterinsights_settings_compatibility', |
|
325 | 325 | array( |
326 | 326 | 'subdomain_tracking' => array( |
327 | 327 | 'id' => 'subdomain_tracking', |
328 | 328 | 'name' => __( 'Domain to track as:', 'google-analytics-for-wordpress' ), |
329 | - 'desc' => sprintf( esc_html__( 'This allows you to %1$sset the domain%2$s that\'s used for tracking. Only is used if set to a value, else defaults to automatic determination. It is very rare that you would need to use this setting.', 'google-analytics-for-wordpress' ), '<a href="https://developers.google.com/analytics/devguides/collection/analyticsjs/tracking-snippet-reference" target="_blank" rel="noopener noreferrer" referrer="no-referrer">' ,'</a>' ), |
|
329 | + 'desc' => sprintf( esc_html__( 'This allows you to %1$sset the domain%2$s that\'s used for tracking. Only is used if set to a value, else defaults to automatic determination. It is very rare that you would need to use this setting.', 'google-analytics-for-wordpress' ), '<a href="https://developers.google.com/analytics/devguides/collection/analyticsjs/tracking-snippet-reference" target="_blank" rel="noopener noreferrer" referrer="no-referrer">', '</a>' ), |
|
330 | 330 | 'type' => 'text', |
331 | 331 | ), |
332 | 332 | 'custom_code' => array( |
@@ -338,18 +338,18 @@ discard block |
||
338 | 338 | 'debug_mode' => array( |
339 | 339 | 'id' => 'debug_mode', |
340 | 340 | 'name' => __( 'Enable Debug Mode', 'google-analytics-for-wordpress' ), |
341 | - 'desc' => __( 'Turns on debugging in JS events tracking, logging of eCommerce requests and enables debug settings.', 'google-analytics-for-wordpress'), |
|
341 | + 'desc' => __( 'Turns on debugging in JS events tracking, logging of eCommerce requests and enables debug settings.', 'google-analytics-for-wordpress' ), |
|
342 | 342 | 'type' => 'checkbox', |
343 | 343 | ), |
344 | 344 | ) |
345 | 345 | ), |
346 | 346 | /** Permissions Tracking Settings */ |
347 | - 'permissions' => apply_filters('monsterinsights_settings_permissions', |
|
347 | + 'permissions' => apply_filters( 'monsterinsights_settings_permissions', |
|
348 | 348 | array( |
349 | 349 | 'view_reports' => array( |
350 | 350 | 'id' => 'view_reports', |
351 | 351 | 'name' => __( 'Let these user roles see reports:', 'google-analytics-for-wordpress' ), |
352 | - 'desc' => sprintf( esc_html( 'Users that have at least one of these roles will be able to view the reports, along with any user with the %s capability.', 'google-analytics-for-wordpress' ), '<code>manage_options</code>'), |
|
352 | + 'desc' => sprintf( esc_html( 'Users that have at least one of these roles will be able to view the reports, along with any user with the %s capability.', 'google-analytics-for-wordpress' ), '<code>manage_options</code>' ), |
|
353 | 353 | 'type' => 'select', |
354 | 354 | 'options' => monsterinsights_get_roles(), |
355 | 355 | 'select2' => true, |
@@ -359,7 +359,7 @@ discard block |
||
359 | 359 | 'save_settings' => array( |
360 | 360 | 'id' => 'save_settings', |
361 | 361 | 'name' => __( 'Let these user roles save settings:', 'google-analytics-for-wordpress' ), |
362 | - 'desc' => sprintf( esc_html__( 'Users that have at least one of these roles will be able to view and save the settings panel, along with any user with the %s capability.', 'google-analytics-for-wordpress'), '<code>manage_options</code>' ), |
|
362 | + 'desc' => sprintf( esc_html__( 'Users that have at least one of these roles will be able to view and save the settings panel, along with any user with the %s capability.', 'google-analytics-for-wordpress' ), '<code>manage_options</code>' ), |
|
363 | 363 | 'type' => 'select', |
364 | 364 | 'options' => monsterinsights_get_roles(), |
365 | 365 | 'select2' => true, |
@@ -33,24 +33,24 @@ discard block |
||
33 | 33 | $hook = 'monsterinsights_settings'; |
34 | 34 | |
35 | 35 | if ( $dashboards_disabled || ! $is_authed || ( current_user_can( 'monsterinsights_save_settings' ) && ! current_user_can( 'monsterinsights_view_dashboard' ) ) ) { |
36 | - // If dashboards disabled, first settings page |
|
37 | - add_menu_page( __( 'Settings:', 'google-analytics-for-wordpress' ), __( 'Insights', 'google-analytics-for-wordpress' ), 'monsterinsights_save_settings', 'monsterinsights_settings', 'monsterinsights_settings_page', plugins_url( 'assets/css/images/[email protected]', $base->file ), '100.00013467543' ); |
|
38 | - $hook = 'monsterinsights_settings'; |
|
36 | + // If dashboards disabled, first settings page |
|
37 | + add_menu_page( __( 'Settings:', 'google-analytics-for-wordpress' ), __( 'Insights', 'google-analytics-for-wordpress' ), 'monsterinsights_save_settings', 'monsterinsights_settings', 'monsterinsights_settings_page', plugins_url( 'assets/css/images/[email protected]', $base->file ), '100.00013467543' ); |
|
38 | + $hook = 'monsterinsights_settings'; |
|
39 | 39 | |
40 | - add_submenu_page( $hook, __( 'Settings:', 'google-analytics-for-wordpress' ), __( 'Settings', 'google-analytics-for-wordpress' ), 'monsterinsights_save_settings', 'monsterinsights_settings' ); |
|
41 | - add_submenu_page( $hook, __( 'Settings - Tracking:', 'google-analytics-for-wordpress' ), __( 'Settings - Tracking', 'google-analytics-for-wordpress' ), 'monsterinsights_save_settings', 'monsterinsights_tracking', 'monsterinsights_tracking_page' ); |
|
40 | + add_submenu_page( $hook, __( 'Settings:', 'google-analytics-for-wordpress' ), __( 'Settings', 'google-analytics-for-wordpress' ), 'monsterinsights_save_settings', 'monsterinsights_settings' ); |
|
41 | + add_submenu_page( $hook, __( 'Settings - Tracking:', 'google-analytics-for-wordpress' ), __( 'Settings - Tracking', 'google-analytics-for-wordpress' ), 'monsterinsights_save_settings', 'monsterinsights_tracking', 'monsterinsights_tracking_page' ); |
|
42 | 42 | } else { |
43 | - // if dashboards enabled, first dashboard |
|
44 | - add_menu_page( __( 'General:', 'google-analytics-for-wordpress' ), __( 'Insights', 'google-analytics-for-wordpress' ), 'monsterinsights_view_dashboard', 'monsterinsights_reports', 'monsterinsights_reports_page', plugins_url( 'assets/css/images/[email protected]', $base->file ), '100.00013467543' ); |
|
43 | + // if dashboards enabled, first dashboard |
|
44 | + add_menu_page( __( 'General:', 'google-analytics-for-wordpress' ), __( 'Insights', 'google-analytics-for-wordpress' ), 'monsterinsights_view_dashboard', 'monsterinsights_reports', 'monsterinsights_reports_page', plugins_url( 'assets/css/images/[email protected]', $base->file ), '100.00013467543' ); |
|
45 | 45 | |
46 | - $hook = 'monsterinsights_reports'; |
|
46 | + $hook = 'monsterinsights_reports'; |
|
47 | 47 | |
48 | - add_submenu_page( $hook, __( 'General Reports:', 'google-analytics-for-wordpress' ), __( 'Reports', 'google-analytics-for-wordpress' ), 'monsterinsights_view_dashboard', 'monsterinsights_reports', 'monsterinsights_reports_page' ); |
|
48 | + add_submenu_page( $hook, __( 'General Reports:', 'google-analytics-for-wordpress' ), __( 'Reports', 'google-analytics-for-wordpress' ), 'monsterinsights_view_dashboard', 'monsterinsights_reports', 'monsterinsights_reports_page' ); |
|
49 | 49 | |
50 | - // then settings page |
|
51 | - add_submenu_page( $hook, __( 'Settings:', 'google-analytics-for-wordpress' ), __( 'Settings', 'google-analytics-for-wordpress' ), 'monsterinsights_save_settings', 'monsterinsights_settings', 'monsterinsights_settings_page' ); |
|
50 | + // then settings page |
|
51 | + add_submenu_page( $hook, __( 'Settings:', 'google-analytics-for-wordpress' ), __( 'Settings', 'google-analytics-for-wordpress' ), 'monsterinsights_save_settings', 'monsterinsights_settings', 'monsterinsights_settings_page' ); |
|
52 | 52 | |
53 | - add_submenu_page( $hook, __( 'Settings - Tracking:', 'google-analytics-for-wordpress' ), __( 'Settings - Tracking', 'google-analytics-for-wordpress' ), 'monsterinsights_save_settings', 'monsterinsights_tracking', 'monsterinsights_tracking_page' ); |
|
53 | + add_submenu_page( $hook, __( 'Settings - Tracking:', 'google-analytics-for-wordpress' ), __( 'Settings - Tracking', 'google-analytics-for-wordpress' ), 'monsterinsights_save_settings', 'monsterinsights_tracking', 'monsterinsights_tracking_page' ); |
|
54 | 54 | |
55 | 55 | } |
56 | 56 | |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | // then addons |
61 | 61 | $network_key = MonsterInsights()->license->get_network_license_key(); |
62 | 62 | if ( ! monsterinsights_is_network_active() || ( monsterinsights_is_network_active() && empty( $network_key ) ) ) { |
63 | - add_submenu_page( $hook, __( 'Addons:', 'google-analytics-for-wordpress' ), '<span style="color:#7cc048"> ' . __( 'Addons', 'google-analytics-for-wordpress' ) . '</span>', 'monsterinsights_save_settings', 'monsterinsights_addons', 'monsterinsights_addons_page' ); |
|
63 | + add_submenu_page( $hook, __( 'Addons:', 'google-analytics-for-wordpress' ), '<span style="color:#7cc048"> ' . __( 'Addons', 'google-analytics-for-wordpress' ) . '</span>', 'monsterinsights_save_settings', 'monsterinsights_addons', 'monsterinsights_addons_page' ); |
|
64 | 64 | } |
65 | 65 | } |
66 | 66 | add_action( 'admin_menu', 'monsterinsights_admin_menu' ); |
@@ -74,12 +74,12 @@ discard block |
||
74 | 74 | // First, let's see if this is an MS network enabled plugin. If it is, we should load the license |
75 | 75 | // menu page and the updater on the network panel |
76 | 76 | if ( ! function_exists( 'is_plugin_active_for_network' ) ) { |
77 | - require_once( ABSPATH . '/wp-admin/includes/plugin.php' ); |
|
77 | + require_once( ABSPATH . '/wp-admin/includes/plugin.php' ); |
|
78 | 78 | } |
79 | 79 | |
80 | 80 | $plugin = plugin_basename( MONSTERINSIGHTS_PLUGIN_FILE ); |
81 | 81 | if ( ! is_plugin_active_for_network( $plugin ) ) { |
82 | - return; |
|
82 | + return; |
|
83 | 83 | } |
84 | 84 | |
85 | 85 | $hook = 'monsterinsights_network'; |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | function monsterinsights_add_admin_body_class( $classes ) { |
104 | 104 | $screen = get_current_screen(); |
105 | 105 | if ( empty( $screen->id ) || strpos( $screen->id, 'monsterinsights' ) === false ) { |
106 | - return $classes; |
|
106 | + return $classes; |
|
107 | 107 | } |
108 | 108 | |
109 | 109 | return "$classes monsterinsights_page "; |
@@ -123,17 +123,17 @@ discard block |
||
123 | 123 | |
124 | 124 | // If lite, show a link where they can get pro from |
125 | 125 | if ( ! monsterinsights_is_pro_version() ) { |
126 | - $get_pro = '<a title="' . esc_html__( 'Get MonsterInsights Pro', 'google-analytics-for-wordpress' ) .'" href="https://www.monsterinsights.com/lite/">' . esc_html__( 'Get MonsterInsights Pro', 'google-analytics-for-wordpress' ) . '</a>'; |
|
127 | - array_unshift( $links, $get_pro ); |
|
126 | + $get_pro = '<a title="' . esc_html__( 'Get MonsterInsights Pro', 'google-analytics-for-wordpress' ) .'" href="https://www.monsterinsights.com/lite/">' . esc_html__( 'Get MonsterInsights Pro', 'google-analytics-for-wordpress' ) . '</a>'; |
|
127 | + array_unshift( $links, $get_pro ); |
|
128 | 128 | } |
129 | 129 | |
130 | 130 | // If Lite, support goes to forum. If pro, it goes to our website |
131 | 131 | if ( monsterinsights_is_pro_version() ) { |
132 | - $support = '<a title="MonsterInsights Pro Support" href="https://www.monsterinsights.com/my-account/support/">' . esc_html__( 'Support', 'google-analytics-for-wordpress' ) . '</a>'; |
|
133 | - array_unshift( $links, $support ); |
|
132 | + $support = '<a title="MonsterInsights Pro Support" href="https://www.monsterinsights.com/my-account/support/">' . esc_html__( 'Support', 'google-analytics-for-wordpress' ) . '</a>'; |
|
133 | + array_unshift( $links, $support ); |
|
134 | 134 | } else { |
135 | - $support = '<a title="MonsterInsights Lite Support" href="https://wordpress.org/support/plugin/google-analytics-for-wordpress">' . esc_html__( 'Support', 'google-analytics-for-wordpress' ) . '</a>'; |
|
136 | - array_unshift( $links, $support ); |
|
135 | + $support = '<a title="MonsterInsights Lite Support" href="https://wordpress.org/support/plugin/google-analytics-for-wordpress">' . esc_html__( 'Support', 'google-analytics-for-wordpress' ) . '</a>'; |
|
136 | + array_unshift( $links, $support ); |
|
137 | 137 | } |
138 | 138 | |
139 | 139 | $settings_link = '<a href="' . esc_url( admin_url( 'admin.php?page=monsterinsights_settings' ) ) . '">' . esc_html__( 'Settings', 'google-analytics-for-wordpress' ) . '</a>'; |
@@ -158,26 +158,26 @@ discard block |
||
158 | 158 | function monsterinsights_load_admin_partial( $template, $data = array() ) { |
159 | 159 | |
160 | 160 | if ( monsterinsights_is_pro_version() ) { |
161 | - $dir = trailingslashit( plugin_dir_path( MonsterInsights()->file ) . 'pro/includes/admin/partials' ); |
|
161 | + $dir = trailingslashit( plugin_dir_path( MonsterInsights()->file ) . 'pro/includes/admin/partials' ); |
|
162 | 162 | |
163 | - if ( file_exists( $dir . $template . '.php' ) ) { |
|
164 | - require_once( $dir . $template . '.php' ); |
|
165 | - return true; |
|
166 | - } |
|
163 | + if ( file_exists( $dir . $template . '.php' ) ) { |
|
164 | + require_once( $dir . $template . '.php' ); |
|
165 | + return true; |
|
166 | + } |
|
167 | 167 | } else { |
168 | - $dir = trailingslashit( plugin_dir_path( MonsterInsights()->file ) . 'lite/includes/admin/partials' ); |
|
168 | + $dir = trailingslashit( plugin_dir_path( MonsterInsights()->file ) . 'lite/includes/admin/partials' ); |
|
169 | 169 | |
170 | - if ( file_exists( $dir . $template . '.php' ) ) { |
|
171 | - require_once( $dir . $template . '.php' ); |
|
172 | - return true; |
|
173 | - } |
|
170 | + if ( file_exists( $dir . $template . '.php' ) ) { |
|
171 | + require_once( $dir . $template . '.php' ); |
|
172 | + return true; |
|
173 | + } |
|
174 | 174 | } |
175 | 175 | |
176 | 176 | $dir = trailingslashit( plugin_dir_path( MonsterInsights()->file ) . 'includes/admin/partials' ); |
177 | 177 | |
178 | 178 | if ( file_exists( $dir . $template . '.php' ) ) { |
179 | - require_once( $dir . $template . '.php' ); |
|
180 | - return true; |
|
179 | + require_once( $dir . $template . '.php' ); |
|
180 | + return true; |
|
181 | 181 | } |
182 | 182 | |
183 | 183 | return false; |
@@ -193,15 +193,15 @@ discard block |
||
193 | 193 | // Get the current screen, and check whether we're viewing a MonsterInsights screen; |
194 | 194 | $screen = get_current_screen(); |
195 | 195 | if ( empty( $screen->id ) || strpos( $screen->id, 'monsterinsights' ) === false ) { |
196 | - return; |
|
196 | + return; |
|
197 | 197 | } |
198 | 198 | |
199 | 199 | // If here, we're on an MonsterInsights screen, so output the header. |
200 | 200 | monsterinsights_load_admin_partial( 'header', array( |
201 | - 'mascot' => plugins_url( 'assets/css/images/mascot.png', MonsterInsights()->file ), |
|
202 | - 'logo' => plugins_url( 'assets/css/images/logo.png', MonsterInsights()->file ), |
|
203 | - '2xmascot' => plugins_url( 'assets/css/images/[email protected]', MonsterInsights()->file ), |
|
204 | - '2xlogo' => plugins_url( 'assets/css/images/[email protected]', MonsterInsights()->file ), |
|
201 | + 'mascot' => plugins_url( 'assets/css/images/mascot.png', MonsterInsights()->file ), |
|
202 | + 'logo' => plugins_url( 'assets/css/images/logo.png', MonsterInsights()->file ), |
|
203 | + '2xmascot' => plugins_url( 'assets/css/images/[email protected]', MonsterInsights()->file ), |
|
204 | + '2xlogo' => plugins_url( 'assets/css/images/[email protected]', MonsterInsights()->file ), |
|
205 | 205 | ) ); |
206 | 206 | } |
207 | 207 | add_action( 'in_admin_header','monsterinsights_admin_header', 100 ); |
@@ -209,7 +209,7 @@ discard block |
||
209 | 209 | function monsterinsights_welcome_redirect() { |
210 | 210 | // Bail if no activation redirect |
211 | 211 | if ( ! get_transient( '_monsterinsights_activation_redirect' ) ) { |
212 | - return; |
|
212 | + return; |
|
213 | 213 | } |
214 | 214 | |
215 | 215 | // Delete the redirect transient |
@@ -217,15 +217,15 @@ discard block |
||
217 | 217 | |
218 | 218 | // Bail if activating from network, or bulk |
219 | 219 | if ( is_network_admin() || isset( $_GET['activate-multi'] ) ) { |
220 | - return; |
|
220 | + return; |
|
221 | 221 | } |
222 | 222 | |
223 | 223 | $upgrade = get_option( 'monsterinsights_version_upgraded_from' ); |
224 | 224 | if( ! $upgrade ) { // First time install |
225 | - //wp_safe_redirect( admin_url( 'admin.php?page=monsterinsights_settings#monsterinsights-main-tab-general' ) ); exit; |
|
225 | + //wp_safe_redirect( admin_url( 'admin.php?page=monsterinsights_settings#monsterinsights-main-tab-general' ) ); exit; |
|
226 | 226 | } else { // Update |
227 | - return; |
|
228 | - //wp_safe_redirect( admin_url( 'admin.php?page=monsterinsights_settings#monsterinsights-main-tab-general' ) ); exit; |
|
227 | + return; |
|
228 | + //wp_safe_redirect( admin_url( 'admin.php?page=monsterinsights_settings#monsterinsights-main-tab-general' ) ); exit; |
|
229 | 229 | } |
230 | 230 | } |
231 | 231 | //add_action( 'admin_init', 'monsterinsights_welcome_redirect', 11 ); @todo: Investigate |
@@ -241,8 +241,8 @@ 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 | - $text = sprintf( esc_html__( 'Please rate %sMonsterInsights%s %s on %sWordPress.org%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">★★★★★</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 | + $text = sprintf( esc_html__( 'Please rate %sMonsterInsights%s %s on %sWordPress.org%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">★★★★★</a>', '<a href="' . $url . '" target="_blank" rel="noopener noreferrer">', '</a>' ); |
|
246 | 246 | } |
247 | 247 | return $text; |
248 | 248 | } |
@@ -253,12 +253,12 @@ discard block |
||
253 | 253 | // Don't show on MonsterInsights pages |
254 | 254 | $screen = get_current_screen(); |
255 | 255 | if ( empty( $screen->id ) || strpos( $screen->id, 'monsterinsights' ) !== false ) { |
256 | - return; |
|
256 | + return; |
|
257 | 257 | } |
258 | 258 | |
259 | 259 | // Make sure they have the permissions to do something |
260 | 260 | if ( ! current_user_can( 'monsterinsights_save_settings' ) ) { |
261 | - return; |
|
261 | + return; |
|
262 | 262 | } |
263 | 263 | |
264 | 264 | // Priority: |
@@ -271,45 +271,45 @@ discard block |
||
271 | 271 | |
272 | 272 | // 1. Google Analytics not authenticated |
273 | 273 | if ( ! is_network_admin() && ! monsterinsights_get_ua() ) { |
274 | - $page = admin_url( 'admin.php?page=monsterinsights_settings' ); |
|
275 | - $message = sprintf( esc_html__( 'Please configure your %1$sGoogle Analytics settings%2$s!', 'google-analytics-for-wordpress' ),'<a href="' . $page . '">', '</a>' ); |
|
276 | - echo '<div class="error"><p>'. $message.'</p></div>'; |
|
277 | - return; |
|
274 | + $page = admin_url( 'admin.php?page=monsterinsights_settings' ); |
|
275 | + $message = sprintf( esc_html__( 'Please configure your %1$sGoogle Analytics settings%2$s!', 'google-analytics-for-wordpress' ),'<a href="' . $page . '">', '</a>' ); |
|
276 | + echo '<div class="error"><p>'. $message.'</p></div>'; |
|
277 | + return; |
|
278 | 278 | } |
279 | 279 | |
280 | 280 | // 2. License key not entered for pro |
281 | 281 | $key = monsterinsights_is_pro_version() ? MonsterInsights()->license->get_license_key() : ''; |
282 | 282 | if ( monsterinsights_is_pro_version() && empty( $key ) ) { |
283 | - $page = is_network_admin() ? network_admin_url( 'admin.php?page=monsterinsights_network' ) : admin_url( 'admin.php?page=monsterinsights_settings' ); |
|
284 | - $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>' ); |
|
285 | - echo '<div class="error"><p>'. $message.'</p></div>'; |
|
286 | - return; |
|
283 | + $page = is_network_admin() ? network_admin_url( 'admin.php?page=monsterinsights_network' ) : admin_url( 'admin.php?page=monsterinsights_settings' ); |
|
284 | + $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>' ); |
|
285 | + echo '<div class="error"><p>'. $message.'</p></div>'; |
|
286 | + return; |
|
287 | 287 | } |
288 | 288 | |
289 | 289 | // 3. License key not valid/okay for pro |
290 | 290 | if ( monsterinsights_is_pro_version() ) { |
291 | - $message = ''; |
|
292 | - if ( MonsterInsights()->license->get_site_license_key() ){ |
|
293 | - if ( MonsterInsights()->license->site_license_expired() ) { |
|
294 | - $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="https://www.monsterinsights.com/login/" target="_blank" rel="noopener noreferrer" referrer="no-referrer">', '</a>' ); |
|
295 | - } else if ( MonsterInsights()->license->site_license_disabled() ) { |
|
296 | - $message = esc_html__( 'Your license key for MonsterInsights has been disabled. Please use a different key.', 'google-analytics-for-wordpress' ); |
|
297 | - } else if ( MonsterInsights()->license->site_license_invalid() ) { |
|
298 | - $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' ); |
|
299 | - } |
|
300 | - } else if ( MonsterInsights()->license->get_network_license_key() ) { |
|
301 | - if ( MonsterInsights()->license->network_license_expired() ) { |
|
302 | - $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="https://www.monsterinsights.com/login/" target="_blank" rel="noopener noreferrer" referrer="no-referrer">', '</a>' ); |
|
303 | - } else if ( MonsterInsights()->license->network_license_disabled() ) { |
|
304 | - $message = esc_html__( 'Your network license key for MonsterInsights has been disabled. Please use a different key.', 'google-analytics-for-wordpress' ); |
|
305 | - } else if ( MonsterInsights()->license->network_license_invalid() ) { |
|
306 | - $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' ); |
|
307 | - } |
|
308 | - } |
|
309 | - if ( ! empty( $message ) ) { |
|
310 | - echo '<div class="error"><p>'. $message.'</p></div>'; |
|
311 | - return; |
|
312 | - } |
|
291 | + $message = ''; |
|
292 | + if ( MonsterInsights()->license->get_site_license_key() ){ |
|
293 | + if ( MonsterInsights()->license->site_license_expired() ) { |
|
294 | + $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="https://www.monsterinsights.com/login/" target="_blank" rel="noopener noreferrer" referrer="no-referrer">', '</a>' ); |
|
295 | + } else if ( MonsterInsights()->license->site_license_disabled() ) { |
|
296 | + $message = esc_html__( 'Your license key for MonsterInsights has been disabled. Please use a different key.', 'google-analytics-for-wordpress' ); |
|
297 | + } else if ( MonsterInsights()->license->site_license_invalid() ) { |
|
298 | + $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' ); |
|
299 | + } |
|
300 | + } else if ( MonsterInsights()->license->get_network_license_key() ) { |
|
301 | + if ( MonsterInsights()->license->network_license_expired() ) { |
|
302 | + $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="https://www.monsterinsights.com/login/" target="_blank" rel="noopener noreferrer" referrer="no-referrer">', '</a>' ); |
|
303 | + } else if ( MonsterInsights()->license->network_license_disabled() ) { |
|
304 | + $message = esc_html__( 'Your network license key for MonsterInsights has been disabled. Please use a different key.', 'google-analytics-for-wordpress' ); |
|
305 | + } else if ( MonsterInsights()->license->network_license_invalid() ) { |
|
306 | + $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' ); |
|
307 | + } |
|
308 | + } |
|
309 | + if ( ! empty( $message ) ) { |
|
310 | + echo '<div class="error"><p>'. $message.'</p></div>'; |
|
311 | + return; |
|
312 | + } |
|
313 | 313 | } |
314 | 314 | |
315 | 315 | // 4. Optin setting not configured |
@@ -339,7 +339,7 @@ discard block |
||
339 | 339 | |
340 | 340 | $notices = get_option( 'monsterinsights_notices' ); |
341 | 341 | if ( ! is_array( $notices ) ) { |
342 | - $notices = array(); |
|
342 | + $notices = array(); |
|
343 | 343 | } |
344 | 344 | |
345 | 345 | // 5. Authenticate, not manual |
@@ -347,12 +347,12 @@ discard block |
||
347 | 347 | $url = is_network_admin() ? network_admin_url( 'admin.php?page=monsterinsights_network' ) : admin_url( 'admin.php?page=monsterinsights_settings' ); |
348 | 348 | |
349 | 349 | if ( empty( $authed ) && ! isset( $notices['monsterinsights_auth_not_manual' ] ) ) { |
350 | - echo '<div class="notice notice-info is-dismissible monsterinsights-notice" data-notice="monsterinsights_auth_not_manual">'; |
|
351 | - echo '<p>'; |
|
352 | - echo sprintf( esc_html__( 'Important: You are currently using manual UA code output. We highly recommend %1$sauthenticating with MonsterInsights%2$s so that you can access our new reporting area and take advantage of new MonsterInsights features.', 'google-analytics-for-wordpress' ), '<a href="' . $url .'">', '</a>' ); |
|
353 | - echo '</p>'; |
|
354 | - echo '</div>'; |
|
355 | - return; |
|
350 | + echo '<div class="notice notice-info is-dismissible monsterinsights-notice" data-notice="monsterinsights_auth_not_manual">'; |
|
351 | + echo '<p>'; |
|
352 | + echo sprintf( esc_html__( 'Important: You are currently using manual UA code output. We highly recommend %1$sauthenticating with MonsterInsights%2$s so that you can access our new reporting area and take advantage of new MonsterInsights features.', 'google-analytics-for-wordpress' ), '<a href="' . $url .'">', '</a>' ); |
|
353 | + echo '</p>'; |
|
354 | + echo '</div>'; |
|
355 | + return; |
|
356 | 356 | } |
357 | 357 | |
358 | 358 | // 6. Automatic updates not configured |
@@ -372,64 +372,64 @@ discard block |
||
372 | 372 | |
373 | 373 | // 7. WooUpsell |
374 | 374 | if ( ! monsterinsights_is_pro_version() && class_exists( 'WooCommerce' ) ) { |
375 | - if ( ! isset( $notices['monsterinsights_woocommerce_tracking_available' ] ) ) { |
|
376 | - echo '<div class="notice notice-success is-dismissible monsterinsights-notice monsterinsights-wooedd-upsell-row" data-notice="monsterinsights_woocommerce_tracking_available">'; |
|
377 | - echo '<div class="monsterinsights-wooedd-upsell-left">'; |
|
378 | - echo '<p><strong>'; |
|
379 | - echo esc_html( 'Enhanced Ecommerce Analytics for Your WooCommerce Store', 'google-analytics-for-wordpress' ); |
|
380 | - echo '</strong></p>'; |
|
381 | - echo '<img class="monsterinsights-wooedd-upsell-image monsterinsights-wooedd-upsell-image-small" src="' . trailingslashit( MONSTERINSIGHTS_PLUGIN_URL ) . 'assets/images/upsell/woo-edd-upsell.png">'; |
|
382 | - echo '<p>'; |
|
383 | - echo esc_html( 'MonsterInsights Pro gives you detailed stats and insights about your customers.', 'google-analytics-for-wordpress' ); |
|
384 | - echo '</p>'; |
|
385 | - echo '<p>'; |
|
386 | - 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' ); |
|
387 | - echo '</p>'; |
|
388 | - echo '<p>'; |
|
389 | - echo esc_html( 'Pro customers also get Form Tracking, Custom Dimensions Tracking, UserID Tracking and much more.', 'google-analytics-for-wordpress' ); |
|
390 | - echo '</p>'; |
|
391 | - echo '<p>'; |
|
392 | - echo esc_html( 'Start making data-driven decisions to grow your business.', 'google-analytics-for-wordpress' ); |
|
393 | - echo '</p>'; |
|
394 | - echo sprintf( esc_html__( '%1$sGet MonsterInsights Pro%2$s', 'google-analytics-for-wordpress' ), '<a class="button button-primary button-hero" href="https://www.monsterinsights.com/lite/?utm_source=wpdashboard&utm_campaign=woocommercelite">', ' »</a>' ); |
|
395 | - echo '</p>'; |
|
396 | - echo '</div><div class="monsterinsights-wooedd-upsell-right">'; |
|
397 | - echo '<img class="monsterinsights-wooedd-upsell-image monsterinsights-wooedd-upsell-image-large" src="' . trailingslashit( MONSTERINSIGHTS_PLUGIN_URL ) . 'assets/images/upsell/woo-edd-upsell.png">'; |
|
398 | - echo '</div>'; |
|
399 | - echo '</div>'; |
|
400 | - return; |
|
401 | - } |
|
375 | + if ( ! isset( $notices['monsterinsights_woocommerce_tracking_available' ] ) ) { |
|
376 | + echo '<div class="notice notice-success is-dismissible monsterinsights-notice monsterinsights-wooedd-upsell-row" data-notice="monsterinsights_woocommerce_tracking_available">'; |
|
377 | + echo '<div class="monsterinsights-wooedd-upsell-left">'; |
|
378 | + echo '<p><strong>'; |
|
379 | + echo esc_html( 'Enhanced Ecommerce Analytics for Your WooCommerce Store', 'google-analytics-for-wordpress' ); |
|
380 | + echo '</strong></p>'; |
|
381 | + echo '<img class="monsterinsights-wooedd-upsell-image monsterinsights-wooedd-upsell-image-small" src="' . trailingslashit( MONSTERINSIGHTS_PLUGIN_URL ) . 'assets/images/upsell/woo-edd-upsell.png">'; |
|
382 | + echo '<p>'; |
|
383 | + echo esc_html( 'MonsterInsights Pro gives you detailed stats and insights about your customers.', 'google-analytics-for-wordpress' ); |
|
384 | + echo '</p>'; |
|
385 | + echo '<p>'; |
|
386 | + 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' ); |
|
387 | + echo '</p>'; |
|
388 | + echo '<p>'; |
|
389 | + echo esc_html( 'Pro customers also get Form Tracking, Custom Dimensions Tracking, UserID Tracking and much more.', 'google-analytics-for-wordpress' ); |
|
390 | + echo '</p>'; |
|
391 | + echo '<p>'; |
|
392 | + echo esc_html( 'Start making data-driven decisions to grow your business.', 'google-analytics-for-wordpress' ); |
|
393 | + echo '</p>'; |
|
394 | + echo sprintf( esc_html__( '%1$sGet MonsterInsights Pro%2$s', 'google-analytics-for-wordpress' ), '<a class="button button-primary button-hero" href="https://www.monsterinsights.com/lite/?utm_source=wpdashboard&utm_campaign=woocommercelite">', ' »</a>' ); |
|
395 | + echo '</p>'; |
|
396 | + echo '</div><div class="monsterinsights-wooedd-upsell-right">'; |
|
397 | + echo '<img class="monsterinsights-wooedd-upsell-image monsterinsights-wooedd-upsell-image-large" src="' . trailingslashit( MONSTERINSIGHTS_PLUGIN_URL ) . 'assets/images/upsell/woo-edd-upsell.png">'; |
|
398 | + echo '</div>'; |
|
399 | + echo '</div>'; |
|
400 | + return; |
|
401 | + } |
|
402 | 402 | } |
403 | 403 | |
404 | 404 | // 8. EDDUpsell |
405 | 405 | if ( ! monsterinsights_is_pro_version() && class_exists( 'Easy_Digital_Downloads' ) ) { |
406 | - if ( ! isset( $notices['monsterinsights_edd_tracking_available' ] ) ) { |
|
407 | - echo '<div class="notice notice-success is-dismissible monsterinsights-notice monsterinsights-wooedd-upsell-row" data-notice="monsterinsights_edd_tracking_available">'; |
|
408 | - echo '<div class="monsterinsights-wooedd-upsell-left">'; |
|
409 | - echo '<p><strong>'; |
|
410 | - echo esc_html( 'Enhanced Ecommerce Analytics for Your Easy Digital Downloads Store', 'google-analytics-for-wordpress' ); |
|
411 | - echo '</strong></p>'; |
|
412 | - echo '<img class="monsterinsights-wooedd-upsell-image monsterinsights-wooedd-upsell-image-small" src="' . trailingslashit( MONSTERINSIGHTS_PLUGIN_URL ) . 'assets/images/upsell/woo-edd-upsell.png">'; |
|
413 | - echo '<p>'; |
|
414 | - echo esc_html( 'MonsterInsights Pro gives you detailed stats and insights about your customers.', 'google-analytics-for-wordpress' ); |
|
415 | - echo '</p>'; |
|
416 | - echo '<p>'; |
|
417 | - 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' ); |
|
418 | - echo '</p>'; |
|
419 | - echo '<p>'; |
|
420 | - echo esc_html( 'Pro customers also get Form Tracking, Custom Dimensions Tracking, UserID Tracking and much more.', 'google-analytics-for-wordpress' ); |
|
421 | - echo '</p>'; |
|
422 | - echo '<p>'; |
|
423 | - echo esc_html( 'Start making data-driven decisions to grow your business.', 'google-analytics-for-wordpress' ); |
|
424 | - echo '</p>'; |
|
425 | - echo sprintf( esc_html__( '%1$sGet MonsterInsights Pro%2$s', 'google-analytics-for-wordpress' ), '<a class="button button-primary button-hero" href="https://www.monsterinsights.com/lite/?utm_source=wpdashboard&utm_campaign=eddlite">', ' »</a>' ); |
|
426 | - echo '</p>'; |
|
427 | - echo '</div><div class="monsterinsights-wooedd-upsell-right">'; |
|
428 | - echo '<img class="monsterinsights-wooedd-upsell-image monsterinsights-wooedd-upsell-image-large" src="' . trailingslashit( MONSTERINSIGHTS_PLUGIN_URL ) . 'assets/images/upsell/woo-edd-upsell.png">'; |
|
429 | - echo '</div>'; |
|
430 | - echo '</div>'; |
|
431 | - return; |
|
432 | - } |
|
406 | + if ( ! isset( $notices['monsterinsights_edd_tracking_available' ] ) ) { |
|
407 | + echo '<div class="notice notice-success is-dismissible monsterinsights-notice monsterinsights-wooedd-upsell-row" data-notice="monsterinsights_edd_tracking_available">'; |
|
408 | + echo '<div class="monsterinsights-wooedd-upsell-left">'; |
|
409 | + echo '<p><strong>'; |
|
410 | + echo esc_html( 'Enhanced Ecommerce Analytics for Your Easy Digital Downloads Store', 'google-analytics-for-wordpress' ); |
|
411 | + echo '</strong></p>'; |
|
412 | + echo '<img class="monsterinsights-wooedd-upsell-image monsterinsights-wooedd-upsell-image-small" src="' . trailingslashit( MONSTERINSIGHTS_PLUGIN_URL ) . 'assets/images/upsell/woo-edd-upsell.png">'; |
|
413 | + echo '<p>'; |
|
414 | + echo esc_html( 'MonsterInsights Pro gives you detailed stats and insights about your customers.', 'google-analytics-for-wordpress' ); |
|
415 | + echo '</p>'; |
|
416 | + echo '<p>'; |
|
417 | + 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' ); |
|
418 | + echo '</p>'; |
|
419 | + echo '<p>'; |
|
420 | + echo esc_html( 'Pro customers also get Form Tracking, Custom Dimensions Tracking, UserID Tracking and much more.', 'google-analytics-for-wordpress' ); |
|
421 | + echo '</p>'; |
|
422 | + echo '<p>'; |
|
423 | + echo esc_html( 'Start making data-driven decisions to grow your business.', 'google-analytics-for-wordpress' ); |
|
424 | + echo '</p>'; |
|
425 | + echo sprintf( esc_html__( '%1$sGet MonsterInsights Pro%2$s', 'google-analytics-for-wordpress' ), '<a class="button button-primary button-hero" href="https://www.monsterinsights.com/lite/?utm_source=wpdashboard&utm_campaign=eddlite">', ' »</a>' ); |
|
426 | + echo '</p>'; |
|
427 | + echo '</div><div class="monsterinsights-wooedd-upsell-right">'; |
|
428 | + echo '<img class="monsterinsights-wooedd-upsell-image monsterinsights-wooedd-upsell-image-large" src="' . trailingslashit( MONSTERINSIGHTS_PLUGIN_URL ) . 'assets/images/upsell/woo-edd-upsell.png">'; |
|
429 | + echo '</div>'; |
|
430 | + echo '</div>'; |
|
431 | + return; |
|
432 | + } |
|
433 | 433 | } |
434 | 434 | } |
435 | 435 | add_action( 'admin_notices', 'monsterinsights_admin_setup_notices' ); |
@@ -34,14 +34,14 @@ discard block |
||
34 | 34 | |
35 | 35 | if ( $dashboards_disabled || ! $is_authed || ( current_user_can( 'monsterinsights_save_settings' ) && ! current_user_can( 'monsterinsights_view_dashboard' ) ) ) { |
36 | 36 | // If dashboards disabled, first settings page |
37 | - add_menu_page( __( 'Settings:', 'google-analytics-for-wordpress' ), __( 'Insights', 'google-analytics-for-wordpress' ), 'monsterinsights_save_settings', 'monsterinsights_settings', 'monsterinsights_settings_page', plugins_url( 'assets/css/images/[email protected]', $base->file ), '100.00013467543' ); |
|
37 | + add_menu_page( __( 'Settings:', 'google-analytics-for-wordpress' ), __( 'Insights', 'google-analytics-for-wordpress' ), 'monsterinsights_save_settings', 'monsterinsights_settings', 'monsterinsights_settings_page', plugins_url( 'assets/css/images/[email protected]', $base->file ), '100.00013467543' ); |
|
38 | 38 | $hook = 'monsterinsights_settings'; |
39 | 39 | |
40 | 40 | add_submenu_page( $hook, __( 'Settings:', 'google-analytics-for-wordpress' ), __( 'Settings', 'google-analytics-for-wordpress' ), 'monsterinsights_save_settings', 'monsterinsights_settings' ); |
41 | 41 | add_submenu_page( $hook, __( 'Settings - Tracking:', 'google-analytics-for-wordpress' ), __( 'Settings - Tracking', 'google-analytics-for-wordpress' ), 'monsterinsights_save_settings', 'monsterinsights_tracking', 'monsterinsights_tracking_page' ); |
42 | 42 | } else { |
43 | 43 | // if dashboards enabled, first dashboard |
44 | - add_menu_page( __( 'General:', 'google-analytics-for-wordpress' ), __( 'Insights', 'google-analytics-for-wordpress' ), 'monsterinsights_view_dashboard', 'monsterinsights_reports', 'monsterinsights_reports_page', plugins_url( 'assets/css/images/[email protected]', $base->file ), '100.00013467543' ); |
|
44 | + add_menu_page( __( 'General:', 'google-analytics-for-wordpress' ), __( 'Insights', 'google-analytics-for-wordpress' ), 'monsterinsights_view_dashboard', 'monsterinsights_reports', 'monsterinsights_reports_page', plugins_url( 'assets/css/images/[email protected]', $base->file ), '100.00013467543' ); |
|
45 | 45 | |
46 | 46 | $hook = 'monsterinsights_reports'; |
47 | 47 | |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | } |
84 | 84 | |
85 | 85 | $hook = 'monsterinsights_network'; |
86 | - add_menu_page( __( 'Network Settings:', 'google-analytics-for-wordpress' ), __( 'Insights', 'google-analytics-for-wordpress' ), 'monsterinsights_save_settings', 'monsterinsights_network', 'monsterinsights_network_page', plugins_url( 'assets/css/images/[email protected]', $base->file ), '100.00013467543' ); |
|
86 | + add_menu_page( __( 'Network Settings:', 'google-analytics-for-wordpress' ), __( 'Insights', 'google-analytics-for-wordpress' ), 'monsterinsights_save_settings', 'monsterinsights_network', 'monsterinsights_network_page', plugins_url( 'assets/css/images/[email protected]', $base->file ), '100.00013467543' ); |
|
87 | 87 | |
88 | 88 | add_submenu_page( $hook, __( 'Network Settings:', 'google-analytics-for-wordpress' ), __( 'Network Settings', 'google-analytics-for-wordpress' ), 'monsterinsights_save_settings', 'monsterinsights_network', 'monsterinsights_network_page' ); |
89 | 89 | |
@@ -123,7 +123,7 @@ discard block |
||
123 | 123 | |
124 | 124 | // If lite, show a link where they can get pro from |
125 | 125 | if ( ! monsterinsights_is_pro_version() ) { |
126 | - $get_pro = '<a title="' . esc_html__( 'Get MonsterInsights Pro', 'google-analytics-for-wordpress' ) .'" href="https://www.monsterinsights.com/lite/">' . esc_html__( 'Get MonsterInsights Pro', 'google-analytics-for-wordpress' ) . '</a>'; |
|
126 | + $get_pro = '<a title="' . esc_html__( 'Get MonsterInsights Pro', 'google-analytics-for-wordpress' ) . '" href="https://www.monsterinsights.com/lite/">' . esc_html__( 'Get MonsterInsights Pro', 'google-analytics-for-wordpress' ) . '</a>'; |
|
127 | 127 | array_unshift( $links, $get_pro ); |
128 | 128 | } |
129 | 129 | |
@@ -161,14 +161,14 @@ discard block |
||
161 | 161 | $dir = trailingslashit( plugin_dir_path( MonsterInsights()->file ) . 'pro/includes/admin/partials' ); |
162 | 162 | |
163 | 163 | if ( file_exists( $dir . $template . '.php' ) ) { |
164 | - require_once( $dir . $template . '.php' ); |
|
164 | + require_once( $dir . $template . '.php' ); |
|
165 | 165 | return true; |
166 | 166 | } |
167 | 167 | } else { |
168 | 168 | $dir = trailingslashit( plugin_dir_path( MonsterInsights()->file ) . 'lite/includes/admin/partials' ); |
169 | 169 | |
170 | 170 | if ( file_exists( $dir . $template . '.php' ) ) { |
171 | - require_once( $dir . $template . '.php' ); |
|
171 | + require_once( $dir . $template . '.php' ); |
|
172 | 172 | return true; |
173 | 173 | } |
174 | 174 | } |
@@ -176,7 +176,7 @@ discard block |
||
176 | 176 | $dir = trailingslashit( plugin_dir_path( MonsterInsights()->file ) . 'includes/admin/partials' ); |
177 | 177 | |
178 | 178 | if ( file_exists( $dir . $template . '.php' ) ) { |
179 | - require_once( $dir . $template . '.php' ); |
|
179 | + require_once( $dir . $template . '.php' ); |
|
180 | 180 | return true; |
181 | 181 | } |
182 | 182 | |
@@ -204,7 +204,7 @@ discard block |
||
204 | 204 | '2xlogo' => plugins_url( 'assets/css/images/[email protected]', MonsterInsights()->file ), |
205 | 205 | ) ); |
206 | 206 | } |
207 | -add_action( 'in_admin_header','monsterinsights_admin_header', 100 ); |
|
207 | +add_action( 'in_admin_header', 'monsterinsights_admin_header', 100 ); |
|
208 | 208 | |
209 | 209 | function monsterinsights_welcome_redirect() { |
210 | 210 | // Bail if no activation redirect |
@@ -221,7 +221,7 @@ discard block |
||
221 | 221 | } |
222 | 222 | |
223 | 223 | $upgrade = get_option( 'monsterinsights_version_upgraded_from' ); |
224 | - if( ! $upgrade ) { // First time install |
|
224 | + if ( ! $upgrade ) { // First time install |
|
225 | 225 | //wp_safe_redirect( admin_url( 'admin.php?page=monsterinsights_settings#monsterinsights-main-tab-general' ) ); exit; |
226 | 226 | } else { // Update |
227 | 227 | return; |
@@ -242,7 +242,7 @@ discard block |
||
242 | 242 | global $current_screen; |
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 | - $text = sprintf( esc_html__( 'Please rate %sMonsterInsights%s %s on %sWordPress.org%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">★★★★★</a>', '<a href="' . $url . '" target="_blank" rel="noopener noreferrer">', '</a>' ); |
|
245 | + $text = sprintf( esc_html__( 'Please rate %sMonsterInsights%s %s on %sWordPress.org%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">★★★★★</a>', '<a href="' . $url . '" target="_blank" rel="noopener noreferrer">', '</a>' ); |
|
246 | 246 | } |
247 | 247 | return $text; |
248 | 248 | } |
@@ -272,8 +272,8 @@ discard block |
||
272 | 272 | // 1. Google Analytics not authenticated |
273 | 273 | if ( ! is_network_admin() && ! monsterinsights_get_ua() ) { |
274 | 274 | $page = admin_url( 'admin.php?page=monsterinsights_settings' ); |
275 | - $message = sprintf( esc_html__( 'Please configure your %1$sGoogle Analytics settings%2$s!', 'google-analytics-for-wordpress' ),'<a href="' . $page . '">', '</a>' ); |
|
276 | - echo '<div class="error"><p>'. $message.'</p></div>'; |
|
275 | + $message = sprintf( esc_html__( 'Please configure your %1$sGoogle Analytics settings%2$s!', 'google-analytics-for-wordpress' ), '<a href="' . $page . '">', '</a>' ); |
|
276 | + echo '<div class="error"><p>' . $message . '</p></div>'; |
|
277 | 277 | return; |
278 | 278 | } |
279 | 279 | |
@@ -281,15 +281,15 @@ discard block |
||
281 | 281 | $key = monsterinsights_is_pro_version() ? MonsterInsights()->license->get_license_key() : ''; |
282 | 282 | if ( monsterinsights_is_pro_version() && empty( $key ) ) { |
283 | 283 | $page = is_network_admin() ? network_admin_url( 'admin.php?page=monsterinsights_network' ) : admin_url( 'admin.php?page=monsterinsights_settings' ); |
284 | - $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>' ); |
|
285 | - echo '<div class="error"><p>'. $message.'</p></div>'; |
|
284 | + $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>' ); |
|
285 | + echo '<div class="error"><p>' . $message . '</p></div>'; |
|
286 | 286 | return; |
287 | 287 | } |
288 | 288 | |
289 | 289 | // 3. License key not valid/okay for pro |
290 | 290 | if ( monsterinsights_is_pro_version() ) { |
291 | 291 | $message = ''; |
292 | - if ( MonsterInsights()->license->get_site_license_key() ){ |
|
292 | + if ( MonsterInsights()->license->get_site_license_key() ) { |
|
293 | 293 | if ( MonsterInsights()->license->site_license_expired() ) { |
294 | 294 | $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="https://www.monsterinsights.com/login/" target="_blank" rel="noopener noreferrer" referrer="no-referrer">', '</a>' ); |
295 | 295 | } else if ( MonsterInsights()->license->site_license_disabled() ) { |
@@ -307,7 +307,7 @@ discard block |
||
307 | 307 | } |
308 | 308 | } |
309 | 309 | if ( ! empty( $message ) ) { |
310 | - echo '<div class="error"><p>'. $message.'</p></div>'; |
|
310 | + echo '<div class="error"><p>' . $message . '</p></div>'; |
|
311 | 311 | return; |
312 | 312 | } |
313 | 313 | } |
@@ -337,7 +337,7 @@ discard block |
||
337 | 337 | // } |
338 | 338 | // } |
339 | 339 | |
340 | - $notices = get_option( 'monsterinsights_notices' ); |
|
340 | + $notices = get_option( 'monsterinsights_notices' ); |
|
341 | 341 | if ( ! is_array( $notices ) ) { |
342 | 342 | $notices = array(); |
343 | 343 | } |
@@ -346,10 +346,10 @@ discard block |
||
346 | 346 | $authed = MonsterInsights()->auth->is_authed() || MonsterInsights()->auth->is_network_authed(); |
347 | 347 | $url = is_network_admin() ? network_admin_url( 'admin.php?page=monsterinsights_network' ) : admin_url( 'admin.php?page=monsterinsights_settings' ); |
348 | 348 | |
349 | - if ( empty( $authed ) && ! isset( $notices['monsterinsights_auth_not_manual' ] ) ) { |
|
349 | + if ( empty( $authed ) && ! isset( $notices['monsterinsights_auth_not_manual'] ) ) { |
|
350 | 350 | echo '<div class="notice notice-info is-dismissible monsterinsights-notice" data-notice="monsterinsights_auth_not_manual">'; |
351 | 351 | echo '<p>'; |
352 | - echo sprintf( esc_html__( 'Important: You are currently using manual UA code output. We highly recommend %1$sauthenticating with MonsterInsights%2$s so that you can access our new reporting area and take advantage of new MonsterInsights features.', 'google-analytics-for-wordpress' ), '<a href="' . $url .'">', '</a>' ); |
|
352 | + echo sprintf( esc_html__( 'Important: You are currently using manual UA code output. We highly recommend %1$sauthenticating with MonsterInsights%2$s so that you can access our new reporting area and take advantage of new MonsterInsights features.', 'google-analytics-for-wordpress' ), '<a href="' . $url . '">', '</a>' ); |
|
353 | 353 | echo '</p>'; |
354 | 354 | echo '</div>'; |
355 | 355 | return; |
@@ -372,7 +372,7 @@ discard block |
||
372 | 372 | |
373 | 373 | // 7. WooUpsell |
374 | 374 | if ( ! monsterinsights_is_pro_version() && class_exists( 'WooCommerce' ) ) { |
375 | - if ( ! isset( $notices['monsterinsights_woocommerce_tracking_available' ] ) ) { |
|
375 | + if ( ! isset( $notices['monsterinsights_woocommerce_tracking_available'] ) ) { |
|
376 | 376 | echo '<div class="notice notice-success is-dismissible monsterinsights-notice monsterinsights-wooedd-upsell-row" data-notice="monsterinsights_woocommerce_tracking_available">'; |
377 | 377 | echo '<div class="monsterinsights-wooedd-upsell-left">'; |
378 | 378 | echo '<p><strong>'; |
@@ -403,7 +403,7 @@ discard block |
||
403 | 403 | |
404 | 404 | // 8. EDDUpsell |
405 | 405 | if ( ! monsterinsights_is_pro_version() && class_exists( 'Easy_Digital_Downloads' ) ) { |
406 | - if ( ! isset( $notices['monsterinsights_edd_tracking_available' ] ) ) { |
|
406 | + if ( ! isset( $notices['monsterinsights_edd_tracking_available'] ) ) { |
|
407 | 407 | echo '<div class="notice notice-success is-dismissible monsterinsights-notice monsterinsights-wooedd-upsell-row" data-notice="monsterinsights_edd_tracking_available">'; |
408 | 408 | echo '<div class="monsterinsights-wooedd-upsell-left">'; |
409 | 409 | echo '<p><strong>'; |
@@ -221,9 +221,11 @@ discard block |
||
221 | 221 | } |
222 | 222 | |
223 | 223 | $upgrade = get_option( 'monsterinsights_version_upgraded_from' ); |
224 | - if( ! $upgrade ) { // First time install |
|
224 | + if( ! $upgrade ) { |
|
225 | +// First time install |
|
225 | 226 | //wp_safe_redirect( admin_url( 'admin.php?page=monsterinsights_settings#monsterinsights-main-tab-general' ) ); exit; |
226 | - } else { // Update |
|
227 | + } else { |
|
228 | +// Update |
|
227 | 229 | return; |
228 | 230 | //wp_safe_redirect( admin_url( 'admin.php?page=monsterinsights_settings#monsterinsights-main-tab-general' ) ); exit; |
229 | 231 | } |
@@ -289,7 +291,7 @@ discard block |
||
289 | 291 | // 3. License key not valid/okay for pro |
290 | 292 | if ( monsterinsights_is_pro_version() ) { |
291 | 293 | $message = ''; |
292 | - if ( MonsterInsights()->license->get_site_license_key() ){ |
|
294 | + if ( MonsterInsights()->license->get_site_license_key() ) { |
|
293 | 295 | if ( MonsterInsights()->license->site_license_expired() ) { |
294 | 296 | $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="https://www.monsterinsights.com/login/" target="_blank" rel="noopener noreferrer" referrer="no-referrer">', '</a>' ); |
295 | 297 | } else if ( MonsterInsights()->license->site_license_disabled() ) { |
@@ -346,7 +348,7 @@ discard block |
||
346 | 348 | $authed = MonsterInsights()->auth->is_authed() || MonsterInsights()->auth->is_network_authed(); |
347 | 349 | $url = is_network_admin() ? network_admin_url( 'admin.php?page=monsterinsights_network' ) : admin_url( 'admin.php?page=monsterinsights_settings' ); |
348 | 350 | |
349 | - if ( empty( $authed ) && ! isset( $notices['monsterinsights_auth_not_manual' ] ) ) { |
|
351 | + if ( empty( $authed ) && ! isset( $notices['monsterinsights_auth_not_manual' ] ) ) { |
|
350 | 352 | echo '<div class="notice notice-info is-dismissible monsterinsights-notice" data-notice="monsterinsights_auth_not_manual">'; |
351 | 353 | echo '<p>'; |
352 | 354 | echo sprintf( esc_html__( 'Important: You are currently using manual UA code output. We highly recommend %1$sauthenticating with MonsterInsights%2$s so that you can access our new reporting area and take advantage of new MonsterInsights features.', 'google-analytics-for-wordpress' ), '<a href="' . $url .'">', '</a>' ); |
@@ -372,7 +374,7 @@ discard block |
||
372 | 374 | |
373 | 375 | // 7. WooUpsell |
374 | 376 | if ( ! monsterinsights_is_pro_version() && class_exists( 'WooCommerce' ) ) { |
375 | - if ( ! isset( $notices['monsterinsights_woocommerce_tracking_available' ] ) ) { |
|
377 | + if ( ! isset( $notices['monsterinsights_woocommerce_tracking_available' ] ) ) { |
|
376 | 378 | echo '<div class="notice notice-success is-dismissible monsterinsights-notice monsterinsights-wooedd-upsell-row" data-notice="monsterinsights_woocommerce_tracking_available">'; |
377 | 379 | echo '<div class="monsterinsights-wooedd-upsell-left">'; |
378 | 380 | echo '<p><strong>'; |
@@ -403,7 +405,7 @@ discard block |
||
403 | 405 | |
404 | 406 | // 8. EDDUpsell |
405 | 407 | if ( ! monsterinsights_is_pro_version() && class_exists( 'Easy_Digital_Downloads' ) ) { |
406 | - if ( ! isset( $notices['monsterinsights_edd_tracking_available' ] ) ) { |
|
408 | + if ( ! isset( $notices['monsterinsights_edd_tracking_available' ] ) ) { |
|
407 | 409 | echo '<div class="notice notice-success is-dismissible monsterinsights-notice monsterinsights-wooedd-upsell-row" data-notice="monsterinsights_edd_tracking_available">'; |
408 | 410 | echo '<div class="monsterinsights-wooedd-upsell-left">'; |
409 | 411 | echo '<p><strong>'; |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | $data['usercount'] = function_exists( 'get_user_count' ) ? get_user_count() : 'Not Set'; |
84 | 84 | |
85 | 85 | // Retrieve current plugin information |
86 | - if( ! function_exists( 'get_plugins' ) ) { |
|
86 | + if ( ! function_exists( 'get_plugins' ) ) { |
|
87 | 87 | include ABSPATH . '/wp-admin/includes/plugin.php'; |
88 | 88 | } |
89 | 89 | |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | foreach ( $plugins as $key => $plugin ) { |
94 | 94 | if ( in_array( $plugin, $active_plugins ) ) { |
95 | 95 | // Remove active plugins from list so we can show active and inactive separately |
96 | - unset( $plugins[ $key ] ); |
|
96 | + unset( $plugins[$key] ); |
|
97 | 97 | } |
98 | 98 | } |
99 | 99 | |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | return false; |
112 | 112 | } |
113 | 113 | |
114 | - if( ! $this->tracking_allowed() && ! $override ) { |
|
114 | + if ( ! $this->tracking_allowed() && ! $override ) { |
|
115 | 115 | return false; |
116 | 116 | } |
117 | 117 | |
@@ -143,15 +143,15 @@ discard block |
||
143 | 143 | public function schedule_send() { |
144 | 144 | if ( ! wp_next_scheduled( 'monsterinsights_usage_tracking_cron' ) ) { |
145 | 145 | $tracking = array(); |
146 | - $tracking['day'] = rand( 0, 6 ); |
|
146 | + $tracking['day'] = rand( 0, 6 ); |
|
147 | 147 | $tracking['hour'] = rand( 0, 23 ); |
148 | 148 | $tracking['minute'] = rand( 0, 59 ); |
149 | 149 | $tracking['second'] = rand( 0, 59 ); |
150 | - $tracking['offset'] = ( $tracking['day'] * DAY_IN_SECONDS ) + |
|
151 | - ( $tracking['hour'] * HOUR_IN_SECONDS ) + |
|
150 | + $tracking['offset'] = ( $tracking['day'] * DAY_IN_SECONDS ) + |
|
151 | + ( $tracking['hour'] * HOUR_IN_SECONDS ) + |
|
152 | 152 | ( $tracking['minute'] * MINUTE_IN_SECONDS ) + |
153 | 153 | $tracking['second']; |
154 | - $tracking['initsend'] = strtotime("next sunday") + $tracking['offset']; |
|
154 | + $tracking['initsend'] = strtotime( "next sunday" ) + $tracking['offset']; |
|
155 | 155 | |
156 | 156 | wp_schedule_event( $tracking['initsend'], 'weekly', 'monsterinsights_usage_tracking_cron' ); |
157 | 157 | update_option( 'monsterinsights_usage_tracking_config', $tracking ); |