[WordPress] 外掛分享: User Notifications

首頁 › 外掛目錄 › User Notifications
WordPress 外掛 User Notifications 的封面圖片
10+
安裝啟用
—
尚無評分
3 天前
最後更新
—
問題解決
WordPress 6.5+ PHP 7.4+ v1.1.0 上架:2025-02-08

內容簡介

**外掛總結:**
Notifications for WordPress & WooCommerce 是一個讓您可以透過網站導覽菜單無縫通知使用者有關更新、促銷或消息的外掛。使用方便的短代碼[notifications_dogbytemarketing],您可以將一個動態通知鈴嵌入菜單中的任何位置。這個鈴鈴在有新通知時會顯示一個徽章,確保使用者不會錯過任何更新。如果您想要使用非 Font Awesome 圖示,您可以使用[notifications_dogbytemarketing class="your-icon-class"]來使用您自己的圖示。

**問題與答案:**
- 這個外掛的功能特色有哪些?
- 自訂文章類型,用於建立和管理通知。
- 透過短代碼在 WordPress 菜單中整合。
- 動態徽章顯示以突顯未讀通知。
- 提供側邊欄通知以查看詳細訊息。
- 乾淨現代的設計,具有可自訂的圖示和風格。

- 這個外掛的發展規劃有哪些?
- 與 WooCommerce 整合。
- 遵守 GDPR。

- 這個外掛如何處理與數據保護相關的問題?
- 這個外掛使用 Font Awesome 第三方庫,該庫在本地加載,以符合數據保護法規。
- 這個外掛會在您的伺服器上收集和儲存某些數據,以確保正常功能運作。這包括儲存外掛設定,以及記住哪些通知已被忽略。

外掛標籤

開發者團隊

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

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

原文外掛簡介

User Notifications lets you seamlessly inform WordPress & WooCommerce users about updates, sales, and more via the site navigation menu. You can add a notification menu easily by using the [notifications_dogbytemarketing] shortcode to inject a notification bell into your menu. The bell displays a badge when new notifications are available, ensuring users never miss an update. If you use something other than BootStrap icons, you can do [notifications_dogbytemarketing class=”your-icon-class”] to use your own icons. You can also use the “class_container” attribute to add additional classes to the notification-container element.
This plugin is ideal for websites and WooCommerce stores looking to improve user engagement and streamline notification delivery.
Features

Supports WooCommerce
Send notifications when a WooCommerce order is completed (shipped)
Custom post type for creating and managing notifications.
Integration with WordPress menus using a shortcode.
Dynamic badge to highlight unread notifications.
Sidebar notifications for detailed views of messages.
Clean and modern design with customizable icons and styles.
Privacy settings
Admin toolbar bell for notifications from other plugins
Hook for other plugins to add dismissible notifications in the admin bar and on the frontend
Allows other plugins to integrate with User Notifications and send custom notifications, with an optional setting to disable notifications from external plugins.
Mark one notification as read, or mark all as read
Relative time on notification rows

Want to help? Submit a PR on Github.
Roadmap

Add ability to manually send notifications to individual users
EDD integration

For developers
Other plugins can add their own notifications when User Notifications is active. If this plugin is not active, the filter never runs.
The filter is user_notifications_notifications. The second argument is the context: admin_bar or frontend.
Each item needs an id and a title. message and url are optional. Every notification can be dismissed. id is stored when the visitor dismisses the item, so keep it stable. Ids are saved with sanitize_key, so use lowercase letters, numbers, hyphens, and underscores.
The admin bell is always in the WordPress admin toolbar, next to the username. The badge shows the number of admin_bar notifications that have not been marked read. When that number is zero, the bell stays and the badge is hidden. Marking one read, or marking all read, keeps the item in the panel. An optional time unix timestamp sets the relative time. If it is left out, the first time that id appears is stored and reused.
Frontend items are added to the notification sidebar and the badge. Frontend notifications must be enabled in the plugin settings. Logged-in dismissals are saved on the user account. Guest dismissals are saved in the user_notifications_dismissed cookie. The Advanced setting Disable Third-Party Notifications turns this filter off for both contexts.
add_filter('user_notifications_notifications', 'my_plugin_notifications', 10, 2);

function my_plugin_notifications($notifications, $context) {
if ('admin_bar' !== $context && 'frontend' !== $context) {
return $notifications;
}

$notifications[] = array(
'id' => 'my-plugin-welcome',
'title' => 'Welcome',
'message' => 'You can dismiss this.',
'url' => 'https://example.com',
);

return $notifications;
}

Return the item for admin_bar, frontend, or both.
GDPR
We are not lawyers and always recommend doing your own compliance research into third party plugins, libraries, ect, as we’ve seen other plugins not be in compliance with these regulations.
This plugin uses the Bootstrap, BootStrap Icons, and SweetAlert2 3rd party libraries. These libraries are loaded locally to be compliant with data protection regulations.
This plugin collects and stores certain data on your server to ensure proper functionality. This includes:

Storing plugin settings
Remembering which notices have been dismissed
Storing dismissed notification IDs from other plugins in user meta on the logged-in user’s account (_dismissed_user_notifications)
Storing which admin notifications a logged-in user has marked read in user meta (_read_admin_notifications)
Storing the first time each admin notification id was seen, in a site option (user_notifications_admin_seen), so relative times stay the same
For guests, storing those dismissed notification IDs in a first-party cookie named user_notifications_dismissed. The cookie lasts one year, stays on this site, and is not shared with other sites. It only remembers which notifications a guest dismissed.

延伸相關外掛

文章
Filter
Mastodon