diff --git a/projects/plugins/jetpack/changelog/update-stats-red-11-deprecate-old-stats-banner b/projects/plugins/jetpack/changelog/update-stats-red-11-deprecate-old-stats-banner new file mode 100644 index 0000000000000..77959db151ca9 --- /dev/null +++ b/projects/plugins/jetpack/changelog/update-stats-red-11-deprecate-old-stats-banner @@ -0,0 +1,4 @@ +Significance: patch +Type: enhancement + +Stats: Deprecating old Stats experience diff --git a/projects/plugins/jetpack/modules/stats.php b/projects/plugins/jetpack/modules/stats.php index c5dbb4258d090..58afeec2a526f 100644 --- a/projects/plugins/jetpack/modules/stats.php +++ b/projects/plugins/jetpack/modules/stats.php @@ -423,7 +423,11 @@ function stats_reports_page( $main_chart_only = false ) { exit; // @phan-suppress-current-line PhanPluginUnreachableCode -- Safer to include it even though stats_dashboard_widget_content() never returns. } - $blog_id = Stats_Options::get_option( 'blog_id' ); + $blog_id = Stats_Options::get_option( 'blog_id' ); + $learn_url = Redirect::get_url( 'jetpack-stats-learn-more' ); + $redirect_url = admin_url( 'admin.php?page=stats&enable_new_stats=1' ); + $stats_bg_url = plugins_url( 'images/odyssey-upgrade/background.png', JETPACK__PLUGIN_FILE ); + $stats_bg_gradient_url = plugins_url( 'images/odyssey-upgrade/gradient.png', JETPACK__PLUGIN_FILE ); if ( ! $main_chart_only && ! isset( $_GET['noheader'] ) && empty( $_GET['nojs'] ) && empty( $_COOKIE['stnojs'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended $nojs_url = add_query_arg( 'nojs', '1' ); @@ -431,6 +435,95 @@ function stats_reports_page( $main_chart_only = false ) { // Loading message. No JS fallback message. ?> +

@@ -461,6 +554,21 @@ function stats_reports_page( $main_chart_only = false ) { ?>

+
+
+
+

+

+
+ + +
+
+
+
+

<?php esc_attr_e( 'Loading…', 'jetpack' ); ?>