Suggestion: use user_meta too to flag if has approved post
-
Hello!
Thanks for your plugin, it is simple and does the job!Though I would suggest to introduce a usermeta as well, so you can avoid making a query every time someone post a comment in order to check if they already have published replies/topics. In a large forum where users post a lot and there are a lot of topics/replies, this could be quite an expensive task..
the flow when you do the moderations checks in moderation.php could be as simple as:
– check if user has the metafield “already_approved” and if its value is true
– if it is, then skip moderation.
– if the metafield is not there or value is not true, then do the query as currently
– if the user do have published replies/topics, also set “already_approved” to be true for this user.
– next time this user post a comment the first check will automatically skip moderationp.s. another small note, the check for “links” seems to be picking up images too, not sure if would be better to check specifically for the actual html
<a>
tagcheers!
- The topic ‘Suggestion: use user_meta too to flag if has approved post’ is closed to new replies.