如果您熟悉编码,可以尝试基于WP\\u注释对象的自定义过滤器。可能是以下情况:
function wpse_wp_insert_comment($id, $comment) {
// Add your user_id, or use email address instead.
if ( empty($comment->comment_author ) || $comment->user_id!== 1 )
wp_set_comment_status( $comment, \'hold\' );
}
add_action(\'wp_insert_comment\', \'wpse_wp_insert_comment\', 10, 2);
-或。。。
// Same method, but using userdata to compare email address instead
function wpse_wp_insert_comment($id, $comment) {
$author = empty($comment->comment_author) ? NULL : get_userdata($comment->user_id);
// Be sure to update this line with YOUR actual email address.
if ( empty($comment->comment_author ) || $author->user_email!=="you@your-domain.com" )
wp_set_comment_status( $comment, \'hold\' );
}
add_action(\'wp_insert_comment\', \'wpse_wp_insert_comment\', 10, 2);
根据Tom Mcfarlin的一篇文章推断”
Programmatically Mark a Comment as Unapproved。请参阅他抛出的关于用户预期结果与此类函数导致的实际操作结果的“Gotcha”警告。