|
@@ -27,22 +27,22 @@ discard block |
|
|
block discarded – undo |
27
|
27
|
$menu_icon_inline = monsterinsights_get_inline_menu_icon(); |
28
|
28
|
|
29
|
29
|
if ( $hook === 'monsterinsights_settings' ) { |
30
|
|
- // If dashboards disabled, first settings page |
31
|
|
- add_menu_page( __( 'MonsterInsights', 'google-analytics-for-wordpress' ), __( 'Insights', 'google-analytics-for-wordpress' ) . MonsterInsights()->notifications->get_menu_count(), 'monsterinsights_save_settings', 'monsterinsights_settings', 'monsterinsights_settings_page', $menu_icon_inline, '100.00013467543' ); |
32
|
|
- $hook = 'monsterinsights_settings'; |
|
30
|
+ // If dashboards disabled, first settings page |
|
31
|
+ add_menu_page( __( 'MonsterInsights', 'google-analytics-for-wordpress' ), __( 'Insights', 'google-analytics-for-wordpress' ) . MonsterInsights()->notifications->get_menu_count(), 'monsterinsights_save_settings', 'monsterinsights_settings', 'monsterinsights_settings_page', $menu_icon_inline, '100.00013467543' ); |
|
32
|
+ $hook = 'monsterinsights_settings'; |
33
|
33
|
|
34
|
|
- add_submenu_page( $hook, __( 'MonsterInsights', 'google-analytics-for-wordpress' ), __( 'Settings', 'google-analytics-for-wordpress' ), 'monsterinsights_save_settings', 'monsterinsights_settings' ); |
|
34
|
+ add_submenu_page( $hook, __( 'MonsterInsights', 'google-analytics-for-wordpress' ), __( 'Settings', 'google-analytics-for-wordpress' ), 'monsterinsights_save_settings', 'monsterinsights_settings' ); |
35
|
35
|
} else { |
36
|
|
- // if dashboards enabled, first dashboard |
37
|
|
- add_menu_page( __( 'General:', 'google-analytics-for-wordpress' ), __( 'Insights', 'google-analytics-for-wordpress' ) . MonsterInsights()->notifications->get_menu_count(), 'monsterinsights_view_dashboard', 'monsterinsights_reports', 'monsterinsights_reports_page', $menu_icon_inline, '100.00013467543' ); |
|
36
|
+ // if dashboards enabled, first dashboard |
|
37
|
+ add_menu_page( __( 'General:', 'google-analytics-for-wordpress' ), __( 'Insights', 'google-analytics-for-wordpress' ) . MonsterInsights()->notifications->get_menu_count(), 'monsterinsights_view_dashboard', 'monsterinsights_reports', 'monsterinsights_reports_page', $menu_icon_inline, '100.00013467543' ); |
38
|
38
|
|
39
|
|
- add_submenu_page( $hook, __( 'General Reports:', 'google-analytics-for-wordpress' ), __( 'Reports', 'google-analytics-for-wordpress' ), 'monsterinsights_view_dashboard', 'monsterinsights_reports', 'monsterinsights_reports_page' ); |
|
39
|
+ add_submenu_page( $hook, __( 'General Reports:', 'google-analytics-for-wordpress' ), __( 'Reports', 'google-analytics-for-wordpress' ), 'monsterinsights_view_dashboard', 'monsterinsights_reports', 'monsterinsights_reports_page' ); |
40
|
40
|
|
41
|
|
- // then settings page |
42
|
|
- add_submenu_page( $hook, __( 'MonsterInsights', 'google-analytics-for-wordpress' ), __( 'Settings', 'google-analytics-for-wordpress' ), 'monsterinsights_save_settings', 'monsterinsights_settings', 'monsterinsights_settings_page' ); |
|
41
|
+ // then settings page |
|
42
|
+ add_submenu_page( $hook, __( 'MonsterInsights', 'google-analytics-for-wordpress' ), __( 'Settings', 'google-analytics-for-wordpress' ), 'monsterinsights_save_settings', 'monsterinsights_settings', 'monsterinsights_settings_page' ); |
43
|
43
|
|
44
|
|
- // Add dashboard submenu. |
45
|
|
- add_submenu_page( 'index.php', __( 'General Reports:', 'google-analytics-for-wordpress' ), __( 'Insights', 'google-analytics-for-wordpress' ), 'monsterinsights_view_dashboard', 'admin.php?page=monsterinsights_reports' ); |
|
44
|
+ // Add dashboard submenu. |
|
45
|
+ add_submenu_page( 'index.php', __( 'General Reports:', 'google-analytics-for-wordpress' ), __( 'Insights', 'google-analytics-for-wordpress' ), 'monsterinsights_view_dashboard', 'admin.php?page=monsterinsights_reports' ); |
46
|
46
|
} |
47
|
47
|
|
48
|
48
|
$submenu_base = add_query_arg( 'page', 'monsterinsights_settings', admin_url( 'admin.php' ) ); |
|
@@ -53,7 +53,7 @@ discard block |
|
|
block discarded – undo |
53
|
53
|
// then addons |
54
|
54
|
$network_key = monsterinsights_is_pro_version() ? MonsterInsights()->license->get_network_license_key() : ''; |
55
|
55
|
if ( ! monsterinsights_is_network_active() || ( monsterinsights_is_network_active() && empty( $network_key ) ) ) { |
56
|
|
- add_submenu_page( $hook, __( 'Addons:', 'google-analytics-for-wordpress' ), '<span style="color:' . monsterinsights_menu_highlight_color() . '"> ' . __( 'Addons', 'google-analytics-for-wordpress' ) . '</span>', 'monsterinsights_save_settings', $submenu_base . '#/addons' ); |
|
56
|
+ add_submenu_page( $hook, __( 'Addons:', 'google-analytics-for-wordpress' ), '<span style="color:' . monsterinsights_menu_highlight_color() . '"> ' . __( 'Addons', 'google-analytics-for-wordpress' ) . '</span>', 'monsterinsights_save_settings', $submenu_base . '#/addons' ); |
57
|
57
|
} |
58
|
58
|
|
59
|
59
|
// Add About us page. |
|
@@ -64,9 +64,9 @@ discard block |
|
|
block discarded – undo |
64
|
64
|
function monsterinsights_get_menu_hook() { |
65
|
65
|
$dashboards_disabled = monsterinsights_get_option( 'dashboards_disabled', false ); |
66
|
66
|
if ( $dashboards_disabled || ( current_user_can( 'monsterinsights_save_settings' ) && ! current_user_can( 'monsterinsights_view_dashboard' ) ) ) { |
67
|
|
- return 'monsterinsights_settings'; |
|
67
|
+ return 'monsterinsights_settings'; |
68
|
68
|
} else { |
69
|
|
- return 'monsterinsights_reports'; |
|
69
|
+ return 'monsterinsights_reports'; |
70
|
70
|
} |
71
|
71
|
} |
72
|
72
|
|
|
@@ -77,12 +77,12 @@ discard block |
|
|
block discarded – undo |
77
|
77
|
// First, let's see if this is an MS network enabled plugin. If it is, we should load the license |
78
|
78
|
// menu page and the updater on the network panel |
79
|
79
|
if ( ! function_exists( 'is_plugin_active_for_network' ) ) { |
80
|
|
- require_once( ABSPATH . '/wp-admin/includes/plugin.php' ); |
|
80
|
+ require_once( ABSPATH . '/wp-admin/includes/plugin.php' ); |
81
|
81
|
} |
82
|
82
|
|
83
|
83
|
$plugin = plugin_basename( MONSTERINSIGHTS_PLUGIN_FILE ); |
84
|
84
|
if ( ! is_plugin_active_for_network( $plugin ) ) { |
85
|
|
- return; |
|
85
|
+ return; |
86
|
86
|
} |
87
|
87
|
|
88
|
88
|
$menu_icon_inline = monsterinsights_get_inline_menu_icon(); |
|
@@ -113,7 +113,7 @@ discard block |
|
|
block discarded – undo |
113
|
113
|
function monsterinsights_add_admin_body_class( $classes ) { |
114
|
114
|
$screen = function_exists( 'get_current_screen' ) ? get_current_screen() : false; |
115
|
115
|
if ( empty( $screen ) || empty( $screen->id ) || strpos( $screen->id, 'monsterinsights' ) === false ) { |
116
|
|
- return $classes; |
|
116
|
+ return $classes; |
117
|
117
|
} |
118
|
118
|
|
119
|
119
|
return "$classes monsterinsights_page "; |
|
@@ -130,7 +130,7 @@ discard block |
|
|
block discarded – undo |
130
|
130
|
$screen = function_exists( 'get_current_screen' ) ? get_current_screen() : false; |
131
|
131
|
|
132
|
132
|
if ( empty( $screen ) || empty( $screen->id ) || strpos( $screen->id, 'monsterinsights_tools' ) === false || 'insights_page_monsterinsights_tools' === $screen->id ) { |
133
|
|
- return $classes; |
|
133
|
+ return $classes; |
134
|
134
|
} |
135
|
135
|
|
136
|
136
|
return "$classes insights_page_monsterinsights_tools "; |
|
@@ -146,7 +146,7 @@ discard block |
|
|
block discarded – undo |
146
|
146
|
function monsterinsights_add_admin_body_class_addons_page( $classes ) { |
147
|
147
|
$screen = function_exists( 'get_current_screen' ) ? get_current_screen() : false; |
148
|
148
|
if ( empty( $screen ) || empty( $screen->id ) || strpos( $screen->id, 'monsterinsights_addons' ) === false || 'insights_page_monsterinsights_addons' === $screen->id ) { |
149
|
|
- return $classes; |
|
149
|
+ return $classes; |
150
|
150
|
} |
151
|
151
|
|
152
|
152
|
return "$classes insights_page_monsterinsights_addons "; |
|
@@ -166,17 +166,17 @@ discard block |
|
|
block discarded – undo |
166
|
166
|
|
167
|
167
|
// If lite, show a link where they can get pro from |
168
|
168
|
if ( ! monsterinsights_is_pro_version() ) { |
169
|
|
- $get_pro = '<a title="' . esc_html__( 'Get MonsterInsights Pro', 'google-analytics-for-wordpress' ) .'" href="'. monsterinsights_get_upgrade_link( 'all-plugins', 'upgrade-link', "https://www.monsterinsights.com/docs/" ) .'">' . esc_html__( 'Get MonsterInsights Pro', 'google-analytics-for-wordpress' ) . '</a>'; |
170
|
|
- array_unshift( $links, $get_pro ); |
|
169
|
+ $get_pro = '<a title="' . esc_html__( 'Get MonsterInsights Pro', 'google-analytics-for-wordpress' ) .'" href="'. monsterinsights_get_upgrade_link( 'all-plugins', 'upgrade-link', "https://www.monsterinsights.com/docs/" ) .'">' . esc_html__( 'Get MonsterInsights Pro', 'google-analytics-for-wordpress' ) . '</a>'; |
|
170
|
+ array_unshift( $links, $get_pro ); |
171
|
171
|
} |
172
|
172
|
|
173
|
173
|
// If Lite, support goes to forum. If pro, it goes to our website |
174
|
174
|
if ( monsterinsights_is_pro_version() ) { |
175
|
|
- $support = '<a title="MonsterInsights Pro Support" href="'. monsterinsights_get_url( 'all-plugins', 'pro-support-link', "https://www.monsterinsights.com/my-account/support/" ) .'">' . esc_html__( 'Support', 'google-analytics-for-wordpress' ) . '</a>'; |
176
|
|
- array_unshift( $links, $support ); |
|
175
|
+ $support = '<a title="MonsterInsights Pro Support" href="'. monsterinsights_get_url( 'all-plugins', 'pro-support-link', "https://www.monsterinsights.com/my-account/support/" ) .'">' . esc_html__( 'Support', 'google-analytics-for-wordpress' ) . '</a>'; |
|
176
|
+ array_unshift( $links, $support ); |
177
|
177
|
} else { |
178
|
|
- $support = '<a title="MonsterInsights Lite Support" href="'. monsterinsights_get_url( 'all-plugins', 'lite-support-link', "https://www.monsterinsights.com/lite-support/" ) .'">' . esc_html__( 'Support', 'google-analytics-for-wordpress' ) . '</a>'; |
179
|
|
- array_unshift( $links, $support ); |
|
178
|
+ $support = '<a title="MonsterInsights Lite Support" href="'. monsterinsights_get_url( 'all-plugins', 'lite-support-link', "https://www.monsterinsights.com/lite-support/" ) .'">' . esc_html__( 'Support', 'google-analytics-for-wordpress' ) . '</a>'; |
|
179
|
+ array_unshift( $links, $support ); |
180
|
180
|
} |
181
|
181
|
|
182
|
182
|
if ( is_network_admin() ) { |
|
@@ -205,26 +205,26 @@ discard block |
|
|
block discarded – undo |
205
|
205
|
function monsterinsights_load_admin_partial( $template, $data = array() ) { |
206
|
206
|
|
207
|
207
|
if ( monsterinsights_is_pro_version() ) { |
208
|
|
- $dir = trailingslashit( plugin_dir_path( MonsterInsights()->file ) . 'pro/includes/admin/partials' ); |
|
208
|
+ $dir = trailingslashit( plugin_dir_path( MonsterInsights()->file ) . 'pro/includes/admin/partials' ); |
209
|
209
|
|
210
|
|
- if ( file_exists( $dir . $template . '.php' ) ) { |
211
|
|
- require_once( $dir . $template . '.php' ); |
212
|
|
- return true; |
213
|
|
- } |
|
210
|
+ if ( file_exists( $dir . $template . '.php' ) ) { |
|
211
|
+ require_once( $dir . $template . '.php' ); |
|
212
|
+ return true; |
|
213
|
+ } |
214
|
214
|
} else { |
215
|
|
- $dir = trailingslashit( plugin_dir_path( MonsterInsights()->file ) . 'lite/includes/admin/partials' ); |
|
215
|
+ $dir = trailingslashit( plugin_dir_path( MonsterInsights()->file ) . 'lite/includes/admin/partials' ); |
216
|
216
|
|
217
|
|
- if ( file_exists( $dir . $template . '.php' ) ) { |
218
|
|
- require_once( $dir . $template . '.php' ); |
219
|
|
- return true; |
220
|
|
- } |
|
217
|
+ if ( file_exists( $dir . $template . '.php' ) ) { |
|
218
|
+ require_once( $dir . $template . '.php' ); |
|
219
|
+ return true; |
|
220
|
+ } |
221
|
221
|
} |
222
|
222
|
|
223
|
223
|
$dir = trailingslashit( plugin_dir_path( MonsterInsights()->file ) . 'includes/admin/partials' ); |
224
|
224
|
|
225
|
225
|
if ( file_exists( $dir . $template . '.php' ) ) { |
226
|
|
- require_once( $dir . $template . '.php' ); |
227
|
|
- return true; |
|
226
|
+ require_once( $dir . $template . '.php' ); |
|
227
|
+ return true; |
228
|
228
|
} |
229
|
229
|
|
230
|
230
|
return false; |
|
@@ -241,9 +241,9 @@ discard block |
|
|
block discarded – undo |
241
|
241
|
function monsterinsights_admin_footer( $text ) { |
242
|
242
|
global $current_screen; |
243
|
243
|
if ( ! empty( $current_screen->id ) && strpos( $current_screen->id, 'monsterinsights' ) !== false ) { |
244
|
|
- $url = 'https://wordpress.org/support/view/plugin-reviews/google-analytics-for-wordpress?filter=5'; |
245
|
|
- // Translators: Placeholders add a link to the wordpress.org repository. |
246
|
|
- $text = sprintf( esc_html__( 'Please rate %1$sMonsterInsights%2$s on %3$s %4$sWordPress.org%5$s to help us spread the word. Thank you from the MonsterInsights team!', 'google-analytics-for-wordpress' ), '<strong>', '</strong>', '<a class="monsterinsights-no-text-decoration" href="' . $url . '" target="_blank" rel="noopener noreferrer"><i class="monstericon-star"></i><i class="monstericon-star"></i><i class="monstericon-star"></i><i class="monstericon-star"></i><i class="monstericon-star"></i></a>', '<a href="' . $url . '" target="_blank" rel="noopener noreferrer">', '</a>' ); |
|
244
|
+ $url = 'https://wordpress.org/support/view/plugin-reviews/google-analytics-for-wordpress?filter=5'; |
|
245
|
+ // Translators: Placeholders add a link to the wordpress.org repository. |
|
246
|
+ $text = sprintf( esc_html__( 'Please rate %1$sMonsterInsights%2$s on %3$s %4$sWordPress.org%5$s to help us spread the word. Thank you from the MonsterInsights team!', 'google-analytics-for-wordpress' ), '<strong>', '</strong>', '<a class="monsterinsights-no-text-decoration" href="' . $url . '" target="_blank" rel="noopener noreferrer"><i class="monstericon-star"></i><i class="monstericon-star"></i><i class="monstericon-star"></i><i class="monstericon-star"></i><i class="monstericon-star"></i></a>', '<a href="' . $url . '" target="_blank" rel="noopener noreferrer">', '</a>' ); |
247
|
247
|
} |
248
|
248
|
return $text; |
249
|
249
|
} |
|
@@ -254,12 +254,12 @@ discard block |
|
|
block discarded – undo |
254
|
254
|
// Don't show on MonsterInsights pages |
255
|
255
|
$screen = get_current_screen(); |
256
|
256
|
if ( empty( $screen->id ) || strpos( $screen->id, 'monsterinsights' ) !== false ) { |
257
|
|
- return; |
|
257
|
+ return; |
258
|
258
|
} |
259
|
259
|
|
260
|
260
|
// Make sure they have the permissions to do something |
261
|
261
|
if ( ! current_user_can( 'monsterinsights_save_settings' ) ) { |
262
|
|
- return; |
|
262
|
+ return; |
263
|
263
|
} |
264
|
264
|
|
265
|
265
|
// Priority: |
|
@@ -277,89 +277,89 @@ discard block |
|
|
block discarded – undo |
277
|
277
|
// 1. Google Analytics not authenticated |
278
|
278
|
if ( ! is_network_admin() && ! monsterinsights_get_ua() && ! defined( 'MONSTERINSIGHTS_DISABLE_TRACKING' ) ) { |
279
|
279
|
|
280
|
|
- $submenu_base = is_network_admin() ? add_query_arg( 'page', 'monsterinsights_network', network_admin_url( 'admin.php' ) ) : add_query_arg( 'page', 'monsterinsights_settings', admin_url( 'admin.php' ) ); |
281
|
|
- $title = esc_html__( 'Please Setup Website Analytics to See Audience Insights', 'google-analytics-for-wordpress' ); |
282
|
|
- $primary = esc_html__( 'Connect MonsterInsights and Setup Website Analytics', 'google-analytics-for-wordpress' ); |
283
|
|
- $urlone = is_network_admin() ? network_admin_url( 'admin.php?page=monsterinsights-onboarding' ) : admin_url( 'admin.php?page=monsterinsights-onboarding' ); |
284
|
|
- $secondary = esc_html__( 'Learn More', 'google-analytics-for-wordpress' ); |
285
|
|
- $urltwo = $submenu_base . '#/about/getting-started'; |
286
|
|
- $message = esc_html__( 'MonsterInsights, WordPress analytics plugin, helps you connect your website with Google Analytics, so you can see how people find and use your website. Over 2 million website owners use MonsterInsights to see the stats that matter and grow their business.', 'google-analytics-for-wordpress' ); |
287
|
|
- echo '<div class="notice notice-info"><p style="font-weight:700">'. $title .'</p><p>'. $message.'</p><p><a href="'. $urlone .'" class="button-primary">'. $primary .'</a> <a href="'. $urltwo .'" class="button-secondary">'. $secondary .'</a></p></div>'; |
288
|
|
- return; |
|
280
|
+ $submenu_base = is_network_admin() ? add_query_arg( 'page', 'monsterinsights_network', network_admin_url( 'admin.php' ) ) : add_query_arg( 'page', 'monsterinsights_settings', admin_url( 'admin.php' ) ); |
|
281
|
+ $title = esc_html__( 'Please Setup Website Analytics to See Audience Insights', 'google-analytics-for-wordpress' ); |
|
282
|
+ $primary = esc_html__( 'Connect MonsterInsights and Setup Website Analytics', 'google-analytics-for-wordpress' ); |
|
283
|
+ $urlone = is_network_admin() ? network_admin_url( 'admin.php?page=monsterinsights-onboarding' ) : admin_url( 'admin.php?page=monsterinsights-onboarding' ); |
|
284
|
+ $secondary = esc_html__( 'Learn More', 'google-analytics-for-wordpress' ); |
|
285
|
+ $urltwo = $submenu_base . '#/about/getting-started'; |
|
286
|
+ $message = esc_html__( 'MonsterInsights, WordPress analytics plugin, helps you connect your website with Google Analytics, so you can see how people find and use your website. Over 2 million website owners use MonsterInsights to see the stats that matter and grow their business.', 'google-analytics-for-wordpress' ); |
|
287
|
+ echo '<div class="notice notice-info"><p style="font-weight:700">'. $title .'</p><p>'. $message.'</p><p><a href="'. $urlone .'" class="button-primary">'. $primary .'</a> <a href="'. $urltwo .'" class="button-secondary">'. $secondary .'</a></p></div>'; |
|
288
|
+ return; |
289
|
289
|
} |
290
|
290
|
|
291
|
291
|
// 2. License key not entered for pro |
292
|
292
|
$key = monsterinsights_is_pro_version() ? MonsterInsights()->license->get_license_key() : ''; |
293
|
293
|
if ( monsterinsights_is_pro_version() && empty( $key ) ) { |
294
|
|
- $page = is_network_admin() ? network_admin_url( 'admin.php?page=monsterinsights_network' ) : admin_url( 'admin.php?page=monsterinsights_settings' ); |
295
|
|
- // Translators: Adds a link to retrieve the license. |
296
|
|
- $message = sprintf( esc_html__( 'Warning: No valid license key has been entered for MonsterInsights. You are currently not getting updates, and are not able to view reports. %1$sPlease click here to enter your license key and begin receiving updates and reports.%2$s', 'google-analytics-for-wordpress' ), '<a href="'. esc_url( $page ) . '">', '</a>' ); |
297
|
|
- echo '<div class="error"><p>'. $message.'</p></div>'; |
298
|
|
- return; |
|
294
|
+ $page = is_network_admin() ? network_admin_url( 'admin.php?page=monsterinsights_network' ) : admin_url( 'admin.php?page=monsterinsights_settings' ); |
|
295
|
+ // Translators: Adds a link to retrieve the license. |
|
296
|
+ $message = sprintf( esc_html__( 'Warning: No valid license key has been entered for MonsterInsights. You are currently not getting updates, and are not able to view reports. %1$sPlease click here to enter your license key and begin receiving updates and reports.%2$s', 'google-analytics-for-wordpress' ), '<a href="'. esc_url( $page ) . '">', '</a>' ); |
|
297
|
+ echo '<div class="error"><p>'. $message.'</p></div>'; |
|
298
|
+ return; |
299
|
299
|
} |
300
|
300
|
|
301
|
301
|
// 3. License key not valid/okay for pro |
302
|
302
|
if ( monsterinsights_is_pro_version() ) { |
303
|
|
- $message = ''; |
304
|
|
- if ( MonsterInsights()->license->get_site_license_key() ){ |
305
|
|
- if ( MonsterInsights()->license->site_license_expired() ) { |
306
|
|
- // Translators: Adds a link to the license renewal. |
307
|
|
- $message = sprintf( esc_html__( 'Your license key for MonsterInsights has expired. %1$sPlease click here to renew your license key.%2$s', 'google-analytics-for-wordpress' ), '<a href="'. monsterinsights_get_url( 'admin-notices', 'expired-license', "https://www.monsterinsights.com/login/" ) .'" target="_blank" rel="noopener noreferrer" referrer="no-referrer">', '</a>' ); |
308
|
|
- } else if ( MonsterInsights()->license->site_license_disabled() ) { |
309
|
|
- $message = esc_html__( 'Your license key for MonsterInsights has been disabled. Please use a different key.', 'google-analytics-for-wordpress' ); |
310
|
|
- } else if ( MonsterInsights()->license->site_license_invalid() ) { |
311
|
|
- $message = esc_html__( 'Your license key for MonsterInsights is invalid. The key no longer exists or the user associated with the key has been deleted. Please use a different key.', 'google-analytics-for-wordpress' ); |
312
|
|
- } |
313
|
|
- } else if ( MonsterInsights()->license->get_network_license_key() ) { |
314
|
|
- if ( MonsterInsights()->license->network_license_expired() ) { |
315
|
|
- // Translators: Adds a link to renew license. |
316
|
|
- $message = sprintf( esc_html__( 'Your network license key for MonsterInsights has expired. %1$sPlease click here to renew your license key.%2$s', 'google-analytics-for-wordpress' ), '<a href="'. monsterinsights_get_url( 'admin-notices', 'expired-license', "https://www.monsterinsights.com/login/" ) .'" target="_blank" rel="noopener noreferrer" referrer="no-referrer">', '</a>' ); |
317
|
|
- } else if ( MonsterInsights()->license->network_license_disabled() ) { |
318
|
|
- $message = esc_html__( 'Your network license key for MonsterInsights has been disabled. Please use a different key.', 'google-analytics-for-wordpress' ); |
319
|
|
- } else if ( MonsterInsights()->license->network_license_invalid() ) { |
320
|
|
- $message = esc_html__( 'Your network license key for MonsterInsights is invalid. The key no longer exists or the user associated with the key has been deleted. Please use a different key.', 'google-analytics-for-wordpress' ); |
321
|
|
- } |
322
|
|
- } |
323
|
|
- if ( ! empty( $message ) ) { |
324
|
|
- echo '<div class="error"><p>'. $message.'</p></div>'; |
325
|
|
- return; |
326
|
|
- } |
|
303
|
+ $message = ''; |
|
304
|
+ if ( MonsterInsights()->license->get_site_license_key() ){ |
|
305
|
+ if ( MonsterInsights()->license->site_license_expired() ) { |
|
306
|
+ // Translators: Adds a link to the license renewal. |
|
307
|
+ $message = sprintf( esc_html__( 'Your license key for MonsterInsights has expired. %1$sPlease click here to renew your license key.%2$s', 'google-analytics-for-wordpress' ), '<a href="'. monsterinsights_get_url( 'admin-notices', 'expired-license', "https://www.monsterinsights.com/login/" ) .'" target="_blank" rel="noopener noreferrer" referrer="no-referrer">', '</a>' ); |
|
308
|
+ } else if ( MonsterInsights()->license->site_license_disabled() ) { |
|
309
|
+ $message = esc_html__( 'Your license key for MonsterInsights has been disabled. Please use a different key.', 'google-analytics-for-wordpress' ); |
|
310
|
+ } else if ( MonsterInsights()->license->site_license_invalid() ) { |
|
311
|
+ $message = esc_html__( 'Your license key for MonsterInsights is invalid. The key no longer exists or the user associated with the key has been deleted. Please use a different key.', 'google-analytics-for-wordpress' ); |
|
312
|
+ } |
|
313
|
+ } else if ( MonsterInsights()->license->get_network_license_key() ) { |
|
314
|
+ if ( MonsterInsights()->license->network_license_expired() ) { |
|
315
|
+ // Translators: Adds a link to renew license. |
|
316
|
+ $message = sprintf( esc_html__( 'Your network license key for MonsterInsights has expired. %1$sPlease click here to renew your license key.%2$s', 'google-analytics-for-wordpress' ), '<a href="'. monsterinsights_get_url( 'admin-notices', 'expired-license', "https://www.monsterinsights.com/login/" ) .'" target="_blank" rel="noopener noreferrer" referrer="no-referrer">', '</a>' ); |
|
317
|
+ } else if ( MonsterInsights()->license->network_license_disabled() ) { |
|
318
|
+ $message = esc_html__( 'Your network license key for MonsterInsights has been disabled. Please use a different key.', 'google-analytics-for-wordpress' ); |
|
319
|
+ } else if ( MonsterInsights()->license->network_license_invalid() ) { |
|
320
|
+ $message = esc_html__( 'Your network license key for MonsterInsights is invalid. The key no longer exists or the user associated with the key has been deleted. Please use a different key.', 'google-analytics-for-wordpress' ); |
|
321
|
+ } |
|
322
|
+ } |
|
323
|
+ if ( ! empty( $message ) ) { |
|
324
|
+ echo '<div class="error"><p>'. $message.'</p></div>'; |
|
325
|
+ return; |
|
326
|
+ } |
327
|
327
|
} |
328
|
328
|
|
329
|
329
|
// 4. Notices for PHP/WP version deprecations |
330
|
330
|
if ( current_user_can( 'update_core' ) ) { |
331
|
|
- global $wp_version; |
332
|
|
- |
333
|
|
- // PHP 5.2-5.5 |
334
|
|
- if ( version_compare( phpversion(), '5.6', '<' ) ) { |
335
|
|
- $url = monsterinsights_get_url( 'global-notice', 'settings-page', 'https://www.monsterinsights.com/docs/update-php/' ); |
336
|
|
- // Translators: Placeholders add the PHP version, a link to the MonsterInsights blog and a line break. |
337
|
|
- $message = sprintf( esc_html__( 'Your site is running an outdated, insecure version of PHP (%1$s), which could be putting your site at risk for being hacked.%4$sWordPress stopped supporting your PHP version in April, 2019.%4$sUpdating PHP only takes a few minutes and will make your website significantly faster and more secure.%4$s%2$sLearn more about updating PHP%3$s', 'google-analytics-for-wordpress' ), phpversion(), '<a href="' . $url . '" target="_blank">', '</a>', '<br>' ); |
338
|
|
- echo '<div class="error"><p>'. $message.'</p></div>'; |
339
|
|
- return; |
340
|
|
- } |
341
|
|
- // WordPress 3.0 - 4.5 |
342
|
|
- else if ( version_compare( $wp_version, '4.9', '<' ) ) { |
343
|
|
- $url = monsterinsights_get_url( 'global-notice', 'settings-page', 'https://www.monsterinsights.com/docs/update-wordpress/' ); |
344
|
|
- // Translators: Placeholders add the current WordPress version and links to the MonsterInsights blog |
345
|
|
- $message = sprintf( esc_html__( 'Your site is running an outdated version of WordPress (%1$s).%4$sMonsterInsights will stop supporting WordPress versions lower than 4.9 in 2020.%4$sUpdating WordPress takes just a few minutes and will also solve many bugs that exist in your WordPress install.%4$s%2$sLearn more about updating WordPress%3$s', 'google-analytics-for-wordpress' ), $wp_version, '<a href="' . $url . '" target="_blank">', '</a>', '<br>' ); |
346
|
|
- echo '<div class="error"><p>'. $message.'</p></div>'; |
347
|
|
- return; |
348
|
|
- } |
349
|
|
- // PHP 5.4/5.5 |
350
|
|
- // else if ( version_compare( phpversion(), '5.6', '<' ) ) { |
351
|
|
- // $url = monsterinsights_get_url( 'global-notice', 'settings-page', 'https://www.monsterinsights.com/docs/update-php/' ); |
352
|
|
- // $message = sprintf( esc_html__( 'Your site is running an outdated, insecure version of PHP (%1$s), which could be putting your site at risk for being hacked.%4$sWordPress will stop supporting your PHP version in April, 2019.%4$sUpdating PHP only takes a few minutes and will make your website significantly faster and more secure.%4$s%2$sLearn more about updating PHP%3$s', 'google-analytics-for-wordpress' ), phpversion(), '<a href="' . $url . '" target="_blank">', '</a>', '<br>' ); |
353
|
|
- // echo '<div class="error"><p>'. $message.'</p></div>'; |
354
|
|
- // return; |
355
|
|
- // } |
356
|
|
- // // WordPress 4.6 - 4.8 |
357
|
|
- // else if ( version_compare( $wp_version, '4.9', '<' ) ) { |
358
|
|
- // $url = monsterinsights_get_url( 'global-notice', 'settings-page', 'https://www.monsterinsights.com/docs/update-wordpress/' ); |
359
|
|
- // $message = sprintf( esc_html__( 'Your site is running an outdated version of WordPress (%1$s).%4$sMonsterInsights will stop supporting WordPress versions lower than 4.9 in October, 2019.%4$sUpdating WordPress takes just a few minutes and will also solve many bugs that exist in your WordPress install.%4$s%2$sLearn more about updating WordPress%3$s', 'google-analytics-for-wordpress' ), $wp_version, '<a href="' . $url . '" target="_blank">', '</a>', '<br>' ); |
360
|
|
- // echo '<div class="error"><p>'. $message.'</p></div>'; |
361
|
|
- // return; |
362
|
|
- // } |
|
331
|
+ global $wp_version; |
|
332
|
+ |
|
333
|
+ // PHP 5.2-5.5 |
|
334
|
+ if ( version_compare( phpversion(), '5.6', '<' ) ) { |
|
335
|
+ $url = monsterinsights_get_url( 'global-notice', 'settings-page', 'https://www.monsterinsights.com/docs/update-php/' ); |
|
336
|
+ // Translators: Placeholders add the PHP version, a link to the MonsterInsights blog and a line break. |
|
337
|
+ $message = sprintf( esc_html__( 'Your site is running an outdated, insecure version of PHP (%1$s), which could be putting your site at risk for being hacked.%4$sWordPress stopped supporting your PHP version in April, 2019.%4$sUpdating PHP only takes a few minutes and will make your website significantly faster and more secure.%4$s%2$sLearn more about updating PHP%3$s', 'google-analytics-for-wordpress' ), phpversion(), '<a href="' . $url . '" target="_blank">', '</a>', '<br>' ); |
|
338
|
+ echo '<div class="error"><p>'. $message.'</p></div>'; |
|
339
|
+ return; |
|
340
|
+ } |
|
341
|
+ // WordPress 3.0 - 4.5 |
|
342
|
+ else if ( version_compare( $wp_version, '4.9', '<' ) ) { |
|
343
|
+ $url = monsterinsights_get_url( 'global-notice', 'settings-page', 'https://www.monsterinsights.com/docs/update-wordpress/' ); |
|
344
|
+ // Translators: Placeholders add the current WordPress version and links to the MonsterInsights blog |
|
345
|
+ $message = sprintf( esc_html__( 'Your site is running an outdated version of WordPress (%1$s).%4$sMonsterInsights will stop supporting WordPress versions lower than 4.9 in 2020.%4$sUpdating WordPress takes just a few minutes and will also solve many bugs that exist in your WordPress install.%4$s%2$sLearn more about updating WordPress%3$s', 'google-analytics-for-wordpress' ), $wp_version, '<a href="' . $url . '" target="_blank">', '</a>', '<br>' ); |
|
346
|
+ echo '<div class="error"><p>'. $message.'</p></div>'; |
|
347
|
+ return; |
|
348
|
+ } |
|
349
|
+ // PHP 5.4/5.5 |
|
350
|
+ // else if ( version_compare( phpversion(), '5.6', '<' ) ) { |
|
351
|
+ // $url = monsterinsights_get_url( 'global-notice', 'settings-page', 'https://www.monsterinsights.com/docs/update-php/' ); |
|
352
|
+ // $message = sprintf( esc_html__( 'Your site is running an outdated, insecure version of PHP (%1$s), which could be putting your site at risk for being hacked.%4$sWordPress will stop supporting your PHP version in April, 2019.%4$sUpdating PHP only takes a few minutes and will make your website significantly faster and more secure.%4$s%2$sLearn more about updating PHP%3$s', 'google-analytics-for-wordpress' ), phpversion(), '<a href="' . $url . '" target="_blank">', '</a>', '<br>' ); |
|
353
|
+ // echo '<div class="error"><p>'. $message.'</p></div>'; |
|
354
|
+ // return; |
|
355
|
+ // } |
|
356
|
+ // // WordPress 4.6 - 4.8 |
|
357
|
+ // else if ( version_compare( $wp_version, '4.9', '<' ) ) { |
|
358
|
+ // $url = monsterinsights_get_url( 'global-notice', 'settings-page', 'https://www.monsterinsights.com/docs/update-wordpress/' ); |
|
359
|
+ // $message = sprintf( esc_html__( 'Your site is running an outdated version of WordPress (%1$s).%4$sMonsterInsights will stop supporting WordPress versions lower than 4.9 in October, 2019.%4$sUpdating WordPress takes just a few minutes and will also solve many bugs that exist in your WordPress install.%4$s%2$sLearn more about updating WordPress%3$s', 'google-analytics-for-wordpress' ), $wp_version, '<a href="' . $url . '" target="_blank">', '</a>', '<br>' ); |
|
360
|
+ // echo '<div class="error"><p>'. $message.'</p></div>'; |
|
361
|
+ // return; |
|
362
|
+ // } |
363
|
363
|
} |
364
|
364
|
|
365
|
365
|
// 5. Optin setting not configured |
|
@@ -389,7 +389,7 @@ discard block |
|
|
block discarded – undo |
389
|
389
|
|
390
|
390
|
$notices = get_option( 'monsterinsights_notices' ); |
391
|
391
|
if ( ! is_array( $notices ) ) { |
392
|
|
- $notices = array(); |
|
392
|
+ $notices = array(); |
393
|
393
|
} |
394
|
394
|
|
395
|
395
|
// 6. Authenticate, not manual |
|
@@ -433,74 +433,74 @@ discard block |
|
|
block discarded – undo |
433
|
433
|
|
434
|
434
|
// 8. WooUpsell |
435
|
435
|
if ( ! monsterinsights_is_pro_version() && class_exists( 'WooCommerce' ) ) { |
436
|
|
- if ( ! isset( $notices['monsterinsights_woocommerce_tracking_available' ] ) ) { |
437
|
|
- echo '<div class="notice notice-success is-dismissible monsterinsights-notice monsterinsights-wooedd-upsell-row" data-notice="monsterinsights_woocommerce_tracking_available">'; |
438
|
|
- echo '<div class="monsterinsights-wooedd-upsell-left">'; |
439
|
|
- echo '<p><strong>'; |
440
|
|
- echo esc_html( 'Enhanced Ecommerce Analytics for Your WooCommerce Store', 'google-analytics-for-wordpress' ); |
441
|
|
- echo '</strong></p>'; |
442
|
|
- echo '<img class="monsterinsights-wooedd-upsell-image monsterinsights-wooedd-upsell-image-small" src="' . trailingslashit( MONSTERINSIGHTS_PLUGIN_URL ) . 'assets/images/upsell/woo-edd-upsell.png">'; |
443
|
|
- echo '<p>'; |
444
|
|
- echo esc_html( 'MonsterInsights Pro gives you detailed stats and insights about your customers.', 'google-analytics-for-wordpress' ); |
445
|
|
- echo '</p>'; |
446
|
|
- echo '<p>'; |
447
|
|
- echo esc_html( 'This helps you make data-driven decisions about your content, and marketing strategy so you can increase your website traffic, leads, and sales.', 'google-analytics-for-wordpress' ); |
448
|
|
- echo '</p>'; |
449
|
|
- echo '<p>'; |
450
|
|
- echo esc_html( 'Pro customers also get Form Tracking, Custom Dimensions Tracking, UserID Tracking and much more.', 'google-analytics-for-wordpress' ); |
451
|
|
- echo '</p>'; |
452
|
|
- echo '<p>'; |
453
|
|
- echo esc_html( 'Start making data-driven decisions to grow your business.', 'google-analytics-for-wordpress' ); |
454
|
|
- echo '</p>'; |
455
|
|
- // Translators: Placeholders add a link to the MonsterInsights website. |
456
|
|
- echo sprintf( esc_html__( '%1$sGet MonsterInsights Pro%2$s', 'google-analytics-for-wordpress' ), '<a class="button button-primary button-hero" href="'. monsterinsights_get_upgrade_link( 'admin-notices', 'woocommerce-upgrade' ) .'">', ' »</a>' ); |
457
|
|
- echo '</p>'; |
458
|
|
- echo '</div><div class="monsterinsights-wooedd-upsell-right">'; |
459
|
|
- echo '<img class="monsterinsights-wooedd-upsell-image monsterinsights-wooedd-upsell-image-large" src="' . trailingslashit( MONSTERINSIGHTS_PLUGIN_URL ) . 'assets/images/upsell/woo-edd-upsell.png">'; |
460
|
|
- echo '</div>'; |
461
|
|
- echo '</div>'; |
462
|
|
- return; |
463
|
|
- } |
|
436
|
+ if ( ! isset( $notices['monsterinsights_woocommerce_tracking_available' ] ) ) { |
|
437
|
+ echo '<div class="notice notice-success is-dismissible monsterinsights-notice monsterinsights-wooedd-upsell-row" data-notice="monsterinsights_woocommerce_tracking_available">'; |
|
438
|
+ echo '<div class="monsterinsights-wooedd-upsell-left">'; |
|
439
|
+ echo '<p><strong>'; |
|
440
|
+ echo esc_html( 'Enhanced Ecommerce Analytics for Your WooCommerce Store', 'google-analytics-for-wordpress' ); |
|
441
|
+ echo '</strong></p>'; |
|
442
|
+ echo '<img class="monsterinsights-wooedd-upsell-image monsterinsights-wooedd-upsell-image-small" src="' . trailingslashit( MONSTERINSIGHTS_PLUGIN_URL ) . 'assets/images/upsell/woo-edd-upsell.png">'; |
|
443
|
+ echo '<p>'; |
|
444
|
+ echo esc_html( 'MonsterInsights Pro gives you detailed stats and insights about your customers.', 'google-analytics-for-wordpress' ); |
|
445
|
+ echo '</p>'; |
|
446
|
+ echo '<p>'; |
|
447
|
+ echo esc_html( 'This helps you make data-driven decisions about your content, and marketing strategy so you can increase your website traffic, leads, and sales.', 'google-analytics-for-wordpress' ); |
|
448
|
+ echo '</p>'; |
|
449
|
+ echo '<p>'; |
|
450
|
+ echo esc_html( 'Pro customers also get Form Tracking, Custom Dimensions Tracking, UserID Tracking and much more.', 'google-analytics-for-wordpress' ); |
|
451
|
+ echo '</p>'; |
|
452
|
+ echo '<p>'; |
|
453
|
+ echo esc_html( 'Start making data-driven decisions to grow your business.', 'google-analytics-for-wordpress' ); |
|
454
|
+ echo '</p>'; |
|
455
|
+ // Translators: Placeholders add a link to the MonsterInsights website. |
|
456
|
+ echo sprintf( esc_html__( '%1$sGet MonsterInsights Pro%2$s', 'google-analytics-for-wordpress' ), '<a class="button button-primary button-hero" href="'. monsterinsights_get_upgrade_link( 'admin-notices', 'woocommerce-upgrade' ) .'">', ' »</a>' ); |
|
457
|
+ echo '</p>'; |
|
458
|
+ echo '</div><div class="monsterinsights-wooedd-upsell-right">'; |
|
459
|
+ echo '<img class="monsterinsights-wooedd-upsell-image monsterinsights-wooedd-upsell-image-large" src="' . trailingslashit( MONSTERINSIGHTS_PLUGIN_URL ) . 'assets/images/upsell/woo-edd-upsell.png">'; |
|
460
|
+ echo '</div>'; |
|
461
|
+ echo '</div>'; |
|
462
|
+ return; |
|
463
|
+ } |
464
|
464
|
} |
465
|
465
|
|
466
|
466
|
// 9. EDDUpsell |
467
|
467
|
if ( ! monsterinsights_is_pro_version() && class_exists( 'Easy_Digital_Downloads' ) ) { |
468
|
|
- if ( ! isset( $notices['monsterinsights_edd_tracking_available' ] ) ) { |
469
|
|
- echo '<div class="notice notice-success is-dismissible monsterinsights-notice monsterinsights-wooedd-upsell-row" data-notice="monsterinsights_edd_tracking_available">'; |
470
|
|
- echo '<div class="monsterinsights-wooedd-upsell-left">'; |
471
|
|
- echo '<p><strong>'; |
472
|
|
- echo esc_html( 'Enhanced Ecommerce Analytics for Your Easy Digital Downloads Store', 'google-analytics-for-wordpress' ); |
473
|
|
- echo '</strong></p>'; |
474
|
|
- echo '<img class="monsterinsights-wooedd-upsell-image monsterinsights-wooedd-upsell-image-small" src="' . trailingslashit( MONSTERINSIGHTS_PLUGIN_URL ) . 'assets/images/upsell/woo-edd-upsell.png">'; |
475
|
|
- echo '<p>'; |
476
|
|
- echo esc_html( 'MonsterInsights Pro gives you detailed stats and insights about your customers.', 'google-analytics-for-wordpress' ); |
477
|
|
- echo '</p>'; |
478
|
|
- echo '<p>'; |
479
|
|
- echo esc_html( 'This helps you make data-driven decisions about your content, and marketing strategy so you can increase your website traffic, leads, and sales.', 'google-analytics-for-wordpress' ); |
480
|
|
- echo '</p>'; |
481
|
|
- echo '<p>'; |
482
|
|
- echo esc_html( 'Pro customers also get Form Tracking, Custom Dimensions Tracking, UserID Tracking and much more.', 'google-analytics-for-wordpress' ); |
483
|
|
- echo '</p>'; |
484
|
|
- echo '<p>'; |
485
|
|
- echo esc_html( 'Start making data-driven decisions to grow your business.', 'google-analytics-for-wordpress' ); |
486
|
|
- echo '</p>'; |
487
|
|
- echo sprintf( esc_html__( '%1$sGet MonsterInsights Pro%2$s', 'google-analytics-for-wordpress' ), '<a class="button button-primary button-hero" href="'. monsterinsights_get_upgrade_link( 'admin-notices', 'edd-upgrade' ) .'">', ' »</a>' ); |
488
|
|
- echo '</p>'; |
489
|
|
- echo '</div><div class="monsterinsights-wooedd-upsell-right">'; |
490
|
|
- echo '<img class="monsterinsights-wooedd-upsell-image monsterinsights-wooedd-upsell-image-large" src="' . trailingslashit( MONSTERINSIGHTS_PLUGIN_URL ) . 'assets/images/upsell/woo-edd-upsell.png">'; |
491
|
|
- echo '</div>'; |
492
|
|
- echo '</div>'; |
493
|
|
- return; |
494
|
|
- } |
|
468
|
+ if ( ! isset( $notices['monsterinsights_edd_tracking_available' ] ) ) { |
|
469
|
+ echo '<div class="notice notice-success is-dismissible monsterinsights-notice monsterinsights-wooedd-upsell-row" data-notice="monsterinsights_edd_tracking_available">'; |
|
470
|
+ echo '<div class="monsterinsights-wooedd-upsell-left">'; |
|
471
|
+ echo '<p><strong>'; |
|
472
|
+ echo esc_html( 'Enhanced Ecommerce Analytics for Your Easy Digital Downloads Store', 'google-analytics-for-wordpress' ); |
|
473
|
+ echo '</strong></p>'; |
|
474
|
+ echo '<img class="monsterinsights-wooedd-upsell-image monsterinsights-wooedd-upsell-image-small" src="' . trailingslashit( MONSTERINSIGHTS_PLUGIN_URL ) . 'assets/images/upsell/woo-edd-upsell.png">'; |
|
475
|
+ echo '<p>'; |
|
476
|
+ echo esc_html( 'MonsterInsights Pro gives you detailed stats and insights about your customers.', 'google-analytics-for-wordpress' ); |
|
477
|
+ echo '</p>'; |
|
478
|
+ echo '<p>'; |
|
479
|
+ echo esc_html( 'This helps you make data-driven decisions about your content, and marketing strategy so you can increase your website traffic, leads, and sales.', 'google-analytics-for-wordpress' ); |
|
480
|
+ echo '</p>'; |
|
481
|
+ echo '<p>'; |
|
482
|
+ echo esc_html( 'Pro customers also get Form Tracking, Custom Dimensions Tracking, UserID Tracking and much more.', 'google-analytics-for-wordpress' ); |
|
483
|
+ echo '</p>'; |
|
484
|
+ echo '<p>'; |
|
485
|
+ echo esc_html( 'Start making data-driven decisions to grow your business.', 'google-analytics-for-wordpress' ); |
|
486
|
+ echo '</p>'; |
|
487
|
+ echo sprintf( esc_html__( '%1$sGet MonsterInsights Pro%2$s', 'google-analytics-for-wordpress' ), '<a class="button button-primary button-hero" href="'. monsterinsights_get_upgrade_link( 'admin-notices', 'edd-upgrade' ) .'">', ' »</a>' ); |
|
488
|
+ echo '</p>'; |
|
489
|
+ echo '</div><div class="monsterinsights-wooedd-upsell-right">'; |
|
490
|
+ echo '<img class="monsterinsights-wooedd-upsell-image monsterinsights-wooedd-upsell-image-large" src="' . trailingslashit( MONSTERINSIGHTS_PLUGIN_URL ) . 'assets/images/upsell/woo-edd-upsell.png">'; |
|
491
|
+ echo '</div>'; |
|
492
|
+ echo '</div>'; |
|
493
|
+ return; |
|
494
|
+ } |
495
|
495
|
} |
496
|
496
|
|
497
|
497
|
if ( isset( $notices['monsterinsights_cross_domains_extracted'] ) && false === $notices['monsterinsights_cross_domains_extracted'] ) { |
498
|
|
- $page = is_network_admin() ? network_admin_url( 'admin.php?page=monsterinsights_network' ) : admin_url( 'admin.php?page=monsterinsights_settings' ); |
499
|
|
- $page = $page . '#/advanced'; |
500
|
|
- // Translators: Adds a link to the settings panel. |
501
|
|
- $message = sprintf( esc_html__( 'Warning: MonsterInsights found cross-domain settings in the custom code field and converted them to the new settings structure. %1$sPlease click here to review and remove the code no longer needed.%2$s', 'google-analytics-for-wordpress' ), '<a href="'. esc_url( $page ) . '">', '</a>' ); |
502
|
|
- echo '<div class="notice notice-success is-dismissible monsterinsights-notice" data-notice="monsterinsights_cross_domains_extracted"><p>'. $message.'</p></div>'; |
503
|
|
- return; |
|
498
|
+ $page = is_network_admin() ? network_admin_url( 'admin.php?page=monsterinsights_network' ) : admin_url( 'admin.php?page=monsterinsights_settings' ); |
|
499
|
+ $page = $page . '#/advanced'; |
|
500
|
+ // Translators: Adds a link to the settings panel. |
|
501
|
+ $message = sprintf( esc_html__( 'Warning: MonsterInsights found cross-domain settings in the custom code field and converted them to the new settings structure. %1$sPlease click here to review and remove the code no longer needed.%2$s', 'google-analytics-for-wordpress' ), '<a href="'. esc_url( $page ) . '">', '</a>' ); |
|
502
|
+ echo '<div class="notice notice-success is-dismissible monsterinsights-notice" data-notice="monsterinsights_cross_domains_extracted"><p>'. $message.'</p></div>'; |
|
503
|
+ return; |
504
|
504
|
} |
505
|
505
|
} |
506
|
506
|
add_action( 'admin_notices', 'monsterinsights_admin_setup_notices' ); |
|
@@ -510,7 +510,7 @@ discard block |
|
|
block discarded – undo |
510
|
510
|
// AM Notices |
511
|
511
|
function monsterinsights_am_notice_optout( $super_admin ) { |
512
|
512
|
if ( monsterinsights_get_option( 'hide_am_notices', false ) || monsterinsights_get_option( 'network_hide_am_notices', false ) ) { |
513
|
|
- return false; |
|
513
|
+ return false; |
514
|
514
|
} |
515
|
515
|
return $super_admin; |
516
|
516
|
} |