1.5.1
🐛 Fixed
Resolved an issue (in v1.5.0) where the maintenance page content would not display, showing a blank 503 error instead.
The core HTML output method has been reverted to a highly compatible and proven approach, ensuring the maintenance page displays correctly across all environments.
Features
🔧 Enable/Disable Maintenance Mode Toggle
- Added a settings page with a checkbox to easily toggle maintenance mode.
- Utilises the WordPress Settings API for secure, standards-based option handling.
- Settings persist in the database across sessions and updates.
🖼️ Custom Maintenance Image Upload
- Seamless Media Library integration using
wp_enqueue_media()and a custom admin script. - Users can upload or select a custom image and see a live preview.
- Falls back to a default bundled image if no custom image is set.
⚙️ Improved Caching Compatibility
- Defines
DONOTCACHEPAGEto prevent caching of the maintenance page (compatible with WP Rocket and others). - Sends appropriate no-cache HTTP headers via
nocache_headers(). - Returns a
503 Service Unavailablestatus to ensure search engines don’t penalise your site and caches don’t store the page.
🔔 Administrator Notice
- Displays a visible dashboard warning when maintenance mode is active—only shown to administrators.
🧱 Object-Oriented Refactor
- Introduced a
BlogLogistics_Maintenance_Modeclass to encapsulate all plugin functionality. - Improves modularity, avoids naming conflicts, and makes the code easier to maintain and extend.
📱 Responsive & Modern Maintenance Page
- HTML5 structure with mobile-first CSS.
- Uses
clamp()andvhunits for responsive typography and image scaling. - Enhanced visuals: clean layout, soft shadows, rounded corners, and a semantic footer.
📤 Output Buffering
- Uses
ob_start()andob_end_clean()to ensure only the intended maintenance content and headers are sent—no theme or plugin interference.
🌍 Internationalisation (i18n)
- All user-facing strings are wrapped in translation functions using the correct text domain:
bloglogistics-maintenance-page.
🔐 Security Enhancements
ABSPATHcheck to prevent direct access to plugin files.- Consistent use of WordPress escaping functions (
esc_html(),esc_url(),esc_attr(), etc.). - Role-based access control using
current_user_can( 'administrator' ).