Plugin info

Total downloads: 7,133
Active installs: 300
Total reviews: 7
Average rating: 4
Support threads opened: 0
Support threads resolved: 0 (0%)
Available in: 1 language(s)
Contributors: 1
Last updated: 12/1/2015 (3682 days ago)
Added to WordPress: 6/23/2013 (12 years old)
Minimum WordPress version: 3.0.0
Tested up to WordPress version: 3.9.40
Minimum PHP version: f

Maintenance & Compatibility

Maintenance score

Possibly abandoned • Last updated 3682 days ago • 7 reviews

22/100

Is Blade abandoned?

Possibly abandoned (last update 3682 days ago).

Compatibility

Requires WordPress: 3.0.0
Tested up to: 3.9.40
Requires PHP: f

Similar & Alternatives

Explore plugins with similar tags, and compare key metrics like downloads, ratings, updates, support, and WP/PHP compatibility.

Blade Engine
Rating 0.0/5 (0 reviews)Active installs 20
NHR Movies
Rating 3.0/5 (1 reviews)Active installs 0

Description

Blade is the template engine for Laravel, a very popular php framework, developed by Taylor Otwell. This plugin brings the same template engine to wordpress.
Using a template engine will result in much cleaner template files and quicker development. Normal php can still be used in the template files.
The plugin also adds a wordpress specific snippet to blade. Check out the examples for more info.

echo/print

{{$foo}}

Turns into…

if()

@if(has_post_thumbnail())
    {{the_post_thumbnail() }}
@else 
    
@endif

Turns into…

{{the_title()}}
@wpempty

404

@wpend

Turns into…

{{the_title()}} @wpempty

  • {{ __('Sorry, no posts matched your criteria.') }}
  • @wpend

    Turns into….

      ‘post’) ); ?>
      have_posts() ) : ?>
      have_posts() ) : $query->the_post(); ?>

    Including other templates

    To include a file with blade use:
    @include(‘header’)
    Note that you should not type “.php”. Files included with functions, e.g. the_header(), will not be compiled by Blade, however the php code in the file is still executed.

    Layouts

    master.php:

    @yield(‘content’)

    page.php:
    @layout(‘master’)

    @section('content')
        

    Lorem ipsum

    @endsection

    See the Blade documentation for more info.

    Contribute on github: github.com/MikaelMattsson/blade

    Installation

    1. Upload folder blade to the /wp-content/plugins/ directory
    2. Activate the plugin through the ‘Plugins’ menu in WordPress
    3. Make sure that /wp-content/plugins/blade/storage/views/ is writable by php
    4. Done! You can now use Blade in your theme

    More options

    It is recommended thay you change the path to the location where the compiled views are stored to within your theme. This will fix problems with wpml. To do so, put the following code in your theme folder and create the folder/directory “bladecache” in your theme folder.
    if(function_exists(‘blade_set_storage_path’)){
    blade_set_storage_path(get_template_directory().’/bladecache’);
    }

    Frequently Asked Questions

    No FAQ available

    Review feed

    No reviews available

    Screenshots

    No screenshots available

    Changelog

    0.3.7

    • Added support for BuddyPress

    0.3.6

    • Fixed bug with incorrectly appending to unitialized variable. (perholmang)
    • Fixed issues when using multiple @section. (perholmang)

    0.3.5

    • Added support for child/parent-themes (perholmang)

    0.3.4

    • Added acf repeater (jaggyspaghetti)

    0.3.3

    • Compatibility update for PHP 5.5 (relu)

    0.3.2

    • Added @wpposts (mykebates)

    0.3.1

    • Changed the structure of all files. (PabloVallejo)

    0.2.0

    • The view templates are now loaded differently.
    • Better errorhandling.
    • Added possibility to change the storage path.

    0.1.1

    • Added a fix for plugins that import the template file directly using the template path fetched using get_query_template() like WP e-Commerce;

    0.1.0

    • initial (beta)