cehojac/antonella-framework-for-wp
Composer 安装命令:
composer create-project cehojac/antonella-framework-for-wp
包简介
make easy a WordPress Plugin whit a team. Use this framework for simplycity the work in develop a plugin
关键字:
README 文档
README
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
Core Requirements
- PHP: 8.0 or higher
- Composer: Latest version
- Git: For version control
- WordPress: 5.0 or higher
Docker Development Environment
- Docker Desktop: 4.53.0+ (⚠️ Required for ARM64/Windows compatibility)
- Docker Compose: v2.0+
- Available Ports: 8080 (WordPress), 3306 (MySQL), 9000 (phpMyAdmin)
💡 Note: For optimal ARM64 compatibility on Windows/Mac, ensure Docker Desktop is updated to version 4.53.0 or higher. Earlier versions may experience container startup issues.
🚀 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
Option A: Traditional WordPress Development
Your plugin is now ready! Upload to WordPress and start developing.
Option B: Docker Development Environment
For a complete development setup with database and admin interface:
# Start the development environment php antonella serve # or manually with Docker Compose docker compose up -d # Access your development site # WordPress: http://localhost:8080 # Admin Panel: http://localhost:8080/wp-admin (test/test) # phpMyAdmin: http://localhost:9000
🐳 Docker Environment Includes:
- WordPress with automatic framework activation
- MySQL 8.0 with persistent data
- phpMyAdmin for database management
- WP-CLI for command automation
- Development plugins (Query Monitor, Debug Bar)
📋 Default Credentials:
- WordPress Admin:
test/test - MySQL:
wordpress/wordpress
🔧 Troubleshooting: If containers fail to start, ensure Docker Desktop is updated to 4.53.0+ and required ports (8080, 3306, 9000) are available.
🎯 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
- 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
📞 Support
- Documentation: antonellaframework.com/documentacion
- Community Chat: Gitter
- Issues: GitHub Issues
- Email: antonella.framework@carlos-herrera.com
📄 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!
cehojac/antonella-framework-for-wp 适用场景与选型建议
cehojac/antonella-framework-for-wp 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 761 次下载、GitHub Stars 达 21, 最近一次更新时间为 2017 年 09 月 09 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「framework」 「plugins」 「wordpress」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 cehojac/antonella-framework-for-wp 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 cehojac/antonella-framework-for-wp 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 cehojac/antonella-framework-for-wp 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
PHP Framework HLEB2 is the foundation of the web application. Provides ease of development and application performance.
dcat-admin plugins loginCaptcha.
Must-use plugin integrating WordPress with the Upsun platform: environment awareness, router-cache friendliness, safe preview clones, deploy migrations, Site Health checks, and a wp upsun CLI command.
WordPress theme framework
High-performance, opinionated PHP 8 web framework with O(1) routing, parallel async MySQL, type-safe asset bridge, and React-island frontend
Manages the auto-installation of a mu-plugin for a plugin.
统计信息
- 总下载量: 761
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 21
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2017-09-09