[WordPress] 外掛分享: Global Bootstrap Banner

WordPress 外掛 Global Bootstrap Banner 的封面圖片。

前言介紹

  • 這款 WordPress 外掛「Global Bootstrap Banner」是 2020-04-20 上架。
  • 目前有 10 個安裝啟用數。
  • 上一次更新是 2020-04-21,距離現在已有 1837 天。超過一年沒更新,安裝要確認版本是否可用。以及後續維護問題!
  • 外掛最低要求 WordPress 5.0 以上版本才可以安裝。
  • 外掛要求網站主機運作至少需要 PHP 版本 5.2.4 以上。
  • 尚未有人給過這款外掛評分。
  • 還沒有人在論壇上發問,可能目前使用數不多,還沒有什麼大問題。

外掛協作開發者

tallphil |

外掛標籤

alert | banner | bootstrap |

內容簡介

這是一款 WordPress 自訂小工具,可以添加全域網站橫幅,並使用 Bootstrap 警告框進行樣式設計。

外掛假定您已經在使用 Bootstrap,因此需單獨加載 Bootstrap 的 JavaScript 與 CSS。

安裝後,您可以使用 global_bootstrap_banner() 函数在正確的位置(例如,在 header.php 中)添加警告框。

例如:
if (function_exists('global_bootstrap_banner')){
echo global_bootstrap_banner();
}

如果您喜歡,也可以使用短代碼代替:
[global-bootstrap-banner]

短代碼選項:
此外掛最好在使用自訂器界面時運作。但如果您願意,您可以使用短代碼和覆蓋大部分的欄位。

enabled(預設值true):是否顯示橫幅。
colour(預設值alert-primary):用於樣式警告框的 Bootstrap 類別。
header_text:標題-留空以跳過警告標題。
body_text:警告的主要文字。您可以使用 HTML。
link_text:警告底部按鈕的顯示文字。留空以跳過。
link_url:按鈕鏈接的 URL。
link_class(預設值btn-primary):用於樣式按鈕的 Bootstrap 類別。
link_new_window(預設值false):是否在新窗口中打開連結。
link_btn_lg(預設值false):是否使用 btn-lg 類別(大按鈕)。
link_btn_sm(預設值false):是否使用 btn-sm 類別(小按鈕)。
link_btn_block(預設值false):是否使用 btn-block 類別(全寬按鈕)。
dismiss_btn(預設值true):是否在警告框角落顯示關閉按鈕。
dismiss_expiry(預設值14):多少天後 Cookie 失效,再次顯示警告框。
dismiss_id:用於停用 Cookie 的隨機字符串。使用新字符串可強制將警告框顯示給所有人。
alert_before(預設值

):警告框之前使用的 HTML。
alert_after(預設值
):警告框之後使用的 HTML。
header_

原文外掛簡介

A WordPress Customise Widget to add a global website banner, styled using a Bootstrap alert box.
The plugin assumes that you’re already using Bootstrap, so you need to load the Bootstrap javascript and CSS separately.

Download Twitter Bootstrap
Bootstrap CDN (directly link CSS and javascript files)
Bootstrap Alerts in action

Once installed, you can add the alert to the correct location in your theme (for example, in header.php with the global_bootstrap_banner() function.
For example:
if (function_exists('global_bootstrap_banner')){
echo global_bootstrap_banner();
}

If you prefer, you can use a shortcode instead:
[global-bootstrap-banner]

Shortcode Options
The plugin works best when using the Customizer interface. However, if you wish you can use a shortcode and override most fields.

enabled (default true)

Whether to show the banner or not.

colour (default alert-primary)

Bootstrap class to use for styling the alert.

header_text

Header – leave blank to skip the alert header.

body_text

Main text for the alert. You can use HTML.

link_text

Display text for a button at the bottom of the alert. Leave blank to skip.

link_url

URL for button to link to.

link_class (default btn-primary)

Bootstrap class to use for styling the button.

link_new_window (default false)

Whether to open the link in a new window or not.

link_btn_lg (default false)

Use the btn-lg class for the button (big button).

link_btn_sm (default false)

Use the btn-sm class for the button (small button).

link_btn_block (default false)

Use the btn-block class for the button (full width button).

dismiss_btn (default true)

Whether to show a dismiss button in the corner of the alert.

dismiss_expiry (default 14)

How many days the dismissal cookie should last for before it is shown again.

dismiss_id

Random string to use for the dismissal cookie. Use a new one to force it to show for everyone.

alert_before (default

)

HTML to use before the alert.

alert_after (default

)

HTML to use after the alert.

header_before (default

)

HTML to use before the heading.

header_after (default

)

HTML to use after the heading.

link_before (default

)

HTML to use before the button.

link_after (default

)

HTML to use after the button.

For example, a simple shortcode usage would be:
[global-bootstrap-banner body_text="This alert says something different"]

Note that the shortcode first takes the settings from the Customizer and then overwrites these.
So the above shortcode would show a header if it is set in the Customizer settings.
Credits
This plugin was written by @ewels.
Contributing
If you would like to contribute to this plugin, please go to the GitHub repository and make a personal fork of the development version. You can then make your changes and submit a pull request. I will happily review the code and then merge when we’re both happy.

各版本下載點

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

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


1.0 | trunk |

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

  • Image Widget 》Image Widget 是一個簡單的外掛程式,利用 WordPress 原生媒體管理員,為您的網站新增圖片小工具。, 需要新增幻燈片、燈箱或隨機圖像嗎?, 請查看 Image Widg...。
  • Simple Banner – Easily add multiple Banners/Bars/Notifications/Announcements to the top or bottom of your website 》這個外掛可輕鬆在你的網站頂部顯示簡單的公告橫幅或資訊欄。你可以在設定內輕鬆自訂鏈結、文字和橫幅背景的顏色。你也可以自訂你想要的樣式,並加入自己的自...。
  • Ads by WPQuads – Adsense Ads, Banner Ads, Popup Ads 》:, 傳說中的 WPQuads Ads 外掛程式現已以現代方法回歸提供廣告解決方案。WP QUADS 經過精簡編碼,不會造成過度負擔,被大型網站使用,每月的頁面點擊率達到...。
  • Blog Floating Button 》Blog Floating Button(BFB)是一個方便實現網誌浮動按鈕的 WordPress 外掛程式。經由使用浮動按鈕,可以簡單地引導讀者到指定頁面,進而提高商品購買量或查詢...。
  • Announcer – Sticky Message Banner, Notification Bar – Add to Top, Bottom of your Website 》使用 Announcer 外掛程式,您可以在網站上新增美觀且專業的通知條。您可以顯示自訂的訊息,例如促銷活動、Cookie 使用注意事項、歡迎訊息、隱私權政策聲明等...。
  • Easy Notification Bar 》透過 WordPress 的即時自訂(customizer)功能,輕鬆地在您的網站上添加自定義頂部通知訊息。此插件允許您輸入通知欄文本和一個可選的按鈕以顯示在文字旁邊,...。
  • affilinet Performance Ads 》將affilinet的數據驅動廣告技術和自動化廣告顯示服務無縫集成到您的WordPress平台中,以適當的時機向正確的人展示正確的信息。不必擔心廣告代碼,這個外掛會...。
  • Image/Banner Widget 》輕鬆在你的側邊欄中添加圖片和橫幅!, 只需3個步驟即可在側邊欄中添加圖像和圖像橫幅:, , 將小工具拖放到你的側邊欄中,, 輸入圖像URL和鏈接,, 保存並關閉...。
  • WP Custom Author URL 》這個外掛可以讓你選擇自定義的作者連結 URL,而不是 WordPress 預設的作者頁面。, 如果你想要連結到自己的 Twitter、LinkedIn 或其他社交媒體個人檔案,這個...。
  • WOW Slider 》WOW Slider 是一款具有驚人視覺效果和許多專業製作過的範本的 WordPress 幻燈片外掛。, WOW Slider 內建點擊式精靈,可在幾秒鐘內創建出極棒的圖像幻燈片,無...。
  • vSlider Multi Image Slider for WordPress 》使用 vSlider 4.0+ 展示您的作品集,為標題添加動畫或管理您的橫幅。 vSlider 是一個 WordPress 影像輪播外掛,您可以在其中託管多個影像輪播,每個輪播最多...。
  • Smart Cookie Kit 》!!! 外掛版本 2.2 支援 Gutenberg 的翻譯, !!! 外掛版本 2.1 全面支援 WPML 和 Polylang,可輕鬆管理文字翻譯 !!!, !!! 外掛版本 2 符合 GDPR 規定 - 使用者...。
  • Sitewide Notice WP 》這是一個 WordPress 外掛,可以在網站每個頁面底部顯示一個小訊息條,用於顯示通知訊息,例如銷售、公告或任何文字訊息。, 這是一個輕量級的外掛,可以在每個...。
  • Random Banner 》Random Banner WordPress外掛提供高度靈活性,可隨機顯示圖像橫幅、SWF橫幅和腳本廣告。, 功能, , , 支援橫幅類型:圖像、SWF、腳本廣告, , , 在圖像和SWF橫...。
  • Home Page Banner for Astra Theme 》這個外掛是專為Astra主題設計的,可以讓您在首頁上創建一個美麗的橫幅。, 注意:, 首頁橫幅插件是針對Astra主題創建的。您應該在您的網站上安裝和啟用Astra主題。。

文章
Filter
Apply Filters
Mastodon