Skip to content

1.5.1

Choose a tag to compare

@bloglogisticsdev bloglogisticsdev released this 31 May 18:10
· 23 commits to main since this release
5a62846

🐛 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 DONOTCACHEPAGE to 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 Unavailable status 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_Mode class 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() and vh units for responsive typography and image scaling.
  • Enhanced visuals: clean layout, soft shadows, rounded corners, and a semantic footer.

📤 Output Buffering

  • Uses ob_start() and ob_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

  • ABSPATH check 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' ).