The function diagram we want to implement is as follows:
I searched the internet and found that there is a plug-in DX Unanswered Comments (Download address) that can implement this function. Just upload and install the plug-in, and then go to the background? Set? DX Unanswered Comments: Fill in the administrator login name in the Authors List. Multiple login names are separated by commas and saved.
Then go to the WordPress background? Comments: a Non-replied filtering link is added to the top of the page. Click it to view comments that the administrator has not replied to. Is there a Non-replied filtering link? Top Level. Only Top-Level comments not replied by the administrator are displayed.
But the official version of this plug-in has some problems, may not work properly, we need to make some modifications, open with a text editor: dx-unanswered-comments \ inc \ dxuc-helper.class.php
Search:
$ User = get_user_by ('Slug', trim ($ username ));
Use the following code:
$ User = get_user_by ('login', trim ($ username ));
As for Chinese, we can find in dx-unanswered-comments \ dx-unanswered-comments.php:
_ ('Non-replicased', 'dxuc ')
Changed:
_ ('Unrecoverable ', 'dxuc ')
Search:
_ ('Non-replied-Top level', 'dxuc ')
Changed:
_ ('Unreplied-top-level ', 'dxuc ')
Finally, use UTF-8 encoding as a dx-unanswered-comments.php.
How does one display only the comments of the current user in the WordPress background comment list?
If you're talking about the comments list page edit-comments.php, you can add the following code to the topic's functions. php so that only the user's comments are displayed on this page:
/*** Display the comments of the current user (and the comments in the published articles) */add_filter ('The _ comments ', 'wpdx _ filter_comments '); function wpdx_filter_comments ($ comments) {global $ pagenow; global $ user_ID; get_currentuserinfo (); // If you need to display comments in the current user's article, delete the following comments/* and */// current_user_can ('Publish _ posts') to indicate that the current user is the "author" role, you can limit the role by modifying parameters, refer to the http://codex.wordpress.org/Roles_and_Capabilities if ($ pagenow = 'edit-comments. php '/* & current_user_can (' Publish_posts ') */) {foreach ($ comments as $ I => $ comment) {$ the_post = get_post ($ comment-> comment_post_ID ); // if you need to display the comments in the current user's article, delete the following comments/* and */if ($ comment-> user_id! = $ User_ID/* & $ the_post-> post_author! = $ User_ID */) unset ($ comments [$ I]) ;}} return $ comments ;}