Here you go, paste this code in your themes functions.php
file:
function loggedin_approved_comment($approved)
{
// No need to do the check if the comment is already approved anyway.
if (!$approved) {
if (is_user_logged_in()) {
// Note: 1/0, not true/false
$approved = 1;
}
}
return $approved;
}
// Action allows the comment automatic approval to be over-ridden.
add_action('pre_comment_approved', 'loggedin_approved_comment');
Make sure to enable Comment Moderation inside the Settings-panel of your WordPress install.
Related Posts:
- Commenting in user profile page?
- How to change the email notification recipient (user) for new comments?
- 3 moderators to approve comment
- Show content only if member left a comment
- How to auto-approve internal pingbacks?
- Post comment as different user than logged in
- Exclude internal links from comment moderation?
- Multiple Comment Moderators and Notifications
- Allowing logged in users to comment without moderation across a multisite installation
- Get most active users sort by comment count
- Add delete, approve, spam Links to Comments
- Hide comments awaiting moderation from user who submitted the comments
- WordPress comments email notification for authors
- Get the number of comments awaiting moderation
- Capability for allowing user to post own comments without moderation
- Why do comment moderators need to have all create/edit/delete toboth posts and pages?
- List User Comments on User Profile BuddyPress [closed]
- Community Moderation Plugin for Comments [closed]
- Allow contributors to moderate comments comments on posts they write
- show if comment is in moderation
- Display WordPress commenter nice name
- Reject Comments Based on Author Email
- Check if someone recently commented in one of my posts
- Highlighting the current users comment
- Display the number of unseen comments on a page since the user last visit
- Author can only see own post comment and can moderate
- How to moderate (manually approve) comments of a specific (registered) User
- Comment Moderation and CDN Caching
- WordPress comments – how to check if comment still needs to be approved?
- Allow the comment author to delete their own comments
- All users/comments suspected as bot? [closed]
- Why does akismet prevent jetpack comments from appearing in my moderation queue? [closed]
- Commenting in user profile page?
- if user role is then echo text
- Remove the deleted user comment
- Anonymize comments after one year
- How can I get list of emails of users who commented on a post?
- Best way to tell if a comment is from a user?
- How Do I Allow Comment Moderation for Other User’s Posts?
- Sending comment notifications to different recipients depending on taxonomy terms
- Custom comment field not showing when logged-in
- get_comment_author_link not working properly
- Problem in getting user comments permalinks
- Who approved a comment, to show up in dashboard
- wp list all users who haven’t commented on a post
- Can I allow registered users to comment without being logged in or having to be approved?
- I want to limit registered user to 1 comment per post in WordPress
- Comment moderation
- Let user delete comment on front end only
- Disable comment moderation in multisite
- selectively disable akismet
- How to display comments by logged in user and responses?
- Deleting users do not deletes coments
- delete user not working
- Comment Blacklist
- Embed a page within WordPress dashboard?
- comment awaiting moderation
- Customize the new comment notifications sent to the post author after the comment is approved
- How can I limit the number of comments per registered user per day?
- How can I control the comment counts filtering my CPT replies?
- What is comment_karma?
- How to override function twentyten_comment
- Disqus over the default commenting engine, what are some pros and cons?
- How To Remove The “Click here to cancel reply” Link From The WordPress Comment Form
- How can I highlight admin comments?
- Block comments from search engine indexing
- Create a “Reject” action for comments?
- Add action on delete comments?
- Loading post comments after clicking a button
- How to return 404 when called edit-comments.php?
- Ability to comment on tags that represent a certain “issue”
- Do I need to deal with WordPress SQL Injection
- using comments_template() in custom single-portfolio.php
- Comments on homepage (index.php) are duplicated under posts
- Comment Form – E-mail Not Required!
- Get a total count for all comments and display result
- Email notification to an email address other than admin for custom type post comments in wordpress
- Notification if Comment Author Field is left empty. E.g. change input border colour
- Filtering the Admin Comments List to Show Only Comments from the Current User?
- Comment Link from get_comments()?
- How do I automatically insert some text in the comment textbox on submit?
- if null or int(0) value to 0
- Only show own comments in admin panel
- Replying to comments
- unsetting required fields in the comment reply form
- Problem code and show comments
- Highlight comments made by registered users of the site
- It doesn’t matter if I have more than one comment. get_comments_number still equal to one?
- Simple spam check for valid domain in commenter’s email address
- Post comments don’t show
- Update post “A” on comment submition on post “B”
- Comments counter only for Authors Posts
- transition_comment_status gets called when untrashing comments
- spacebar is not working in input and textarea
- wp-editor-area textarea disapear on cancel-comment-reply-link click
- Conditionally process comments while ignoring replies
- How do I separate author avatars and comments in 3.4.2?
- How do I convert users who put an email and username for a comment into registered users? [duplicate]
- What filter or action to replace comments or add new comment system
- WordPress Editor widgets “comments” and “post comments form” getting disappeared with elementor [closed]