All notable changes to the LeadGen App Form Plugin will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Release Pipeline: Add Node.js setup and asset build steps to release workflow for minified assets
- Release Pipeline: Make Node.js steps conditional on
package.jsonexistence to prevent CI failures
- Vendor Assets: Ensure vendor package assets (CSS/JS) are included in release builds
- Fixed critical bug:
wp-settings-hubwas missing from release ZIPs
- Fixed critical bug:
- Unified Build: Unify release workflow and build script across all plugins
- Replace
create-release-zip.shwith unifiedbuild-release.sh - Selective copy strategy with auto-detection of plugin structure
- Remove
composer.jsonfrom ZIP (not needed at runtime) - Add PHP setup and quality gates to release workflow
- Generate MD5 + SHA256 checksums
- Replace
- GitHub Actions: Pin all dependencies to SHA hashes for supply chain protection
actions/checkout@v4.3.1shivammathur/setup-php@v2.36.0softprops/action-gh-release@v2.5.0
- CodeQL Security Scanning: Added automated security scanning workflow for vulnerability detection
- SHA-Pinned GitHub Actions: All GitHub Actions now pinned to specific commit SHAs for supply chain security
- Dependabot Integration: Automated dependency updates for GitHub Actions workflows
- Card-Based Design System: Refactored admin dashboard UI to align with modern card-based design patterns
- Improved Visual Consistency: Enhanced admin interface styling for better user experience
- Workflow Permissions: Updated GitHub Actions workflows with proper permissions configuration
- Actions SHA Pinning: Pinned all GitHub Actions to specific commit SHAs to prevent supply chain attacks
- Permission Hardening: Added explicit permissions to all workflows following security best practices
- Dependency Updates: Bumped github-actions-updates group with 4 security updates
- Polyform Noncommercial License: Updated license from GPL v2 to Polyform Noncommercial License 1.0.0
- License Documentation: Updated all license references throughout the project
- PHP 8.2+ Required: Updated minimum PHP version from 8.0 to 8.2 to support latest dependencies
- silverassist/wp-github-updater Package: Integrated reusable GitHub updater package (v1.0.1)
- Composer Autoloading: Added PSR-4 compliant Composer autoloading with production optimizations
- Build System Enhancement: Enhanced ZIP creation script with intelligent vendor dependency management
- Git Export Control: Added
.gitattributesfor automatic development file exclusion from exports
- Refactored LeadGenAppFormUpdater: Reduced from 283 lines to 50 lines (-85% code reduction) using modular approach
- Package-Based Design: Migrated from custom update implementation to reusable package pattern
- Production Dependencies: Optimized build process to include only production Composer dependencies
- Vendor Management: Intelligent vendor directory copying during release build process
- Redundant Documentation: Removed
QUICK-RELEASE.md,REFACTORING-REPORT.md,RELEASE-PROCESS.md,UPDATE-SYSTEM.md - Composer Scripts: Cleaned
composer.jsonscripts section to remove unused commands - Development Overhead: Eliminated maintenance of duplicate update system code across plugins
- Reusable Components: Update system now based on tested, reusable silverassist/wp-github-updater package
- Simplified Maintenance: Single source of truth for GitHub update functionality
- Better Build Pipeline: Enhanced release creation with proper dependency management
- Documentation Consolidation: Streamlined documentation structure with essential files only
- PSR-4 Autoloading: Modern PHP namespace organization with Composer autoloader
- Dependency Management: Production-only vendor includes for optimized distribution packages
- Modular Architecture: Update system based on configurable, extensible package design
- Version Synchronization: Automated version management across all plugin files
- Improved ZIP Creation: New
create-release-zip.shscript for proper WordPress plugin structure - WordPress Installation Compatibility: ZIP files now create clean plugin folders without version numbers
- GitHub Actions Integration: Updated release workflow to use new packaging script
- Auto Version Detection: Script automatically detects version from main plugin file
- Size Calculation: Automatic package size calculation with human-readable output
- ZIP Structure: ZIP filename includes version (
leadgen-app-form-v1.0.5.zip) but internal folder is clean (leadgen-app-form/) - Repository Cleanup: Removed auto-generated
RELEASE-NOTES.mdfrom version control - GitHub Actions: Simplified release workflow using centralized packaging script
- Documentation: Updated scripts README with comprehensive packaging documentation
- Local Testing: Easy local ZIP creation with
./scripts/create-release-zip.sh - WordPress Compatibility: Plugin installs correctly in WordPress without folder name conflicts
- Professional Structure: Clean package structure follows WordPress plugin standards
- Automated Exclusions: Development files automatically excluded from distribution packages
- File Exclusions: Automatic exclusion of
.git,node_modules,vendor, development files - Size Optimization: ~54KB distribution package with all necessary files
- Cross-Platform: Compatible ZIP creation on macOS and Linux systems
- CI/CD Integration: Seamless integration with GitHub Actions release automation
- PSR-4 Compliance: Complete migration from WordPress naming convention to PSR-4 standards
- Composer Integration: Full development environment with autoloading and quality tools
- GitHub Actions Quality Workflow: Multi-environment testing (PHP 8.0-8.3, WordPress 6.5-latest)
- Security Scanning: Automated Snyk security validation in CI/CD pipeline
- WordPress Coding Standards: Automated PHPCS integration with development workflow
- PHPUnit Framework: Testing framework ready for future unit tests (v9.6.23)
- Development Tools: Complete Composer-based development environment
- File Naming: Migrated from
class-*.phptoPascalCase.phpfor PSR-4 complianceclass-leadgen-app-form-admin.php→LeadGenAppFormAdmin.phpclass-leadgen-app-form-updater.php→LeadGenAppFormUpdater.phpclass-leadgen-form-block.php→LeadGenFormBlock.phpclass-widgets-loader.php→WidgetsLoader.phpclass-leadgen-form-widget.php→LeadGenFormWidget.php
- Namespace Organization: Enhanced PSR-4 namespace hierarchy
LeadGenAppForm(main namespace)LeadGenAppForm\Block(Gutenberg blocks)LeadGenAppForm\Elementor\Widgets(Elementor widgets)
- Autoloading: Composer-managed class loading replaces manual require statements
- 775 Format Issues Fixed: Automated PSR-12 code formatting improvements
- Quality Gates: Multi-environment compatibility validation
- Development Workflow: Integrated quality checks with
composer run phpcs|phpcbf|lint - Documentation: Updated all documentation to reflect PSR-4 architecture
- CI/CD Pipeline: Complete automated quality assurance with GitHub Actions
- Composer Scripts:
phpcs,phpcbf,lint,testcommands for quality assurance - Multi-PHP Testing: Automated compatibility testing across PHP 8.0-8.3
- Multi-WordPress Testing: Compatibility validation with WordPress 6.5-latest
- Dependency Management: Professional package management with security scanning
- Standards Compliance: WordPress Coding Standards enforcement with automated fixes
- Shortcode Height Customization: Added
desktop-heightandmobile-heightattributes to[leadgen_form]shortcode - Professional UI Controls: Advanced controls with SelectControl for units and NumberControl/RangeControl inputs
- Organized Control Panels: Clean separation with dividers, headings, and logical grouping in both Gutenberg and Elementor
- Live Preview Enhancement: Real-time preview showing configured heights in editor interfaces
- Smart Shortcode Generation: Intelligent shortcode output that only includes height attributes when customized
- Enhanced Validation: Range controls and NumberControl inputs prevent invalid height values automatically
- Cross-Platform Consistency: Identical functionality between Gutenberg blocks and Elementor widgets
- Multiple Unit Support: Support for px, em, rem, vh, vw, and percentage units with descriptive labels
- Responsive Height Support: Automatic height adjustment based on device viewport with smooth transitions
- CSS Transitions: Smooth height changes with 0.3s ease transitions for professional appearance
- Gutenberg Block UI: Separate "Placeholder Height Settings" panel with professional SelectControl and RangeControl
- Elementor Widget UI: Organized controls with separators, headings, and NumberControl inputs for precision
- Visual Feedback: Live preview showing current height configuration in both editor interfaces
- Error Prevention: Range validation prevents extreme values (1-2000 range) with automatic defaults
- Smart Defaults: Height controls show meaningful defaults (600px desktop, 300px mobile)
- Intelligent Organization: Visual grouping with separators and descriptive headings for better UX
- SelectControl Integration: Professional unit selector with descriptive labels for better clarity
- RangeControl Implementation: Smooth slider controls for precise height adjustment in Gutenberg
- NumberControl Addition: Direct numeric input for Elementor widget precision and validation
- Smart Attribute Handling: Only outputs height attributes when they differ from defaults for clean shortcodes
- Enhanced JavaScript: Improved client-side validation with regex pattern matching for units
- Updated Documentation: Complete examples and usage guide for all new professional controls
- Automated Version Update Script:
update-version.sh- Comprehensive script for updating all plugin file versions simultaneously - Version Consistency Checker:
check-versions.sh- Validation tool to ensure version consistency across all files - Interactive Version Updates: Confirmation prompts and detailed progress reporting during version changes
- Comprehensive File Coverage: Automatic updates for PHP, CSS, JavaScript, and block metadata files
- Development Workflow Integration: Complete automation scripts integrated into development documentation
- Smart Version Detection: Automatic detection of current versions with validation before updates
- Colorized Output: Visual feedback with color-coded status messages for better developer experience
- Safety Validations: Semantic version format checking and confirmation prompts prevent errors
- Updated Documentation: README.md and copilot instructions reflect new automation scripts
- Complete File Mapping: Updated plugin structure to include all automation and development tools
- Release Workflow Integration: Version management scripts integrated into release procedures
- Streamlined Version Updates: Eliminates manual version updating across multiple files
- Reduced Human Error: Automated validation prevents version inconsistencies
- Improved Developer Productivity: One-command version updates for efficient release cycles
- Custom GitHub Update Integration: Professional update system using GitHub API for public repositories
- WordPress Native Experience: Updates appear in standard WordPress admin interface alongside core and plugin updates
- Admin Settings Page: Dedicated admin interface at Settings → LeadGen Forms for update management
- Manual Update Checking: One-click "Check for Updates" button for immediate update verification
- Real-Time AJAX Status: Dynamic update status display without page refresh
- Intelligent Caching System: 12-hour caching to minimize GitHub API calls and improve performance
- Version Comparison Logic: Smart version detection with proper semantic version handling
- Background Processing: Non-blocking update detection that doesn't impact site performance
- Error Handling & Fallbacks: Graceful degradation when GitHub API is unavailable
- Professional Distribution: Automated release packages (~38KB) with optimized file structure
- Automated Release Workflow: Complete release automation via GitHub Actions
- Package Size Verification: Automatic package size calculation and verification for releases
- Pull Request Integration: Package size reporting on pull requests for transparency
- Version Management: Automatic version bumping across all plugin files
- Distribution Optimization: Excludes development files from release packages
- Release Documentation: Auto-generated RELEASE-NOTES.md with each release
- Quality Assurance: Automated syntax checking and code validation
- Settings Page Integration: Native WordPress admin page with professional styling
- Update Status Dashboard: Clear display of current version, available updates, and system status
- User-Friendly Notifications: Professional update notifications with clear call-to-action
- AJAX-Powered Interface: Smooth user experience with real-time status updates
- Error Reporting: Clear error messages and troubleshooting information
- Professional Styling: Consistent with WordPress admin design patterns
- Accessibility Features: Screen reader compatible and keyboard navigation support
- Public Repository Architecture: Optimized for public GitHub repositories without authentication overhead
- WordPress Transient Caching: Efficient caching using WordPress native transient API
- Hook Integration: Seamless integration with WordPress update hooks and filters
- API Error Handling: Robust error handling for network issues and API limitations
- Security Best Practices: Secure update delivery and verification processes
- Performance Optimization: Minimal impact on site performance with smart caching
- Comprehensive Documentation: Complete update system documentation in UPDATE-SYSTEM.md
- Code Quality Standards: ESLint configuration for WordPress JavaScript development
- Header Standards: Standardized file headers across all plugin files in HEADER-STANDARDS.md
- String Interpolation Patterns: Modern PHP string interpolation for improved code readability
- Development Commands: Complete testing and validation commands for all plugin components
- Release Automation: Scripts for local package size calculation and release preparation
- New PHP Classes:
LeadGen_App_Form_Updater- GitHub API integration and update logicLeadGen_App_Form_Admin- WordPress admin interface and settings management
- New JavaScript:
leadgen-admin.js- AJAX handlers for real-time update status - Enhanced Error Handling: Comprehensive error boundaries and user-friendly error messages
- Modern PHP Practices: Continued use of PHP 8.0+ features with improved string interpolation
- WordPress Integration: Deep integration with WordPress update infrastructure
- GitHub API Integration: Direct integration with GitHub releases API for update detection
- No Authentication Required: Works seamlessly with public repositories
- Professional Update Flow: Standard WordPress update experience users expect
- Automatic Version Detection: Intelligent comparison of local vs. remote versions
- One-Click Updates: Standard WordPress "Update Now" functionality
- Update Verification: Ensures successful update installation and activation
- WordPress Shortcode System:
[leadgen_form]with desktop-id and mobile-id parameters - Gutenberg Block Integration: Native block editor support with visual interface
- Elementor Widget Integration: Custom Elementor widget for page builder users
- Block Editor UI: Intuitive sidebar controls for form configuration
- Elementor Visual Interface: Drag-and-drop widget with native Elementor styling controls
- Live Block Preview: Real-time validation and configuration status display
- Visual Form Indicators: Clear feedback for configured vs unconfigured states
- Responsive Form Logic: Intelligent device detection and form switching
- Server-Side Block Rendering: SEO-friendly block output using existing shortcode system
- Multiple Integration Methods: Shortcode, Gutenberg block, and Elementor widget support
- Minimal user interaction pattern for enhanced performance
- CSS pulse animation placeholder during form loading
- External form script integration with LeadGen App API
- Conditional asset loading (only loads when shortcode is present)
- Dynamic form switching based on viewport changes
- Public JavaScript API for manual form control
- LeadGen Form Widget: Custom Elementor widget with native interface
- Widget Category: Organized under "LeadGen Forms" category in Elementor panel
- Visual Configuration: Form ID settings with validation and error prevention
- Style Controls: Alignment, width, and responsive settings in Elementor Style tab
- Live Preview: Configuration preview directly in Elementor editor
- Error Handling: Visual validation with user-friendly error messages
- Consistent Rendering: Uses same shortcode logic for reliable behavior
- Conditional Loading: Only loads when Elementor is active
- Namespace Organization:
LeadGenAppForm\Elementor\Widgetsnamespace structure
- Namespace Organization: Clean code structure with
LeadGenAppForm,LeadGenAppForm\Block, andLeadGenAppForm\Elementor\Widgetsnamespaces - Match Expression: Modern conditional logic replacing complex if/else chains (PHP 8.0+)
- Array Spread in Arrays: Efficient array building using spread operator
...(PHP 8.0+) - Typed Properties:
private static ?LeadGen_App_Form $instance = null(PHP 7.4+) - Return Type Declarations: All methods have explicit return types
get_instance(): LeadGen_App_Formrender_shortcode($atts): stringextract_shortcode_instances($content): arrayinit_plugin(): void,enqueue_scripts(): void, etc.
- Null Coalescing Operator: Clean default value handling with
??operator - Void Return Types: Explicit void returns for methods that don't return values
- Global Function Calls: Proper namespace handling with
\prefix for WordPress functions
- Complete PHPDoc and JSDoc Documentation: Professional-grade code documentation
- Modern PHP Syntax: Short arrays
[], double quotes, const usage where applicable - Translation Support: Full i18n support with text domain
leadgen-app-form - Data Sanitization: Comprehensive input sanitization with
sanitize_text_field() - Error Handling: Graceful error handling and user-friendly error messages
- Hook-Based Architecture: Clean separation using WordPress action/filter hooks
- Activation/Deactivation Hooks: Proper plugin lifecycle management with rewrite rule flushing
- Conditional Asset Loading: Smart loading of CSS/JS only when shortcode or block is present
- Organized File Structure: Maintainable folder structure following WordPress standards
- Minimal User Interaction Pattern: Forms load only on user engagement (focus, mousemove, scroll, touch)
- Intelligent Script Management: Prevents duplicate external script loading via Set() tracking
- Conditional WordPress Asset Enqueuing: Loads plugin assets only when needed
- Responsive Form Switching: Dynamic form switching based on viewport changes without page reload
- CSS Pulse Animation Placeholder: Smooth loading animations during form initialization
- Optimized External API Integration: Efficient loading from
https://forms.leadgenapp.io/js/lf.min.js/{id} - Smart Device Detection: Uses WordPress native
wp_is_mobile()for reliable device detection - Performance Monitoring: Built-in console logging for debugging and performance analysis
- Singleton Pattern Implementation: Memory-efficient single instance for main plugin class
- Block Handler Singleton: Separate singleton for Gutenberg block management
- Server-Side Block Rendering: Uses existing shortcode system for consistent output
- Hook-Based Plugin Architecture: Clean separation of concerns using WordPress hooks
- Extensible Class Structure: Organized includes/ folder ready for future expansion
- Modern Block Registration: Uses both
block.jsonmetadata and PHP registration - Type-Safe Development: Leverages PHP 7.4+ typed properties for better code reliability
- Comprehensive API Documentation: Complete PHPDoc for all classes and methods
- JavaScript Public API: Extended
window.LeadGenFormAPI for advanced integrations - Block Development Standards: Follows WordPress block development best practices
- Translation Ready: Full internationalization support with proper text domain
- Debug-Friendly Code: Extensive console logging and error reporting for development
- Code Quality Standards: Modern PHP syntax with type safety and clear documentation
- PHP: 8.0 or higher (leverages match expressions, array spread, and modern namespaces)
- WordPress: 5.0 or higher (required for Gutenberg block support)
- Dependencies: jQuery (bundled with WordPress), WordPress Block Editor APIs
- External API: Seamless integration with
https://forms.leadgenapp.io/js/lf.min.js/{id} - Custom Elements: Creates
<leadgen-form-{id}>elements dynamically via external API - Data Flow: PHP shortcode → wp_localize_script() → JavaScript configuration → External API
- CSS Classes:
.leadgen-form-container,.leadgen-form-placeholder,.leadgen-pulse-animation - Block Namespace:
leadgen/form-blockregistered in WordPress block registry - File Structure: Organized with
/blocks/,/includes/, and/assets/directories - Namespace Structure:
LeadGenAppForm(main),LeadGenAppForm\Block(Gutenberg blocks),LeadGenAppForm\Elementor\Widgets(Elementor widgets) - Modern PHP Standards: PHP 8.0+ features including match expressions, array spread, and string interpolation
- Update System Integration: GitHub API → WordPress transients → Admin interface → Native WordPress updates
- Admin Integration: Settings → LeadGen Forms admin page with real-time update status
- Release Automation: GitHub Actions → Automated releases → Update notifications