GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - Pollora/plugin-default: Plugin template for the Pollora framework, used to scaffold WordPress plugins built on Laravel.

BranchesTags
Open more actions menu

Latest commit

 

History

41 Commits
41 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
app
app
 
 
bin
bin
 
 
config
config
 
 
resources
resources
 
 
%plugin_name%.php
%plugin_name%.php
 
 
.gitattributes
.gitattributes
 
 
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
package.json
package.json
 
 
vite.config.js
vite.config.js
 
 

Repository files navigation

Pollora plugin template: the starting point for a Pollora WordPress plugin

Version License

The plugin template that php artisan pollora:make:plugin downloads: a WordPress plugin registered with Pollora, with a PSR-4 app/ directory, service providers, hooks declared with PHP attributes, Blade views and an optional Vite build. You start from a plugin that already loads, instead of wiring add_action() calls and a bootstrap file by hand.

Installation

php artisan pollora:make:plugin my-plugin

The command downloads the latest tag of this template, replaces its placeholders with your plugin's name, namespace and header, and offers to activate the plugin. With assets (--asset), it also runs npm install and npm run build; without them, the Vite files are left out.

Requirements: a Pollora project (PHP 8.4+ and WordPress 7.1+ for a new one; the framework itself runs on PHP 8.3+), and Node.js 20.19+ or 22.12+ (Vite 8) when the plugin has assets.

Structure

%plugin_name%/
├── app/                                  # Application code (PSR-4 autoloaded)
│   ├── Providers/                        # Service providers (plugin, assets)
│   └── %plugin_namespace%Plugin.php      # Main plugin class: activation, hooks
├── config/plugin.php                     # Name, version, text domain, assets path
├── resources/
│   ├── assets/                           # CSS, JS files (Vite)
│   └── views/                            # Blade templates
└── %plugin_name%.php                     # Main plugin file: header, pollora_register()

The main class declares its hooks with attributes, which Pollora discovers on its own:

#[Action('init', priority: 10)]
public function onInit(): void
{
    // …
}

Development

npm install     # once
npm run dev     # Vite dev server with hot reload
npm run build   # production build

Documentation

  • Plugins: creating a plugin, its architecture, the command's options and asset management
  • Hooks, post types and the rest of the framework at pollora.dev

Template development

This repository is a template: its files carry placeholders that pollora:make:plugin substitutes, and the PHP classes in app/ are .stub files, so it does not run as is. Develop on a plugin generated under the code name set in bin/package-plugin.sh, then copy it back with ./bin/package-plugin.sh /path/to/the/plugin, which turns the names back into placeholders. php bin/tests/run.php checks the result.

Contributing

Contributions are welcome: see the contributing guide. Report security issues privately, as described in the security policy.

License

The Pollora plugin template is open-source software licensed under the MIT license. © RuBee group

About

Plugin template for the Pollora framework, used to scaffold WordPress plugins built on Laravel.

pollora.dev/advanced/plugins/

Topics

laravelpollorawordpress-plugin

Resources

Readme
MIT license

Code of conduct

Code of conduct

Contributing

Contributing

Security policy

Security policy
Activity
Custom properties

Stars

1 star

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.