From 4323c698487ad86b1b4dba4d7ae8a3f4a6bd7b7e Mon Sep 17 00:00:00 2001 From: Tiago Ilieve Date: Thu, 5 Dec 2024 11:25:46 -0300 Subject: [PATCH] stats: add sparkline chart to WP Admin bar (#40456) --- projects/plugins/jetpack/changelog/add-stats-admin-bar | 4 ++++ projects/plugins/jetpack/modules/stats.php | 1 + 2 files changed, 5 insertions(+) create mode 100644 projects/plugins/jetpack/changelog/add-stats-admin-bar diff --git a/projects/plugins/jetpack/changelog/add-stats-admin-bar b/projects/plugins/jetpack/changelog/add-stats-admin-bar new file mode 100644 index 0000000000000..2ce4bc816978f --- /dev/null +++ b/projects/plugins/jetpack/changelog/add-stats-admin-bar @@ -0,0 +1,4 @@ +Significance: patch +Type: enhancement + +Stats: enable sparkline chart in the WP Admin bar diff --git a/projects/plugins/jetpack/modules/stats.php b/projects/plugins/jetpack/modules/stats.php index 8ff70aded953c..06bd42f1cea6b 100644 --- a/projects/plugins/jetpack/modules/stats.php +++ b/projects/plugins/jetpack/modules/stats.php @@ -55,6 +55,7 @@ function stats_load() { // Only run the callback for those who can see the stats. if ( is_user_logged_in() && current_user_can( 'view_stats' ) ) { + add_action( 'admin_head', 'stats_admin_bar_head', 100 ); add_action( 'wp_head', 'stats_admin_bar_head', 100 ); }