前言介紹
- 這款 WordPress 外掛「Blade Engine」是 2017-08-05 上架。
- 目前有 20 個安裝啟用數。
- 上一次更新是 2017-08-06,距離現在已有 2827 天。超過一年沒更新,安裝要確認版本是否可用。以及後續維護問題!
- 外掛最低要求 WordPress 4.8 以上版本才可以安裝。
- 尚未有人給過這款外掛評分。
- 還沒有人在論壇上發問,可能目前使用數不多,還沒有什麼大問題。
外掛協作開發者
lars-2 |
外掛標籤
Blade | engine | render | Laravel | blade render engine |
內容簡介
此外掛可將 philo/laravel-blade 加入及載入至 WordPress 安裝程式中。
它會載入兩個函數,使您可以在樣板中使用 Blade 渲染引擎,提升佈景主題的易讀性。
使用方法
此外掛增加了兩個函數:
- render_blade_view (void,輸出內容)
- get_rendered_blade_view (string)
這兩個函數的參數相同:
1. 視圖 (必填,字串)
2. 屬性 (選填,陣列)
安裝時,外掛會在您的佈景主題目錄中建立一個 "views" 資料夾。您可以在這裡放置以 .blade.php 為副檔名的模板檔案。
子資料夾也可以放置模板檔案。
範例
wp-contents/themes/your-theme/views/components/article.blade.php:
blade
@if($show_text)
{{ $text }}
@endif
wp-contents/themes/your-theme/functions.php:
php
render_blade_view('components.article', [
'show_text' => true,
'text' => 'Hello World!',
]);
在任何頁面執行此函數,將會輸出 "Hello World!"
Blade
Blade 是主要由 Laravel 使用的模板引擎。更多資訊請參考:https://laravel.com/docs/5.1/blade
此外掛支援 Laravel 5.1 中所有可用的指令。
授權
此檔案為 Blade Engine 的一部分。
Blade Engine 為自由軟體,您可以依據自由軟體基金會發行的 GNU 通用公共授權條款對其進行重新發佈和修改。
Blade Engine 沒有任何擔保,不提供任何明示或暗示的擔保,包括但不限於對適銷性或特定用途的適用性的暗示擔保。
有關更多細節,請參閱 GNU 通用公共授權條款。
可以在http://www.gnu.org/licenses/中取得 GNU 通用公共授權條款的副本。
原文外掛簡介
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
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/.
各版本下載點
- 方法一:點下方版本號的連結下載 ZIP 檔案後,登入網站後台左側選單「外掛」的「安裝外掛」,然後選擇上方的「上傳外掛」,把下載回去的 ZIP 外掛打包檔案上傳上去安裝與啟用。
- 方法二:透過「安裝外掛」的畫面右方搜尋功能,搜尋外掛名稱「Blade Engine」來進行安裝。
(建議使用方法二,確保安裝的版本符合當前運作的 WordPress 環境。
延伸相關外掛(你可能也想知道)
Blade 》Blade是Laravel的模板引擎,由Taylor Otwell開發的非常流行的php框架。此外掛將相同的模板引擎帶到WordPress中,使用模板引擎將會使得模板文件更加乾淨且快速...。
iTunes Link Engine 》asy integration with WordPress sites., No need to manually update links – they are automatically localized every time a user loads the page., Impro...。
Discourage Search Engines by URL 》此外掛可讓你藉由網址來防止你在開發和正式網站之間切換時忘記關閉「搜尋引擎可見度」設定而導致被搜尋引擎索引到。, 此外掛功能包括:, , 欄位可輸入數個網...。
SEO Helper 》SEO 助手會檢查您的文章/草稿/頁面是否符合基本 SEO 標準,您可以但不必跟隨這些標準。這個外掛是由all-things-seo.com提供的,感到驕傲。。
GamiPress – JetEngine integration 》-GamiPress是一個強大的遊戲化插件,可以將它與 JetEngine 插件相結合。-這個插件可以自動連接 GamiPress 和 JetEngine,添加新的活動事件。- 新的活動事件包...。
Elastic Theme Editor 》Elastic是WordPress的主題引擎和交互主題編輯器。, 重要提示, Elastic仍在開發中,我們不建議您在實際網站上使用Elastic主題。我們盡力使Elastic盡可能少出現...。
tobook Hotel Booking Engine 》免費使用的 tobook WordPress 酒店預訂引擎– 透過您的網站推動無佣金預訂並負擔價格相等的壓力。, tobook Worpress 酒店引擎是免佣金的,完全整合您自己的網...。
UNMETERED.Chat for WordPress 》輕鬆地將即時聊天功能添加到您的網站,讓您能夠與客戶建立親密聯繫。該外掛使用基於HTML5 websockets的強大聊天引擎,安裝簡單。不再因電子郵件延誤而失去客...。
Installus links 》此外掛安裝了Installus.net的聯盟代碼。