Watchlist
The watchlist lets logged-in users track specific wiki pages and receive email notifications whenever those pages are edited.
How the Watchlist Works
Section titled “How the Watchlist Works”Each user maintains a personal watchlist stored in user meta (_wbmw_watchlist key) as an array of wiki page IDs. The list is private - users cannot see each other’s watchlists.
When a watched page is saved, the plugin emails every watcher (except the user who made the edit) with a notification containing:
- The page title
- The name of the editor who made the change
- A link to view the page
- A link to the page’s revision history
Notifications are sent only if the Enable Watchlist Emails setting is enabled (default: yes).
Watching a Page
Section titled “Watching a Page”To watch a page, visit any published wiki page and click Watch. The button appears in the page action bar. If you are already watching a page, the button shows Unwatch.
Watch and Unwatch actions update immediately via AJAX without a page reload.
Viewing Your Watchlist
Section titled “Viewing Your Watchlist”Your watchlist is accessible from the wiki dashboard. The watchlist view shows:
- All watched pages you are currently subscribed to, ordered by most recently modified first
- The time since each page was last updated
- An Unwatch button to remove a page from your list
Pages that have been deleted or unpublished are automatically excluded from the list display.
The watchlist fetches up to 50 watched pages at once.
Accessing the Watchlist
Section titled “Accessing the Watchlist”The watchlist is accessed via the wiki dashboard with the following URL parameter:
?wbmw_action=watchlistEmail Notification Format
Section titled “Email Notification Format”Notification emails are plain-text and include:
Subject: [Site Name] Wiki page "Page Title" has been updated
Hi [Watcher Name],
The wiki page "Page Title" has been updated by [Editor Name].
View the page: https://example.com/wiki/page-title/View history: https://example.com/wiki-dashboard/?wbmw_action=history&wbmw_page_id=123
You are receiving this because you are watching this page.Developer: Watchlist Class
Section titled “Developer: Watchlist Class”The watchlist is managed by the WBMW_Watchlist class (static methods):
// Check if the current user is watching a pageWBMW_Watchlist::is_watching( $page_id );
// Get a user's full watchlist (returns array of page IDs)WBMW_Watchlist::get_watchlist( $user_id );
// Add a page to a user's watchlistWBMW_Watchlist::watch( $page_id, $user_id );
// Remove a page from a user's watchlistWBMW_Watchlist::unwatch( $page_id, $user_id );
// Get all user IDs watching a specific pageWBMW_Watchlist::get_watchers( $page_id );User Meta Key
Section titled “User Meta Key”| Meta Key | Type | Description |
|---|---|---|
_wbmw_watchlist |
int[] | Serialized array of watched wiki page IDs, stored per user |

