Skip to content
PolloraPublic

About

The Laravel framework for WordPress: Blade, Laravel routing and Eloquent, PHP 8 attributes for hooks, post types and REST routes.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

2 stars

Watchers

1 watching

Forks

Latest commit

 

History

1,341 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pollora: The Laravel framework for WordPress

Latest Version Total Downloads CI License

Pollora is the Laravel framework for WordPress. WordPress runs inside a Laravel application: the front end uses Laravel routing, controllers, Blade and Eloquent, while the WordPress admin, database, editors' workflow and plugins keep working as usual. Hooks, post types, taxonomies and REST routes are declared with PHP 8 attributes and registered by auto-discovery, so functions.php stops being the place where everything piles up.

Website · Documentation · Why Pollora · How Pollora compares with Acorn, Sage, Radicle and Corcel · 1-minute tour

Installation

Create a project with the Pollora CLI, or with Composer through the skeleton. See the installation guide:

composer global require pollora/cli
pollora new my-project --ddev

# or
composer create-project pollora/pollora my-project

Requirements:

  • PHP 8.4+ for a new project (the skeleton's lock file ships Symfony 8; this package alone accepts PHP 8.3)
  • Laravel 13.35 (Pollora's version numbers follow the Laravel release it is built on)
  • WordPress 7.1+

Quick start

use Pollora\Attributes\Filter;
use Pollora\Attributes\PostType;
use Pollora\Attributes\PostType\HasArchive;
use Pollora\Attributes\PostType\Supports;

#[PostType]
#[HasArchive]
#[Supports(['title', 'editor', 'thumbnail'])]
class Book {}

class Seo
{
    #[Filter('document_title_parts')]
    public function title(array $parts): array { /* ... */ return $parts; }
}

Key features

  • WordPress routing via Route::wp() with template hierarchy support
  • PHP attributes for hooks (#[Action], #[Filter]), post types (#[PostType]), taxonomies (#[Taxonomy]), scheduling (#[Schedule]), REST routes (#[WpRestRoute]), AJAX handlers (#[Ajax]), WP-CLI commands (#[WpCli]) and abilities (#[Ability])
  • Typed meta and roles declared in code: #[Meta], #[PostMeta], #[TermMeta], #[Role], #[ModifyRole]
  • Gutenberg blocks rendered with Blade, and Block Bindings sources for meta and options
  • Auto-discovery system that scans and registers components automatically
  • Blade templates with Sage Directives for WordPress data
  • Theme system with dynamic PSR-4 autoloading, parent/child theme support, and Vite asset management
  • WordPress authentication guard and password hashing integration
  • Event dispatching for WordPress core, WooCommerce, Gravity Forms, and Yoast SEO
  • Module system via nwidart/laravel-modules
  • pollora:doctor, which finds the setups that fail without an error and prints the fix (also in Tools › Site Health)

Documentation

Full documentation is available at pollora.dev.

Learn more:

Testing

composer test                # Run all checks (Rector, Pint, PHPStan, Pest, type coverage)
composer test:unit           # Run Pest tests with 100% coverage requirement
composer test:types          # Run PHPStan static analysis
composer test:lint           # Check code style with Pint
composer test:refacto        # Check refactoring rules with Rector
composer test:type-coverage  # Check type coverage (98% minimum)

Changelog

All notable changes are documented in CHANGELOG.md.

Credits

Pollora builds on the work of Roots, a constant source of inspiration: themes, blocks and plugins are built with @roots/vite-plugin, the project follows the Bedrock layout with roots/bedrock-autoloader, and Blade ships Sage Directives. The WordPress models are built on Colt, a fork of Corcel.

Contributing

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

License

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

Parts of the WordPress integration (Pollora\Support\WordPress, Pollora\Hashing\WordPressHasher) originate from work by Jordan Doyle, released under the 0BSD and WTFPL licenses.

About

The Laravel framework for WordPress: Blade, Laravel routing and Eloquent, PHP 8 attributes for hooks, post types and REST routes.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages