Developer Reference
Settings, Shortcodes & REST API
Settings Panel
All configuration is done from Coming Soon → Settings. There are no shortcodes needed to activate the plugin — it intercepts requests at the WordPress template_redirect hook.
Setting
Default
Description
Mode
Off
Off / Coming Soon / Maintenance Mode
Headline
"We're Coming Soon"
Main heading shown on the page
Sub-message
""
Optional paragraph below the heading
Launch Date
30 days ahead
Target date for the countdown timer
Retry-After
3600
Seconds until next crawl attempt (Maintenance Mode)
Background Type
Color
Color / Gradient / Image / Video URL
Subscriber Form
Enabled
Show or hide the email capture form
Progress %
0
Completion percentage for the progress bar (0 = hidden)
Whitelist URLs
""
Comma-separated URL slugs to bypass the mode
Logo
Site logo
Upload a custom logo for the coming soon page
Bypass Logic
The plugin hooks into template_redirect at priority 1. Bypass conditions are checked in this exact order:
// Bypass order (first match wins, site loads normally)
1. current_user_can( 'manage_options' ) → always bypass
2. is_admin() → wp-admin always accessible
3. is_user_logged_in() + bypass role set → optional role bypass
4. current URL matches whitelist slug → specific pages bypass
5. REST API requests → always bypass
else → serve Coming Soon / Maintenance page
Subscriber Form
The subscriber capture form is rendered on the coming soon page automatically when enabled. It submits via AJAX using wp_ajax_nopriv_wpcm_subscribe.
/* Form submits to: admin-ajax.php */
action: "wpcm_subscribe"
fields: email (required), nonce
/* Response */
{ success: true, message: "Thank you! We'll notify you at launch." }
{ success: false, message: "You're already on the list!" }
REST API
| Method | Endpoint | Auth | Description |
GET | /wp-json/wpcm/v1/status | Public | Returns current mode, subscriber count, and launch date. |
GET | /wp-json/wpcm/v1/subscribers | Admin | List subscribers with email and signup timestamp. |
POST | /wp-json/wpcm/v1/subscribe | Public | Add subscriber programmatically. Body: { "email": "…" }. |
DELETE | /wp-json/wpcm/v1/subscribers/{email} | Admin | Remove a subscriber by email address. |
WP-CLI Support
# Enable coming soon mode from the command line
wp wpcm enable --mode=coming-soon
# Enable maintenance mode
wp wpcm enable --mode=maintenance
# Disable and restore normal site
wp wpcm disable
# Export subscribers to CSV
wp wpcm export-subscribers --file=subscribers.csv