Petra
AI assistant for GrootMade
Hi! I'm Petra 👋 Ask me to help you find the perfect WP plugin, theme, or template kit.
Build themes with Laravel Blade syntax, simplifying template logic and reuse.
This plugin enables developers to use the Laravel Blade templating syntax when building themes for their content management system. It is designed for developers familiar with Blade who want to apply its efficient template inheritance, control structures, and reusable components within their theme files, avoiding the need for verbose PHP tags and intermixing logic.
Template Hierarchy Integration: The plugin hooks into the core template loading system, automatically prioritizing .blade.php files over standard .php files. This allows you to create full themes using Blade syntax without manually calling render functions in every file.
Direct View Rendering: For more control, you can use the wp_bladeone()->run() function to render specific Blade templates from any location. This is useful for partials, widgets, or custom page sections, with the ability to pass data arrays directly to the view.
Configuration Constants: You can define constants to set custom paths for view files and cache storage, and adjust the compilation mode of the underlying BladeOne engine for development or production performance.
Standalone Engine: It utilizes the BladeOne library, a dependency-free, standalone port of Laravel's Blade compiler. This means you get the core Blade syntax features without requiring the entire Laravel framework or other heavy dependencies.
Composer Installation: The plugin is installed via Composer, fitting into modern PHP development workflows and making it easy to manage within projects that use dependency management.