Notifications
Clear all

Limited Support

Our team is currently on holiday, so support will be limited during this period. Response times may be slower than usual, and some inquiries may be delayed.
We appreciate your patience and understanding, and we’ll resume our usual support by the end of August.

 

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

4 Posts
2 Users
0 Reactions
1,166 Views
Posts: 51
Topic starter
(@basatexcellent)
Trusted Member
Joined: 8 years ago

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

3 Replies
Sofy
Posts: 5483
 Sofy
Admin
(@sofy)
Support Team
Joined: 8 years ago

Hi @basatexcellent,

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

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

Support Team
Posts: 5483

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

Trusted Member
Posts: 51

Thanks, that works !