Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 992d961066 | |||
| be6d9d68b5 |
@@ -5,6 +5,14 @@ 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.7.2] - 2026-02-03
|
||||
|
||||
### Fixed
|
||||
|
||||
- CF7 tag generator buttons not appearing in admin form editor
|
||||
- Moved CF7 initialization from frontend-only to run in both admin and frontend contexts
|
||||
- Tag generators now properly register via `wpcf7_admin_init` hook
|
||||
|
||||
## [0.7.1] - 2026-02-03
|
||||
|
||||
### Added
|
||||
|
||||
41
CLAUDE.md
41
CLAUDE.md
@@ -808,3 +808,44 @@ Admin features always work; frontend requires valid license.
|
||||
- Merged to main (fast-forward)
|
||||
- Tagged: `v0.7.0`
|
||||
- Pushed to origin: dev, main, v0.7.0
|
||||
|
||||
### 2026-02-03 - Version 0.7.1 (CF7 Tag Generators)
|
||||
|
||||
**Completed:**
|
||||
|
||||
- Added CF7 tag generator buttons for admin form editor
|
||||
- Hook into `wpcf7_admin_init` to register tag generators
|
||||
- `register_tag_generators()` method using `WPCF7_TagGenerator::add()`
|
||||
- BnB Building select generator with `first_as_label` option
|
||||
- BnB Room select generator with `building_field` and `include_price` options
|
||||
- BnB Check-in date generator with `min_advance` and `max_advance` options
|
||||
- BnB Check-out date generator with `checkin_field`, `min_nights`, `max_nights` options
|
||||
- BnB Guests count generator with `room_field`, `min`, `max`, `default` options
|
||||
- All generators support `id` and `class` attribute configuration
|
||||
- CF7 v2 tag generator format with `version => '2'` option
|
||||
- Removed bug from Known Bugs section in CLAUDE.md
|
||||
|
||||
**Files Changed:**
|
||||
|
||||
- `src/Integration/CF7.php` - Added ~560 lines for tag generator registration and modal callbacks
|
||||
- `CLAUDE.md` - Removed bug from Known Bugs section
|
||||
- `wp-bnb.php` - Version bump to 0.7.1
|
||||
- `CHANGELOG.md` - Added v0.7.1 release notes
|
||||
|
||||
**Learnings:**
|
||||
|
||||
- CF7 tag generators use `WPCF7_TagGenerator::get_instance()->add()` for registration
|
||||
- Tag generator callbacks receive `$contact_form` and `$options` parameters
|
||||
- CF7 v2 tag generator format requires `'version' => '2'` in options array
|
||||
- Modal HTML structure: `<header class="description-box">`, `<div class="control-box">`, `<footer class="insert-box">`
|
||||
- Form inputs use classes like `tg-name`, `oneline`, `option`, `idvalue`, `classvalue` for CF7's JavaScript handling
|
||||
- The `tag-generator-insert-button` class triggers CF7's tag insertion JavaScript
|
||||
- Mail tag tip shows users which tag to use in the Mail tab
|
||||
- Tag generators are registered at priority 60 in `wpcf7_admin_init` to appear after core tags
|
||||
|
||||
**Released:**
|
||||
|
||||
- Committed: `a784d92` on dev branch
|
||||
- Merged to main (fast-forward)
|
||||
- Tagged: `v0.7.1`
|
||||
- Pushed to origin: dev, main, v0.7.1
|
||||
|
||||
@@ -134,6 +134,12 @@ final class Plugin {
|
||||
// Initialize auto-updater (requires license configuration).
|
||||
$this->init_updater();
|
||||
|
||||
// Initialize Contact Form 7 integration if CF7 is active.
|
||||
// This runs in both admin (for tag generators) and frontend (for form rendering).
|
||||
if ( class_exists( 'WPCF7' ) ) {
|
||||
CF7::init();
|
||||
}
|
||||
|
||||
// Initialize admin components.
|
||||
if ( is_admin() ) {
|
||||
$this->init_admin();
|
||||
@@ -203,11 +209,6 @@ final class Plugin {
|
||||
|
||||
// Register widgets.
|
||||
add_action( 'widgets_init', array( $this, 'register_widgets' ) );
|
||||
|
||||
// Initialize Contact Form 7 integration if CF7 is active.
|
||||
if ( class_exists( 'WPCF7' ) ) {
|
||||
CF7::init();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* Plugin Name: WP BnB Management
|
||||
* Plugin URI: https://src.bundespruefstelle.ch/magdev/wp-bnb
|
||||
* Description: A comprehensive Bed & Breakfast management system for WordPress. Manage buildings, rooms, bookings, and guests.
|
||||
* Version: 0.7.1
|
||||
* Version: 0.7.2
|
||||
* Requires at least: 6.0
|
||||
* Requires PHP: 8.3
|
||||
* Author: Marco Graetsch
|
||||
@@ -24,7 +24,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
||||
}
|
||||
|
||||
// Plugin version constant - MUST match Version in header above.
|
||||
define( 'WP_BNB_VERSION', '0.7.1' );
|
||||
define( 'WP_BNB_VERSION', '0.7.2' );
|
||||
|
||||
// Plugin path constants.
|
||||
define( 'WP_BNB_PATH', plugin_dir_path( __FILE__ ) );
|
||||
|
||||
Reference in New Issue
Block a user