%plugin_description%
Built with Pollora from the plugin-default template.
%plugin_name%/
├── app/ # PHP classes, namespace Plugin\%plugin_namespace%
│ ├── Providers/ # Service providers (plugin, assets)
│ └── %plugin_namespace%Plugin.php # Main class: activation, hooks declared with attributes
├── config/plugin.php # Name, version, text domain, assets path
├── resources/
│ ├── assets/ # CSS and JS, built with Vite (when generated with assets)
│ └── views/ # Blade templates
└── %plugin_name%.php # Plugin header, registers the plugin with Pollora
Hooks are declared on methods with attributes and discovered by Pollora, no add_action() needed:
#[Action('init', priority: 10)]
public function onInit(): void
{
// …
}Run from the plugin's directory, when it has assets:
npm run dev # Vite dev server with hot reload
npm run build # production assetsFrom the project root:
php artisan pollora:make:block my-block --plugin=%plugin_name% # a new Gutenberg block
php artisan discovery:clear # after adding attribute-based classes
php artisan pollora:doctor # when something fails without an error- Plugins: architecture, namespaces, discovery, assets
- Actions and filters
- Gutenberg blocks