Title: Blade Engine
Author: Lars Jansen
Published: <strong>2017 年 8 月 6 日</strong>
Last modified: 2017 年 8 月 6 日

---

搜索插件

![](https://ps.w.org/wp-blade-engine/assets/banner-772x250.png?rev=1709215)

**该插件尚未通过WordPress的最新3个主要版本进行测试**。 当与较新版本的WordPress一起
使用时，可能不再受到维护或支持，并且可能会存在兼容性问题。

![](https://ps.w.org/wp-blade-engine/assets/icon-256x256.png?rev=1709215)

# Blade Engine

 作者：[Lars Jansen](https://profiles.wordpress.org/lars-2/)

[下载](https://downloads.wordpress.org/plugin/wp-blade-engine.1.0.1.zip)

 * [详情](https://cn.wordpress.org/plugins/wp-blade-engine/#description)
 * [评价](https://cn.wordpress.org/plugins/wp-blade-engine/#reviews)
 *  [安装](https://cn.wordpress.org/plugins/wp-blade-engine/#installation)
 * [开发进展](https://cn.wordpress.org/plugins/wp-blade-engine/#developers)

 [支持](https://wordpress.org/support/plugin/wp-blade-engine/)

## 描述

This plugin adds and loads philo/laravel-blade to your WordPress installation.
 
It loads two functions, which enable you to use the Blade render engine in your 
templates which make your themes better readable.

### Usage

The plugin adds two functions:
 – render_blade_view (void, echoes the content) –
get_rendered_blade_view (string)

Both functions take the same parameters:
 1. view (required, string) 2. attributes(
optional, array)

When installed, the plugin creates a “views” folder in your theme directory. This
is where you put your blade templates (with the .blade.php extension).
 The “views”
folder may contain subfolders.

### Example

wp-contents/themes/your-theme/views/components/article.blade.php:
 `blade @if($show_text){{
$text }} @endif

wp-contents/themes/your-theme/functions.php:
 `php <?php render_blade_view('components.
article', [ 'show_text' => true, 'text' => 'Hello World!', ]);

When ran on any page, it will output “Hello World!”

### Blade

Blade is a template engine which is mainly used by Laravel. More information here:
https://laravel.com/docs/5.1/blade
 This plugin supports all the directives which
are available in Laravel 5.1.

### License

This file is part of Blade Engine.

Blade Engine is free software: you can redistribute it and/or modify it under the
terms of the GNU General Public License as published
 by the Free Software Foundation.

Blade Engine is distributed in the hope that it will be useful, but WITHOUT ANY 
WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE. See the GNU General Public License for more details.

Get a copy of the GNU General Public License in [http://www.gnu.org/licenses/](http://www.gnu.org/licenses/).

## 安装

 * Upload plugin files to your plugins folder, or install using WordPress built-
   in Add New Plugin installer;
 * Activate the plugin;

## 常见问题

  Installation Instructions

 * Upload plugin files to your plugins folder, or install using WordPress built-
   in Add New Plugin installer;
 * Activate the plugin;

## 评价

此插件暂无评价。

## 贡献者及开发者

「Blade Engine」是开源软件。 以下人员对此插件做出了贡献。

贡献者

 *   [ Lars Jansen ](https://profiles.wordpress.org/lars-2/)

[帮助将「Blade Engine」翻译成简体中文。](https://translate.wordpress.org/projects/wp-plugins/wp-blade-engine)

### 对开发感兴趣吗?

您可以[浏览代码](https://plugins.trac.wordpress.org/browser/wp-blade-engine/)，查看
[SVN仓库](https://plugins.svn.wordpress.org/wp-blade-engine/)，或通过[RSS](https://plugins.trac.wordpress.org/log/wp-blade-engine/?limit=100&mode=stop_on_copy&format=rss)
订阅[开发日志](https://plugins.trac.wordpress.org/log/wp-blade-engine/)。

## 更新日志

#### 1.0.0

 * Initial version

## 额外信息

 *  版本 **1.0.1**
 *  最后更新：**9 年前**
 *  活跃安装数量 **10+**
 *  WordPress 版本 ** 4.8 或更高版本 **
 *  已测试的最高版本为 **4.8.28**
 *  语言
 * [English (US)](https://wordpress.org/plugins/wp-blade-engine/)
 * 标签
 * [Blade](https://cn.wordpress.org/plugins/tags/blade/)[engine](https://cn.wordpress.org/plugins/tags/engine/)
   [Laravel](https://cn.wordpress.org/plugins/tags/laravel/)[render](https://cn.wordpress.org/plugins/tags/render/)
 *  [高级视图](https://cn.wordpress.org/plugins/wp-blade-engine/advanced/)

## 评级

尚未提交反馈。

[Your review](https://wordpress.org/support/plugin/wp-blade-engine/reviews/#new-post)

[查看全部评论](https://wordpress.org/support/plugin/wp-blade-engine/reviews/)

## 贡献者

 *   [ Lars Jansen ](https://profiles.wordpress.org/lars-2/)

## 支持

有话要说吗？是否需要帮助？

 [查看支持论坛](https://wordpress.org/support/plugin/wp-blade-engine/)