Skip to content

Commit

Permalink
0.8.5, throw template error when missing
Browse files Browse the repository at this point in the history
  • Loading branch information
Andreas Ek committed Jan 6, 2016
1 parent a8ced9c commit 585047a
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion bladerunner.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Plugin Name: Bladerunner
Plugin URI: http://bladerunner.aekab.se
Description: Laravel Blade template engine for WordPress
Version: 0.8.4
Version: 0.8.5
Author: Andreas Ek
Author URI: http://www.aekab.se/
License: MIT License
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "ekandreas/bladerunner",
"type": "wordpress-plugin",
"version": "0.8.4",
"version": "0.8.5",
"description": "WordPress Blade L5 template engine",
"keywords": ["laravel", "blade", "wordpress"],
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Contributors: ekandreas
Tags: Blade,templates,development,laravel
Requires at least: 4.4
Tested up to: 4.4
Stable tag: 0.8.4
Stable tag: 0.8.5
License: MIT

WordPress plugin for Blade L5 templating
Expand Down
2 changes: 2 additions & 0 deletions src/Template.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ public function path($template)
$cache = self::cache();
if (!file_exists($cache)) {
throw new \Exception('Bladerunner: Cache folder does not exist.');
return $template;
}

$search = [$views, '/', '.blade', '.php'];
Expand All @@ -58,6 +59,7 @@ public function path($template)
$file = trim($file, '.');

if (!file_exists(get_stylesheet_directory().'/'.$file.'.blade.php')) {
throw new \Exception("Bladerunner: Template file {$file}.blade.php is missing.");
return $template;
}

Expand Down

0 comments on commit 585047a

Please sign in to comment.