PHP code example of modulespress / framework

1. Go to this page and download the library: Download modulespress/framework library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

modulespress / framework example snippets


/**
 * Plugin Name: My Awesome Plugin
 * Description: Built with ModulesPress
 * Version: 1.0.0
 */

use MyPlugin\Modules\RootModule\RootModule; 
use ModulesPress\Foundation\ModulesPressPlugin;

if (!defined('ABSPATH')) exit;

final class MyAwesomePlugin extends ModulesPressPlugin {
   
    public const NAME = "My ModulesPress Plugin";
    public const SLUG = "my-modulespress-plugin";

    public function __construct() {
        parent::__construct(
            rootModule: RootModule::class,
            rootDir: __DIR__,
            rootFile: __FILE__
        );
    }

}

(new MyAwesomePlugin())->bootstrap();