edit-comments.php – Show comments just from author posts
-
Hy,
I’m building multi author blog and on Comments (in admin section)
I want to show comments jut which are made on post of each author.So, when some of authors go to Comments they should see just comments on their posts.
I found similar solution for edit posts, and those people give some solution for edit comments, but this is for new version of vordpress, and because I use some combination of plugins I can not upgrade…
I’m using wordpress 2.6.2.I can hide all comments for user under some level but that isn’t solution. This I can do in /wp-admin/edit-comments.php so I was thinking maybe I can change something here to get results as I need.
This is original + code to hide comments for user under admin level:
<?php get_currentuserinfo() ; global $user_level; if ($user_level > 9) { $comments_per_page = apply_filters('comments_per_page', 20, $comment_status); if ( isset( $_GET['apage'] ) ) $page = abs( (int) $_GET['apage'] ); else $page = 1; $start = $offset = ( $page - 1 ) * $comments_per_page; list($_comments, $total) = _wp_get_comment_list( $comment_status, $search_dirty, $start, $comments_per_page + 5 ); // Grab a few extra $comments = array_slice($_comments, 0, $comments_per_page); $extra_comments = array_slice($_comments, $comments_per_page); $page_links = paginate_links( array( 'base' => add_query_arg( 'apage', '%#%' ), 'format' => '', 'total' => ceil($total / $comments_per_page), 'current' => $page )); } ?>
I would appreciate any help.
Thanks in advance.
Andrija
- The topic ‘edit-comments.php – Show comments just from author posts’ is closed to new replies.