Skip to content

Commit

Permalink
stats: add sparkline chart to WP Admin bar (#40456)
Browse files Browse the repository at this point in the history
  • Loading branch information
myhro authored Dec 5, 2024
1 parent f86bb18 commit 4323c69
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions projects/plugins/jetpack/changelog/add-stats-admin-bar
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: enhancement

Stats: enable sparkline chart in the WP Admin bar
1 change: 1 addition & 0 deletions projects/plugins/jetpack/modules/stats.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
}

Expand Down

0 comments on commit 4323c69

Please sign in to comment.