前言介紹
- 這款 WordPress 外掛「Notification system」是 2019-03-01 上架。
- 目前有 10 個安裝啟用數。
- 上一次更新是 2024-03-09,距離現在已有 421 天。超過一年沒更新,安裝要確認版本是否可用。以及後續維護問題!
- 外掛最低要求 WordPress 5.0 以上版本才可以安裝。
- 外掛要求網站主機運作至少需要 PHP 版本 7.0 以上。
- 有 3 人給過評分。
- 還沒有人在論壇上發問,可能目前使用數不多,還沒有什麼大問題。
外掛協作開發者
外掛標籤
notification | user notification | notification system | notification channel |
內容簡介
Notification System 外掛程式可在 WordPress 網站上為使用者建立並維護通知系統。
外掛程式在網站控制台中有選項頁面,提供相關按鈕和控制項。請參閱截圖。
後端
通知是通知型別的自訂文章。管理者具備標準的自訂文章介面,並可在管理介面中存取。
管理者能夠建立、編輯和刪除通知。一種分類法已經提供:頻道。管理者可以新增、編輯與刪除分類法詞彙。為了將通知限制為某些使用者,請加入使用者登入名稱,逗號分隔。
前端
外掛程式會在「飛翔中」建立頁面「/notifications」,該頁面不會在資料庫中存在。這個頁面的資訊僅對已登錄的使用者可見(受 REST API 控制權限的限制)。
如果網址包含 hash #notifications,外掛程式會建立一個彈出視窗: 例如: http://my.site.org/some-url#notifications。這是一種簡單的方式,可以從任何地方顯示帶有通知的彈出視窗。只需建立這樣的連結:Notifications,單擊此連結將打開帶有通知的彈出視窗。
已登錄使用者可以列出通知,並按頻道篩選它們。
顯示更多按鈕提供通知列表的分頁。
對於具有「edit_posts」能力的使用者,會顯示額外的按鈕:創建、更新和刪除。彈出視窗提供相關輸入。所有通知都可以從前端進行編輯。
網站管理員
在選單中新增自訂連結,使用 #notifications網址。使用任何導覽標籤或空格作為空標籤。保存選單。在站點前端,您將看到具有圖示和未讀數的新選單項目。單擊此選單項目將打開帶有通知的彈出視窗。
開發人員
建立具有類別「unread-notifications-count」的元素。這類元素的最佳位置是標題或導覽菜單中的某處。這個元素(它們)可以在自訂 JS 事件「update_unread_counts」期間由外掛程式更新。例如:
const count = 5;
document.dispatchEvent(
new CustomEvent(
'update_unread_counts',
{ 'detail': count }
)
);
從 PHP 代碼中,可以使用「update_unread_counts」動作更新目前使用者的元素計數。例如:
do_action( 'update_unread_counts' );
可翻譯
外掛程式已準備好翻譯。所有字串都通過 gettext 函數輸出。在 /language 目錄中有一個 .pot 檔案,內含收集到的字串。
程式碼
PHP 程式碼符合 PHP 5.6 標準。
JS 程式碼符合 ES6 標準。
所有程式碼都由 PHP Code Sniffer 檢查,符合 WordPress 程式碼標準。
原文外掛簡介
Notification System plugin creates and maintains a notification system for users on WordPress site.
The plugin has the Options page in the site console, with relevant buttons and controls. Please see screenshots.
Backend
Notifications are custom posts of type notification. There is a standard custom post interface, with a menu in admin.
Administrator can create, edit, and delete notifications. One taxonomy is available: Channel. Administrator is able to add, edit, and delete taxonomy terms. To restrict notification to some users, add user logins as a comma-separated list.
Frontend
Plugin creates page /notifications “on the fly” — it does not exist in the database. Information on this page is visible only to the logged-in users (restricted by permissions in REST API Controller).
Plugin creates a popup window if url contains hash #notifications, like that: http://my.site.org/some-url#notifications. This is an easy way to show a popup window with notifications from anywhere. Just create a link like Notifications and a click on this link will open a popup window with notifications.
Logged-in users can list notifications and filter them by a channel.
Show more button provides pagination of the notification list.
For those users who have the capability ‘edit_posts’, additional buttons are shown: Create, Update, and Delete. Popup windows provide relevant inputs. All notifications can be edited right from the frontend.
Site administrators
Add a custom link to the menu, with #notifications url. Use any navigation label or space(s) for empty label. Save menu. On the site frontend, you will see a new menu item with icon and unread count. By clicking on this menu item, a popup window with notifications will be opened.
Developers
Create an element(s) with the class unread-notifications-count. The best place for such element(s) is somewhere in the header or menu. It(they) can be updated by plugin during custom JS event update_unread_counts. Example:
const count = 5;
document.dispatchEvent(
new CustomEvent(
'update_unread_counts',
{ 'detail': count }
)
);
From php code, count element(s) for current user can be updated using ‘update_unread_counts’ action. Example:
do_action( 'update_unread_counts' );
Translation-ready
The plugin is prepared for translation. All strings are output via gettext functions. There is a .pot file in /language directory with strings collected.
Code
The PHP code conforms to PHP 7.0 level.
The JS code conforms to ES6 level.
All code is checked by php Code Sniffer, and conforms to WordPress Coding Standards.
各版本下載點
- 方法一:點下方版本號的連結下載 ZIP 檔案後,登入網站後台左側選單「外掛」的「安裝外掛」,然後選擇上方的「上傳外掛」,把下載回去的 ZIP 外掛打包檔案上傳上去安裝與啟用。
- 方法二:透過「安裝外掛」的畫面右方搜尋功能,搜尋外掛名稱「Notification system」來進行安裝。
(建議使用方法二,確保安裝的版本符合當前運作的 WordPress 環境。
1.1 | 1.2 | 1.3 | 1.0.1 | 1.0.3 | 1.0.4 | 2.0.0 | 2.0.1 | trunk |
延伸相關外掛(你可能也想知道)
暫無相關外掛推薦。