DocsOForumModeration
Reference

Moderation

OForumorravo.com/docs/oforum/moderation

Permission levels

ConstantLevelDescription
OF_Permissions::LEVEL_BANNED-1Banned user
OF_Permissions::LEVEL_NEW0New member (first posts need approval)
OF_Permissions::LEVEL_MEMBER1Regular member
OF_Permissions::LEVEL_MOD2Room moderator
OF_Permissions::LEVEL_ADMIN3Admin (WordPress admins auto-get this)

Set a user's permission level:

phpOF_Permissions::set_level($user_id, OF_Permissions::LEVEL_MOD);

Auto-moderation

When a new thread or reply is submitted by a user at LEVEL_NEW (trust level 0), the post status is automatically set to pending instead of publish. It appears in the Moderation → Pending Approval queue.

Report queue

Users can report content by clicking the Report button on any reply. Reports go into the moderation queue at Moderation → Flagged Reports.

From the queue, moderators can:

  • ✓ Approve — publish the post
  • ⚠ Warn — send a moderation email to the author (no post action)
  • 🗑 Delete — trash the post
  • ✕ Dismiss — dismiss the report without action

Shadow ban

Shadow banning marks a user's future posts as only visible to themselves and moderators. Other users do not see the posts.

phpOF_Moderation::shadow_ban_user($user_id, $mod_user_id);
OF_Moderation::unshadow_ban_user($user_id, $mod_user_id);
$is_banned = OF_Moderation::is_shadow_banned($user_id);

IP ban

Ban an IP address from posting:

php// Permanent ban
OF_Moderation::ban_ip('192.168.1.1', $mod_id, 'Spam', null);

// Timed ban (expires 2026-12-31)
OF_Moderation::ban_ip('192.168.1.1', $mod_id, 'Abuse', '2026-12-31 23:59:59');

OF_Moderation::unban_ip('192.168.1.1', $mod_id);
$is_banned = OF_Permissions::is_ip_banned('192.168.1.1');

IP bans block the post/reply REST API endpoints. The auto-moderation hook also checks IPs on reply submission.

Audit log

Every moderation action is logged to wp_of_mod_log. View the log at Moderation → Audit Log.

php$log = OF_Moderation::get_log(50); // Last 50 entries

Moderation — OForum Docs — Orravo