cehojac/antonella-framework-for-wp

make easy a WordPress Plugin whit a team. Use this framework for simplycity the work in develop a plugin

1.9.0 2025-08-23 11:42 UTC

This package is auto-updated.

Last update: 2025-09-01 04:03:33 UTC


README

Antonella Framework

DeepWiki

Total Downloads Latest Version License Gitter

Framework for developing WordPress plugins based on Model View Controller with enterprise-level security

📖 Full Documentation: https://antonellaframework.com
🎥 Video Tutorial: https://tipeos.com/anto

✨ What's New in Version 1.9.0

🔒 Enterprise-Level Security

  • CSRF Protection: Automatic nonce verification
  • Permission Control: Granular user capability checks
  • Input Sanitization: Automatic data cleaning
  • Output Escaping: XSS attack prevention
  • Security Class: Centralized API for all security functions

🛠️ Technical Improvements

  • PHP 8.2 Compatible: Full compatibility with latest PHP
  • Enhanced Headers: Complete plugin metadata
  • Docker Integration: Improved development environment
  • Auto Root File Change: Automatic plugin file renaming

📋 Requirements

  • PHP: 8.0 or higher
  • Composer: Latest version
  • Git: For version control
  • WordPress: 5.0 or higher

🚀 Quick Installation

1. Create Your Plugin Project

Via Antonella installer

composer global require cehojac/antonella-installer
antonella new my-awesome-plugin
cd my-awesome-plugin

or via composer CLI

composer create-project --prefer-dist cehojac/antonella-framework-for-wp my-awesome-plugin
cd my-awesome-plugin

2. Initialize Your Project

php antonella namespace MyPlugin
php antonella updateproject

3. Start Development

Your plugin is now ready! Upload to WordPress and start developing.

🎯 Core Features

Console Commands

Command Description
php antonella namespace FOO Rename namespace across all files
php antonella make MyController Create controller class
php antonella widget MyWidget Create widget class
php antonella helper myFunction Create helper function
php antonella cpt MyPostType Create custom post type
php antonella block MyBlock Create Gutenberg block
php antonella makeup Generate ZIP for distribution
php antonella serve Start development server

Security API

use CH\Security;

// Verify user permissions
Security::check_user_capability('manage_options');

// Create secure forms
echo Security::create_nonce_field('my_action');
Security::verify_nonce('my_nonce', 'my_action');

// Sanitize input data
$data = Security::sanitize_input($_POST['data'], 'text');

// Escape output data
echo Security::escape_output($data);

Built-in Capabilities

  • MVC Architecture: Clean separation of concerns
  • Security First: Enterprise-level protection
  • Auto-loading: PSR-4 compliant
  • Blade Templates: Optional template engine
  • Custom Post Types: Easy CPT creation
  • Gutenberg Blocks: Block development tools
  • Docker Support: Containerized development
  • Testing Framework: Built-in testing tools

🛡️ Security Features

CSRF Protection

// In your form
echo Security::create_nonce_field('update_settings');

// In your controller
Security::verify_nonce('settings_nonce', 'update_settings');

Data Sanitization

$text = Security::sanitize_input($_POST['text'], 'text');
$email = Security::sanitize_input($_POST['email'], 'email');
$url = Security::sanitize_input($_POST['url'], 'url');
$html = Security::sanitize_input($_POST['content'], 'html');

Output Escaping

echo Security::escape_output($user_data, 'html');
echo '<img src="' . Security::escape_output($image_url, 'attr') . '">';
echo '<script>var data = ' . Security::escape_output($js_data, 'js') . ';</script>';

🐳 Development with Docker

Start Development Environment

php antonella serve
# or
php antonella serve -d  # detached mode

Features Include:

  • WordPress latest version
  • PHP 8.2
  • MySQL 8.0
  • Automatic plugin installation
  • Hot reloading

📦 Plugin Distribution

Create Production ZIP

php antonella makeup

This command:

  • ✅ Excludes development files
  • ✅ Includes only production dependencies
  • ✅ Creates optimized ZIP file
  • ✅ Maintains proper file structure

🔧 Migration from 1.8.x

Update Your Controllers

Before (1.8.x):

public function process_form() {
    $data = $_POST['data'];
    update_option('my_option', $data);
}

After (1.9.0):

public function process_form() {
    Security::check_user_capability('manage_options');
    Security::verify_nonce('my_nonce', 'my_action');
    
    $data = Security::sanitize_input($_POST['data'], 'text');
    update_option('my_option', $data);
}

🤝 Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

📞 Support

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

🎉 Made with ❤️ by Carlos Herrera

Antonella Framework - Making WordPress plugin development secure, fast, and enjoyable!