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
- 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
- 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
- PHP: 8.0 or higher
- Composer: Latest version
- Git: For version control
- WordPress: 5.0 or higher
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
php antonella namespace MyPlugin
php antonella updateproject
Your plugin is now ready! Upload to WordPress and start developing.
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 |
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);
- β 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
// In your form
echo Security::create_nonce_field('update_settings');
// In your controller
Security::verify_nonce('settings_nonce', 'update_settings');
$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');
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>';
php antonella serve
# or
php antonella serve -d # detached mode
- WordPress latest version
- PHP 8.2
- MySQL 8.0
- Automatic plugin installation
- Hot reloading
php antonella makeup
This command:
- β Excludes development files
- β Includes only production dependencies
- β Creates optimized ZIP file
- β Maintains proper file structure
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);
}
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
- Documentation: antonellaframework.com/documentacion
- Community Chat: Gitter
- Issues: GitHub Issues
- Email: antonella.framework@carlos-herrera.com
This project is licensed under the MIT License - see the LICENSE file for details.
Antonella Framework - Making WordPress plugin development secure, fast, and enjoyable!