A comprehensive WordPress plugin for creating and managing professional email campaigns with dynamic content integration. Features Mailchimp API integration, custom email templates with block-based design, automated campaign generation, and seamless WordPress post type management.
- Block-Based Email Design: Create beautiful email templates using WordPress block editor
- Custom Post Type: Dedicated
cb_email_templatepost type for template management - Template Categories: Organize templates by purpose (newsletter, promotional, welcome, etc.)
- Responsive Design: Email-safe HTML generation with CSS inlining
- Mailchimp API Integration: Full integration with Mailchimp's powerful email platform
- Campaign Management: Create and update campaigns directly from WordPress
- Audience Management: Sync and manage Mailchimp audiences
- Template Mapping: Map WordPress content to Mailchimp email templates
- Dynamic Content: Automatically generate campaigns from WordPress posts and pages
- Post Type Configuration: Choose which post types are available for campaigns
- Content Filtering: Include/exclude specific posts based on criteria
- Rich Content Support: Handles images, excerpts, titles, and custom fields
- Service Container: Dependency injection for clean code organization
- Provider Interface: Extensible architecture for multiple email providers
- REST API: Complete REST API for all plugin operations
- Admin Interface: Professional WordPress admin integration
- Rate Limiting: Built-in rate limiting for API calls
- Error Handling: Comprehensive error handling and user feedback
- Debug Logging: Debug-mode logging for development
- Security: Proper data sanitization and validation throughout
- Performance Optimization: Critical resource preloading and intelligent asset management
- WordPress: 6.5.0 or higher
- PHP: 8.2 or higher
- MySQL: 5.6 or higher
- Memory: 128MB RAM minimum (256MB recommended)
- HTTPS: Required for secure API communications
- Chrome 80+
- Firefox 75+
- Safari 13+
- Edge 80+
- Go to Plugins > Add New in your WordPress admin
- Search for "CampaignBridge"
- Click Install Now
- Click Activate
- Download the plugin from the WordPress plugin repository
- Upload to
/wp-content/plugins/directory - Activate through Plugins > Installed Plugins
- Navigate to CampaignBridge > Settings
- Go to CampaignBridge > Settings in your admin menu
- Configure your email service provider (Mailchimp)
- Enter your API credentials
- Select your audience/list
- Save your configuration
- Navigate to CampaignBridge > Post Types
- Select which post types should be available for campaigns
- Configure content inclusion rules
- Save your configuration
- Go to CampaignBridge > Email Templates
- Create new templates using the block editor
- Configure template settings (width, category, status)
- Preview and publish templates
- Select Content: Choose posts from configured post types
- Choose Template: Select from available email templates
- Configure Campaign: Set campaign parameters and audience
- Send Campaign: Send immediately or schedule for later
- Template Editor: Use WordPress block editor for design
- Template Categories: Organize templates by purpose
- Template Preview: Live preview of email appearance
- Template Settings: Configure width, category, and status
All plugin functionality is available via REST API:
GET /wp-json/campaignbridge/v1/mailchimp/audiencesGET /wp-json/campaignbridge/v1/mailchimp/templatesPOST /wp-json/campaignbridge/v1/mailchimp/verify- Plus many more endpoints for full functionality
campaignbridge/
βββ includes/ # Core PHP classes
β βββ Admin/ # Admin interface classes
β β βββ Pages/ # Admin page classes
β β βββ Asset_Manager.php # Asset management
β βββ Core/ # Core functionality
β β βββ Service_Container.php # Dependency injection
β βββ Post_Types/ # Custom post type classes
β β βββ Post_Type_Email_Template.php # Email template management
β βββ Providers/ # Email service providers
β β βββ Provider_Interface.php # Provider contract
β β βββ Mailchimp_Provider.php # Mailchimp integration
β β βββ Html_Provider.php # HTML export provider
β βββ REST/ # REST API endpoints
β β βββ Routes.php # General REST routes
β β βββ MailchimpRoutes.php # Mailchimp-specific routes
β β βββ Editor_Settings_Routes.php # Editor settings
β βββ Services/ # Business logic services
β βββ Email_Generator.php # Email HTML generation
βββ src/blocks/ # WordPress block definitions
β βββ post/ # Post content blocks
β βββ post-cta/ # Call-to-action blocks
β βββ post-excerpt/ # Post excerpt blocks
β βββ post-image/ # Featured image blocks
β βββ post-title/ # Post title blocks
βββ languages/ # Translation files
βββ assets/ # Static assets
βββ uninstall.php # Comprehensive uninstall script
The plugin leverages official WordPress packages for consistent behavior:
- @wordpress/data - State management and data persistence
- @wordpress/components - UI components with accessibility support
- @wordpress/block-editor - Block-based email template editor
- @wordpress/i18n - Internationalization support
The plugin uses a service container for dependency injection:
$container = new Service_Container();
$container->initialize();
$mailchimp = $container->get('mailchimp_provider');All email service providers implement a common interface:
interface ProviderInterface {
public function slug(): string;
public function label(): string;
public function send_campaign(array $blocks, array $settings);
// ... other methods
}Complete REST API for all operations:
- Rate limiting protection
- Permission-based access control
- Comprehensive error handling
- JSON response formatting
CampaignBridge uses a modern file-based admin system that auto-discovers screens and provides a clean, maintainable architecture for WordPress admin pages.
Key Features:
- Zero Configuration: Just create files, everything works automatically
- Auto-Discovery: Controllers, tabs, and assets auto-detected
- Convention Over Configuration: Naming determines behavior
- Progressive Enhancement: Start simple, add complexity when needed
Directory Structure:
includes/Admin/
βββ Core/ # System core files
βββ Screens/ # Auto-discovered admin pages
β βββ dashboard.php # Simple screen
β βββ settings/ # Tabbed screen
β βββ general.php # Tab 1
β βββ mailchimp.php # Tab 2
βββ Controllers/ # Optional business logic
βββ Models/ # Optional data layer
For complete developer documentation including:
- Screen types and creation
- Controller auto-discovery
- Configuration overrides
- Screen context helper methods
- Best practices and migration guide
See DEV_README.md for comprehensive technical documentation.
- Input Sanitization: All user input is properly sanitized
- CSRF Protection: Nonce verification for form submissions
- Capability Checks: Proper user capability validation
- API Rate Limiting: Built-in protection against API abuse
- SQL Injection Prevention: Prepared statements and escaping
- XSS Protection: Output escaping and content filtering
- Secure Uninstall: Complete data cleanup on uninstall
- Check PHP version (requires 8.2+)
- Verify WordPress version (requires 6.5.0+)
- Check for plugin conflicts
- Enable debug logging for detailed errors
- Verify API credentials in settings
- Check network connectivity
- Review rate limiting settings
- Enable debug mode for API errors
- Clear browser cache
- Check WordPress block editor compatibility
- Verify PHP memory limits
- Check for JavaScript conflicts
Enable WordPress debug mode to see detailed error information:
define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);For technical support and bug reports, please:
- Check the WordPress error logs
- Verify plugin compatibility
- Test with default WordPress theme
- Contact the development team with detailed error information
- β Major Refactoring: Complete code organization improvements
- β Enhanced Security: Comprehensive security enhancements
- β Professional Architecture: Service container and interface patterns
- β Better Performance: Optimized database queries and caching
- β Improved Documentation: Comprehensive code documentation
- β Standards Compliance: WordPress coding standards throughout
- Initial release with basic functionality
# WordPress development environment
# Requires: WordPress 6.5.0+, PHP 8.2+, MySQL 5.6+
# Plugin uses standard WordPress development practices
# No external build tools required for core functionality- Service Container: Dependency injection for clean architecture
- Provider Pattern: Extensible email service provider system
- Interface Contracts: Clear contracts for all major components
- REST API: Modern API design with proper error handling
- Compatible with WordPress testing framework
- Unit tests for core functionality
- Integration tests for API endpoints
- Security testing for user input handling
This plugin is licensed under the GPL v2 or later.
Copyright (C) 2024 Aggressive Network, LLC
This program 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 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
Contributions are welcome! Please:
- Fork the repository
- Create a feature branch
- Follow WordPress coding standards
- Add tests for new functionality
- Submit a pull request
For issues and feature requests:
- Check the WordPress plugin repository
- Review the troubleshooting section above
- Contact the development team with detailed information
CampaignBridge - Professional Email Campaign Management for WordPress