omega-mvc / omega-wp
Composer descriptionA modern WordPress application example built with Omega WP Framework. Provides an MVC-based structure with dependency injection, service providers, routing, controllers, validation, and Laravel Eloquent database integration.
Package info
Type:wordpress-plugin
pkg:composer/omega-mvc/omega-wp
Requires
- php: ^8.4
- omega-mvc/omega-wp-framework: ^1.0.0
- symfony/console: ^8.0
- symfony/finder: ^8.0
Requires (Dev)
README
Omega WP Application
Omega WP Application is a modern WordPress application built on Omega WP Framework, providing a lightweight MVC architecture with dependency injection, service providers, routing, controllers, Eloquent integration, and a structured approach for scalable WordPress plugin development.
Overview
Omega WP Application is an example project that demonstrates how to build WordPress plugins using a modern PHP application structure.
Instead of placing all logic inside WordPress hooks and procedural files, the application follows an organized architecture based on:
- Application lifecycle management
- Service providers
- Dependency injection
- PSR-4 autoloading
- Controllers
- Routing
- Models and database abstraction
- Separation between framework and application logic
WordPress remains the underlying platform, while the application layer follows modern PHP development practices.
Requirements
- PHP >= 8.4
- WordPress >= X.X
- Composer
Installation
Clone the repository inside the WordPress plugins directory:
cd wp-content/plugins
git clone https://github.com/omega-mvc/omega-wp.git
Install dependencies:
composer install
Activate the plugin from the WordPress administration panel.
Project Structure
omega-wp/ │ ├── app/ │ ├── Controllers/ │ ├── Models/ │ ├── Providers/ │ └── ... │ ├── routes/ │ ├── resources/ │ ├── database/ │ ├── composer.json └── omega-wp.php
Architecture
The application boot process is managed by Omega WP Framework. The main plugin file only initializes the application and delegates the lifecycle management to the framework.
Example:
$app = ApplicationFactory::createPlugin( 'omega-wp', __DIR__ );
Application services are registered through service providers:
$app->register(SomeServiceProvider::class);
This keeps the application modular and allows components to be replaced or extended without modifying the core application.
Features
Currently demonstrated features:
- MVC application structure
- Dependency injection container
- Service providers
- WordPress plugin lifecycle integration
- Eloquent ORM support
- Routing system
- Controllers
- Validation layer
- Composer PSR-4 autoloading
Relationship with Omega WP Framework
Omega WP Application depends on Omega WP Framework:
omega-wp | └── omega-mvc/wp-framework
The framework provides the application foundation, while this repository contains the implementation examples and application-specific code.
Development
Install development dependencies in your framework directory.
composer install
Run code analysis:
vendor/bin/phpcs
Official Documentation
The official documentation for Omega is available here
Contributing
If you'd like to contribute to the Omega example application package, please follow our contribution guidelines.
License
This project is open-source software licensed under the GNU General Public License v3.0.