Skip to content

Commit 0b88fd7

Browse files
New comments page with stats per date, author status
1 parent f509f15 commit 0b88fd7

File tree

2 files changed

+440
-0
lines changed

2 files changed

+440
-0
lines changed

posts-and-users-stats.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,13 @@ function posts_and_users_stats_add_menu() {
9595
'posts_and_users_stats_posts',
9696
'posts_and_users_stats_show_posts'
9797
);
98+
add_management_page(
99+
__( 'Comments Statistics', 'posts-and-users-stats' ),
100+
__( 'Comments Statistics', 'posts-and-users-stats' ),
101+
'export',
102+
'posts_and_users_stats_comments',
103+
'posts_and_users_stats_show_comments'
104+
);
98105
add_management_page(
99106
__( 'Users Statistics', 'posts-and-users-stats' ),
100107
__( 'Users Statistics', 'posts-and-users-stats' ),
@@ -124,6 +131,15 @@ function posts_and_users_stats_show_posts() {
124131
}
125132
}
126133

134+
/**
135+
* Show the comments stats page.
136+
*/
137+
function posts_and_users_stats_show_comments() {
138+
if ( posts_and_users_stats_current_user_can() ) {
139+
include_once 'views/comments.php';
140+
}
141+
}
142+
127143
/**
128144
* Show the users stats page.
129145
*/

0 commit comments

Comments
 (0)