Notifications
Clear all

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

4 Posts
2 Users
0 Reactions
931 Views
Posts: 51
Topic starter
(@basatexcellent)
Trusted Member
Joined: 7 years ago

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

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

Hi @basatexcellent,

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

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

Support Team
Posts: 4772

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

Trusted Member
Posts: 51

Thanks, that works !