[WordPress] 外掛分享: Blade

WordPress 外掛 Blade 的封面圖片。

前言介紹

  • 這款 WordPress 外掛「Blade」是 2013-06-22 上架。
  • 目前有 300 個安裝啟用數。
  • 上一次更新是 2015-12-01,距離現在已有 3442 天。超過一年沒更新,安裝要確認版本是否可用。以及後續維護問題!
  • 外掛最低要求 WordPress 3.0.0 以上版本才可以安裝。
  • 有 7 人給過評分。
  • 還沒有人在論壇上發問,可能目前使用數不多,還沒有什麼大問題。

外掛協作開發者

konvent |

外掛標籤

Blade | engine | Laravel | template |

內容簡介

Blade是Laravel的模板引擎,由Taylor Otwell開發的非常流行的php框架。此外掛將相同的模板引擎帶到WordPress中,使用模板引擎將會使得模板文件更加乾淨且快速開發,但一般的php仍可在模板文件中使用。此外掛還添加了特定於WordPress的Blade片段,請查看範例以獲得更多信息。

echo/print
{{$foo}}

變成了…

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

@endif

變成了…

{{the_title()}}

@wpempty

404


@wpend

變成了…

{{the_title()}}
@wpempty

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

  • @wpend

    變成了….

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

    包含其他模板

    要使用Blade包含文件,請使用:
    @include(‘header’)
    請注意,不應輸入“.php”。使用函數包含的文件(例如the_header())將不會被Blade編譯,但文件中的php代碼仍然會被執行。

    版面配置

    master.php:

    @yield(‘content’)

    page.php:
    @layout(‘master’)

    @section('content')

    Lorem ipsum


    @endsection

    有關更多信息,請參閱Blade文檔。

    在github上貢獻:github.com/MikaelMattsson/blade

    原文外掛簡介

    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(); ?>
    各版本下載點

    • 方法一:點下方版本號的連結下載 ZIP 檔案後,登入網站後台左側選單「外掛」的「安裝外掛」,然後選擇上方的「上傳外掛」,把下載回去的 ZIP 外掛打包檔案上傳上去安裝與啟用。
    • 方法二:透過「安裝外掛」的畫面右方搜尋功能,搜尋外掛名稱「Blade」來進行安裝。

    (建議使用方法二,確保安裝的版本符合當前運作的 WordPress 環境。


    0.1.0 | 0.1.1 | 0.2.2 | 0.3.2 | 0.3.7 | trunk |

    延伸相關外掛(你可能也想知道)

    • 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盡可能少出現...。
    • Blade Engine 》此外掛可將 philo/laravel-blade 加入及載入至 WordPress 安裝程式中。, 它會載入兩個函數,使您可以在樣板中使用 Blade 渲染引擎,提升佈景主題的易讀性。, ...。
    • tobook Hotel Booking Engine 》免費使用的 tobook WordPress 酒店預訂引擎– 透過您的網站推動無佣金預訂並負擔價格相等的壓力。, tobook Worpress 酒店引擎是免佣金的,完全整合您自己的網...。
    • UNMETERED.Chat for WordPress 》輕鬆地將即時聊天功能添加到您的網站,讓您能夠與客戶建立親密聯繫。該外掛使用基於HTML5 websockets的強大聊天引擎,安裝簡單。不再因電子郵件延誤而失去客...。
    • Installus links 》此外掛安裝了Installus.net的聯盟代碼。

    文章
    Filter
    Apply Filters
    Mastodon