Notifications
Clear all

[Solved] How to force topic/post moderation according to a user metadata

4 Posts
2 Users
1 Reactions
1,211 Views
Posts: 2
Topic starter
(@precurseur)
New Member
Joined: 5 years ago

Hello !

I need to force every topic/post as unapproved according to some user metada (some user have a "child" metata and I need to force moderation for them).

Is there a way to do that ? I'm quite new to Wordpress development but I'm experienced with PHP.
Maybe au hook or a fllter ?

If I can't do that based on a metadata, is there a way to do that from the user group/role ?

Thank you for any help 🙂

Topic Tags
3 Replies
Sofy
Posts: 4871
 Sofy
Admin
(@sofy)
Support Team
Joined: 7 years ago

Hi @precurseur,

I'm really sorry, but there is no hook for this purpose.

However, your issue can be solved in the following way:

1. Create a new usergroup called for example require_moderation. 

2. Enable all necessary CANs, just keep the "Can pass moderation" disabled. In this case, all posts will become unapproved.

3. Check and make sure the right Forum access is assigned to the require_moderation usergroup in the "Forum permission" section.

4. Change the usergroup of the current user to require_moderation.

This is a good approach as far as there can be other users, whose posts you'd prefer to moderate or probably in future you'll trust the user and want the user's posts do not require moderation. In this case, you'll just need to change usergroup of the user instead of using additional codes. 

2 Replies
(@precurseur)
Joined: 5 years ago

New Member
Posts: 2

@sofy

Thank you a lot for you quick reply !
OK, I will try your solution but it looks a bit more tricky...

Cheers,

Sofy
 Sofy
Admin
(@sofy)
Joined: 7 years ago

Support Team
Posts: 4871

@precurseur

it looks a bit more tricky...

Believe me, it doesn't. The plugin has dozens of options and features. So just keep reading the documentation and you'll be able to create a supper forum totally free with wpForo:

https://wpforo.com/documentation/

In any case, we'll help you to solve the issues as much as possible.