[WordPress] 外掛分享: Dash Notifier

首頁外掛目錄 › Dash Notifier
WordPress 外掛 Dash Notifier 的封面圖片
20,000+
安裝啟用
尚無評分
1816 天前
最後更新
問題解決
WordPress 4.0+ v1.2 上架:2019-02-27

內容簡介

這個外掛可以讓開發人員和系統管理員在客戶的 WordPress 儀表板上新增通知橫幅。它有助於廣播重要訊息以及建議客戶可能會覺得有用的外掛,並且是透過 API 處理。

要新增新的橫幅,請在 setup_theme 鉤子之前預先定義一個名為 DASH_NOTIFIER_MSG 的 PHP 常數,如下:

define( 'DASH_NOTIFIER_MSG', json_encode( array( 'msg' => '在橫幅中顯示的訊息', 'plugin' => 'your_plugin_slug', 'plugin_name' => '你的外掛名稱' ) ) ) ;

你可以在你自己的外掛或 functions.php 中定義 'DASH_NOTIFIER_MSG',只要它在 setup_theme 之前就可以了。

'plugin' 參數是可選的。如果設定了,訊息中將包含一個安裝按鈕,讓客戶可以一鍵安裝外掛。

'plugin_name' 參數也是可選的。如果提供了 'plugin',但沒有提供 'plugin_name',則名稱將會預設為在 WordPress 外掛目錄中找到的正式名稱。

例如:如果你要推薦的外掛是 https://wordpress.org/plugins/hello-dolly/,則將 'your_plugin_slug' 替換為 'hello-dolly',將 'Your Plugin Name' 替換為 'Hello Dolly'。

注意:你的客戶必須安裝這個外掛,才能顯示通知橫幅。

外掛標籤

開發者團隊

⬇ 下載最新版 (v1.2) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「Dash Notifier」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

This plugin can be used by developers and system administrators to add a notification banner to their clients’ WordPress Dashboard. It’s useful for broadcasting important messages as well as suggesting plugins that clients’ might find useful, and is handled through an API.
To add a new banner, predefine a PHP constant called DASH_NOTIFIER_MSG before the setup_theme hook, like so:
define( 'DASH_NOTIFIER_MSG', json_encode( array( 'msg' => 'Your message to display in banner', 'plugin' => 'your_plugin_slug', 'plugin_name' => 'Your Plugin Name' ) ) ) ;

You can define ‘DASH_NOTIFIER_MSG’ in your own plugin or in functions.php, as long as it is before setup_theme.
The plugin parameter is optional. If set, an install button will be included with the message, allowing the client to install the plugin in one click.
The plugin_name parameter is also optional. If plugin is provided but plugin_name is not, the name will default to the official name found in the WordPress Plugin Directory.
Example: If the plugin you’d like to recommend is https://wordpress.org/plugins/hello-dolly/, replace your_plugin_slug with hello-dolly and Your Plugin Name with Hello Dolly.
NOTE: Your clients must have this plugin installed in order for the notification banner to be displayed.

文章
Filter
Mastodon