外掛說明
即時通訊程式
- 全部已登入的使用者都可以發佈訊息及顯示訊息。
- 預設顯示 100 條訊息。如果顯示超過 100 條訊息,會依照由舊至新的順序刪除訊息。這項設定可透過下方的篩選器變更。
- 使用外掛功能的預設使用者權限為
read
,這代表全部已註冊的使用者均可使用。這項設定可透過下方的篩選器變更。 - 訊息顯示每隔 1 秒便會更新。這項設定可透過下方的篩選器變更。
通知
- 未讀訊息對話視窗每隔 60 秒檢查一次未讀訊息。這項設定可透過下方的篩選器變更。
標題
- 預設的標題為「All Users Messenger」。這項設定可透過下方的篩選器變更。
外掛運作方式
篩選器勾點
- 顯示的訊息數量可自訂,預設值為顯示 100 條訊息。
/** ==================================================
* Number of messages displayed filter. Default 100.
*
*/
add_filter( 'all_users_messenger_messages_max', function(){ return 200; }, 10, 1 );
- 功能使用權限篩選器。預設權限為
read
。
/** ==================================================
* Capability filter for use. Deafult read.
*
*/
add_filter( 'all_users_messenger_capability', function(){ return 'edit_post'; }, 10, 1 );
- 訊息間的顯示間隔時間可自訂。預設值為 1 秒。
/** ==================================================
* Message display interval filter. Default 1 sec.
*
*/
add_filter( 'all_users_messenger_interval', function(){ return 2; }, 10, 1 );
- 在管理畫面顯示未讀訊息對話方塊視窗的檢查間隔時間。預設值為 60 秒。
/** ==================================================
* Notification unread messages interval seconds filter for modal windows. Default 60 sec.
*
*/
add_filter( 'all_users_messenger_notify_interval', function(){ return 120; }, 10, 1 );
- 這是選單標題的篩選器。預設值為「All Users Messenger」。
/** ==================================================
* Menu tite filter. Default All Users Messenger.
*
*/
add_filter( 'all_users_messenger_page_title', function(){ return 'Chat'; }, 10, 1 );
add_filter( 'all_users_messenger_menu_title', function(){ return 'Chat'; }, 10, 1 );
- 這個篩選器定義是否顯示對話方塊視窗。預設值為
true
。
/** ==================================================
* Display to the modal window filter. Default True.
*
*/
add_filter( 'all_users_messenger_modal_view', function(){ return false; }, 10, 1 );
動作勾點
- 這個動作會刪除全部訊息。
/** ==================================================
* Delete all messages.
*
*/
do_action( 'all_users_messenger_clear_messages' );
安裝方式
- 外掛壓縮檔解壓縮後,將包含全部檔案的外掛資料夾
all-users-messenger
上傳至/wp-content/plugins/
目錄。 - 在 WordPress 管理後台的 [外掛] 選單中啟用外掛。
常見問題集
目前尚無
使用者評論
這個外掛目前沒有任何使用者評論。
參與者及開發者
變更記錄
1.24
Capability filter support for admin bar menu and modal display.
1.23
A “Close” button has been added to the modal window display.
1.22
A button for deleting all messages has been added to the settings screen.
1.21
Added action hook to delete all messages.
1.20
Fixed an issue with the mobile display of the unread view in the admin bar.
1.19
Fixed problem of modal window view.
1.18
Fixed errors during installation.
1.17
The number of unread messages can now be output to the admin bar.
Added the ability to turn on/off the display to the modal window in the settings.
Added filter for display to modal window.
1.16
WordPress footer switched from hidden to visible.
1.15
Top and Bottom buttons added.
1.14
When the browser is resized, it now moves to the message input field.
1.13
Fixed problem with line breaks in message display.
Fixed a problem in which the input field was covered by an old message displayed when entering a new message.
1.12
Shortcut keys for sending are now supported.
1.11
Fixed translation.
1.10
Added a settings page.
1.08
Fixed problem with delete button on and off.
1.07
Turned off the display of avatars of users who post.
1.06
Added the ability to fix the position of the delete button and switch between display and non-display.
1.05
Deletion of messages is now supported.
1.04
Fixed a problem in displaying the number of unread messages.
1.03
The number of unread messages is now displayed in a modal window.
1.02
The “Display name publicly as” is now reflected when it is changed.
Added filter for menu title.
1.01
Message line breaks are now supported.
The modal window display has been made smaller.
1.00
Initial release.