Pending Review & Moderation
When users submit wiki pages with the Pending status, those pages enter a review queue before they are published. This lets site editors or administrators review and approve community contributions before they appear publicly.
How the Pending Queue Works
Section titled “How the Pending Queue Works”A page enters the pending queue when a contributor saves it with the Pending status. Pending pages are:
- Not publicly visible
- Listed in the Pending Review queue on the wiki dashboard
- Accessible to moderators who can approve or reject them
Accessing the Pending Queue
Section titled “Accessing the Pending Queue”The pending review queue is available to users with the Edit Others role permission or administrators. Access it via:
?wbmw_action=pendingThe queue header shows the total count of pages awaiting review, e.g. “Pending Review (4)”.
Reviewing a Submission
Section titled “Reviewing a Submission”Each item in the queue shows:
- Page title
- Author display name
- Time since submission
Three actions are available for each pending page:
| Action | What it does |
|---|---|
| Review | Opens the page in the editor so you can read and optionally edit it before deciding |
| Approve | Publishes the page immediately, making it publicly visible |
| Reject | Moves the page to trash |
Approve and Reject
Section titled “Approve and Reject”Approve and Reject are link-based actions secured with WordPress nonces:
- Approve URL pattern:
?wbmw_action=approve&wbmw_page_id={id}&_wpnonce={nonce} - Reject URL pattern:
?wbmw_action=reject&wbmw_page_id={id}&_wpnonce={nonce}
Only users whose roles have can_approve() permission (determined by the Edit Others role setting) can perform these actions.
Who Can Moderate
Section titled “Who Can Moderate”The can_approve() permission check grants moderation access to:
- Administrators - always have access
- Users in the Edit Others roles - configured in WB Plugins > Member Wiki > Permissions
Admin Email Notification
Section titled “Admin Email Notification”When a moderated-role user submits a new wiki page that lands in pending status, the plugin automatically sends an HTML notification email to the configured moderator address.
Email contents:
- Page title
- Submitter’s display name
- Pending status badge
- Direct link to the pending review queue in WordPress admin
Configure the recipient at WB Plugins > Member Wiki > General > Pending Review Email. Leave blank to use the site admin email.
The notification email template is located at templates/email-pending-notification.php and can be overridden in your theme at your-theme/wb-member-wiki/email-pending-notification.php.
To override the recipient address programmatically:
add_filter( 'wbmw_pending_notify_email', function( $email ) { return 'moderators@yoursite.com';} );Developer Hooks
Section titled “Developer Hooks”Two actions fire during the moderation workflow:
wbmw_page_approved
Section titled “wbmw_page_approved”Fired after a pending page is approved and published.
add_action( 'wbmw_page_approved', function( $page_id, $user_id ) { // Example: notify the page author that their submission was approved $author_id = get_post_field( 'post_author', $page_id ); $author = get_userdata( $author_id ); if ( $author && $author_id !== $user_id ) { wp_mail( $author->user_email, 'Your wiki page was approved', 'Your submission "' . get_the_title( $page_id ) . '" has been published.' ); }}, 10, 2 );| Parameter | Type | Description |
|---|---|---|
$page_id |
int | Wiki page ID that was approved |
$user_id |
int | User ID who performed the approval |
wbmw_page_rejected
Section titled “wbmw_page_rejected”Fired after a pending page is rejected (moved to trash).
add_action( 'wbmw_page_rejected', function( $page_id, $user_id ) { // Example: log rejections for auditing error_log( sprintf( 'Wiki page %d rejected by user %d', $page_id, $user_id ) );}, 10, 2 );| Parameter | Type | Description |
|---|---|---|
$page_id |
int | Wiki page ID that was rejected |
$user_id |
int | User ID who performed the rejection |

