Fix CF7 tag generator buttons not appearing in admin (v0.7.2)
Moved CF7 initialization from init_frontend() to init_components() so tag generators register in admin context via wpcf7_admin_init hook. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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