[1.0.6] - 2025-01-11
🔄 Changed - Major Refactoring
- BREAKING CHANGE: Merged
Configuration.php and ConsentStorage.php into CookieConsentPlugin.php
- All plugin logic is now contained in a single file for simplified maintenance
- Removed external class dependencies
✨ Added - New Features
- Added private methods for JavaScript script generation (dark mode, consent recording, console filtering)
- Added dedicated route handlers for better code organization
- Improved error handling with try/catch blocks in all critical methods
- Added reflection-based configuration access in admin view
🐛 Fixed - Bug Fixes
- Critical fix: Corrected banner style (Box/Bar) that wasn't applying correctly
- Force 'box' style when position contains 'left' or 'right' (incompatible with 'bar' layout)
- Fixed position mapping to comply with CookieConsent specifications
- Fixed
isPluginActive() to check only the active field in plugin.json
- Fixed script loading order to ensure
recordCookieConsent is defined before CookieConsent.run()
- Fixed translation file paths (changed from
.json to .php)
- Admin view fix: Removed
require_once calls to deleted Configuration.php and ConsentStorage.php files
- Implemented direct file reading for consents in admin view
🎨 Improved - Enhancements
- Optimized inline script generation to reduce code duplication
- Enhanced dark mode handling with Bootstrap 5.3.8 synchronization
- Refactored view preparation methods for better clarity
- Improved translation handling with automatic fallback to English
- Optimized consent storage with better duplicate handling
- Streamlined admin view to work with unified plugin structure
📚 Documentation
- Added detailed comments for each code section
- Documented private methods to facilitate maintenance
- Added clearly identified sections (Configuration, Storage, Routes, etc.)
⚙️ Technical
- Removed unnecessary
require_once statements (everything in same class)
- Used private methods instead of static classes
- Better encapsulation with
self::$storageFile and self::$lockKey
- Simplified routing logic with dedicated handlers
- Admin view now uses Reflection API to access private configuration method
- Direct file access for consent storage instead of external class calls
🗂️ File Structure Changes
Deleted files (functionality merged into CookieConsentPlugin.php):
src/Configuration.php ❌
src/ConsentStorage.php ❌
Modified files:
CookieConsentPlugin.php - Now contains all functionality
views/admin.php - Updated to work without external classes
plugin.json - Version updated to 1.0.6
Unchanged files (no modifications needed):
views/frontend/privacy.php ✅
views/frontend/cookies.php ✅
Contributors
- Flatboard Team - Initial work and maintenance
- Community contributors welcome!
License
GPL-3.0 License - Copyright © 2025 Flatboard Team
This plugin is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
Acknowledgments
- Built with vanilla-cookieconsent
- Compliant with GDPR, ePrivacy Directive, and other privacy regulations
- Designed for Flatboard 5
Last Updated: January 11, 2025
Current Version: 1.0.6
Status: Stable