Download the PHP package starring-jane/wordpress-blade without Composer
On this page you can find all versions of the php package starring-jane/wordpress-blade. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download starring-jane/wordpress-blade
More information about starring-jane/wordpress-blade
Files in starring-jane/wordpress-blade
Package wordpress-blade
Short Description A composer package that enables Wordpress to use the Blade templating engine
License MIT
Informations about the package wordpress-blade
WordPress Blade
Adds the Laravel Blade template engine to WordPress
Installation for WordPlate (skip for basic WordPress)
Start with adding the composer package
composer require starring-jane/wordpress-blade
Create a WordpressBlade instance in your theme functions.php
Create the following structure
Installation for WordPress (skip for WordPlate)
Start with adding the composer package
composer require starring-jane/wordpress-blade
Create a WordpressBlade instance in functions.php
Autoload your theme namespace in composer.json
Create the following structure
Templates
Add a page template in the /templates
directory with a component class and add at least a public render function
/templates/page.php
Now you can access the $post
variable in views/pages/default.blade.php
Components
Anonymous Components
Add your components to views/components
Class Components
Custom directives
The following example creates a @datetime($var) directive which formats a given $var
Filters
Add page template directories
Add directories where wordpress should look for page templates, starting from the theme base
Migrating from bladerunner
Follow this guide to migrate from bladerunner
Contributors
- Laurens Bultynck ([email protected])
- Maxim Vanhove ([email protected])
All versions of wordpress-blade with dependencies
tightenco/collect Version ^8.0|^9.0
laravel/helpers Version ^1.6