Add frontend features with search, shortcodes, widgets, and blocks (v0.6.0)
All checks were successful
Create Release Package / build-release (push) Successful in 1m20s
All checks were successful
Create Release Package / build-release (push) Successful in 1m20s
- Room search with availability, capacity, room type, amenity, price range, and building filters - AJAX-powered search with pagination and load more - Shortcodes: [bnb_buildings], [bnb_rooms], [bnb_room_search], [bnb_building], [bnb_room] - Widgets: Similar Rooms, Building Rooms, Availability Calendar - Gutenberg blocks: Building, Room, Room Search, Buildings List, Rooms List - Frontend CSS with responsive design and CSS custom properties - Frontend JavaScript with SearchForm, CalendarWidget, AvailabilityForm, PriceCalculator Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
69
CHANGELOG.md
69
CHANGELOG.md
@@ -5,6 +5,74 @@ All notable changes to this project will be documented in this file.
|
||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## [0.6.0] - 2026-02-02
|
||||
|
||||
### Added
|
||||
|
||||
- Frontend Features System:
|
||||
- Room search with multiple filters (availability, capacity, room type, amenities, price range, building)
|
||||
- AJAX-powered search with pagination and "Load More" functionality
|
||||
- Date validation (check-out after check-in, minimum today)
|
||||
- Real-time availability checking on single room pages
|
||||
- Price calculator with breakdown display
|
||||
- Shortcodes:
|
||||
- `[bnb_buildings]` - Display buildings list/grid with filtering and sorting
|
||||
- `[bnb_rooms]` - Display rooms list/grid with multiple filter options
|
||||
- `[bnb_room_search]` - Interactive room search form with results
|
||||
- `[bnb_building id="X"]` - Display single building details
|
||||
- `[bnb_room id="X"]` - Display single room details with availability form
|
||||
- WordPress Widgets:
|
||||
- Similar Rooms widget (shows rooms from same building/type)
|
||||
- Building Rooms widget (lists all rooms in a building)
|
||||
- Availability Calendar widget (mini calendar with booking status)
|
||||
- Gutenberg Blocks:
|
||||
- Building block with ID selector
|
||||
- Room block with ID selector
|
||||
- Room Search block with filter presets
|
||||
- Buildings List block with layout options
|
||||
- Rooms List block with filter options
|
||||
- Server-side rendered blocks for consistent output
|
||||
- Frontend Search Class (`src/Frontend/Search.php`):
|
||||
- Core search functionality with availability filtering
|
||||
- Price range filtering with Calculator integration
|
||||
- Pagination support
|
||||
- AJAX endpoints: search_rooms, get_availability, get_calendar, calculate_price
|
||||
- Room data formatting for JSON responses
|
||||
- Frontend Shortcodes Class (`src/Frontend/Shortcodes.php`):
|
||||
- All shortcode registration and handlers
|
||||
- Grid/list layout support
|
||||
- Column configuration (1-4 columns)
|
||||
- Sorting options (title, date, price, capacity)
|
||||
- Limit and offset support
|
||||
- Block Registrar Class (`src/Blocks/BlockRegistrar.php`):
|
||||
- Gutenberg block registration
|
||||
- Block editor assets (CSS/JS)
|
||||
- Server-side render callbacks
|
||||
- Block data localization for editor
|
||||
- Frontend Assets:
|
||||
- Comprehensive CSS with CSS custom properties for theming
|
||||
- Building and room card styles
|
||||
- Search form and results styling
|
||||
- Calendar widget styling with availability states
|
||||
- Responsive design (breakpoints: 480px, 768px, 1024px)
|
||||
- JavaScript with SearchForm, CalendarWidget, AvailabilityForm, PriceCalculator classes
|
||||
- AJAX integration with proper error handling
|
||||
- XSS-safe DOM construction (no innerHTML with user data)
|
||||
|
||||
### Changed
|
||||
|
||||
- Plugin.php updated with frontend component initialization
|
||||
- Frontend assets now include localized script data with AJAX URL, nonce, and i18n strings
|
||||
- Widget registration added to init_frontend() method
|
||||
- Search, Shortcodes, and BlockRegistrar initialized when license is valid
|
||||
|
||||
### Security
|
||||
|
||||
- AJAX nonce verification on all frontend requests
|
||||
- Input sanitization on all search parameters
|
||||
- Output escaping in shortcode and widget templates
|
||||
- XSS prevention in JavaScript (textContent instead of innerHTML)
|
||||
|
||||
## [0.5.0] - 2026-01-31
|
||||
|
||||
### Added
|
||||
@@ -290,6 +358,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
- Input sanitization and output escaping
|
||||
- Server secret masking in license settings
|
||||
|
||||
[0.6.0]: https://src.bundespruefstelle.ch/magdev/wp-bnb/releases/tag/v0.6.0
|
||||
[0.5.0]: https://src.bundespruefstelle.ch/magdev/wp-bnb/releases/tag/v0.5.0
|
||||
[0.4.0]: https://src.bundespruefstelle.ch/magdev/wp-bnb/releases/tag/v0.4.0
|
||||
[0.3.0]: https://src.bundespruefstelle.ch/magdev/wp-bnb/releases/tag/v0.3.0
|
||||
|
||||
Reference in New Issue
Block a user