Notifications
Clear all

wpForo 1.x.x [Solved] Set topic to unapproved from code

4 Posts
2 Users
0 Likes
581 Views
basatexcellent
Posts: 51
Topic starter
(@basatexcellent)
Trusted Member
Joined: 5 years ago

Is there a code snippet to set a topic (topicid is known) to unapproved from code?

3 Replies
Sofy
Posts: 4057
 Sofy
Admin
(@sofy)
Support Team
Joined: 5 years ago

Hi @basatexcellent,

I'll ask the plugin developers and let you know asap. 

2 Replies
Sofy
 Sofy
Admin
(@sofy)
Joined: 5 years ago

Support Team
Posts: 4057

@basatexcellent,

The codes you can use are provided below: 

WPF()->moderation->post_unapprove( $postid );

WPF()->moderation->post_approve( $postid );

Please pay attention that the functions are required the postID but not topicID.

basatexcellent
(@basatexcellent)
Joined: 5 years ago

Trusted Member
Posts: 51

Thanks, that works !

Share: