AI Search
Classic Search
 Search Phrase:
 Search Type:
Advanced search options
 Search in Forums:
 Search in date period:

 Sort Search Results by:

AI Assistant
Notifications
Clear all

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

4 Posts
2 Users
1 Reactions
3,286 Views
Posts: 2
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@precurseur)
New Member
Joined: 7 years ago
[#10644]

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: 5774
 Sofy
Admin
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@sofy)
Support Team
Joined: 8 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: 7 years ago

New Member
Posts: 2
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian

@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: 8 years ago

Support Team
Posts: 5774
Sofy
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian

@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.


Share: