[WordPress] 外掛分享: Topic Like Button for bbPress

首頁外掛目錄 › Topic Like Button for bbPress
WordPress 外掛 Topic Like Button for bbPress 的封面圖片
10+
安裝啟用
尚無評分
2702 天前
最後更新
問題解決
WordPress 4.7+ PHP 5.6+ v1.0 上架:2018-10-24

內容簡介

將函數bbp_topic_like_button()放置在您的bbPress主題模板文件中後,它會創建一個div占位符。
這對於每個用戶都是相同的,因此初始頁面構建可以全球緩存。
一旦文檔準備就緒,ajax請求會檢查當前用戶是否喜歡當前主題,然後顯示喜歡或不喜歡按鈕。
單擊按鈕後,將發送ajax請求以保存已更新的主題讚好。
主題讚好以作為附加到主題的文章元數據存儲。

其他信息

如果未先啟用bbPress,則無法啟用該插件。
如果停用bbPress,則此插件也將停用。

學分

感謝bbp消息的作者elhardoum啟發CheckReady類。

外掛標籤

開發者團隊

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

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

原文外掛簡介

Once the function bbp_topic_like_button() is placed in your bbPress topic template file it creates a div placeholder.
This is the same for every user so the initial page build can be globally cached.
Once the document is ready an ajax request checks if the current user has liked the current topic and then
displays a like or unlike button.
Upon clicking the button a ajax request is sent to save the updated topic likes.
Topic likes are stored as post meta attached to the topic.
Additional Info
The plugin cannot be activated without bbPress first being activated.
If bbPress is deactivated then this plugin will deactivate itself.
Credits
Thanks to elhardoum author of bbp-messages for inspiration for the CheckReady class.

延伸相關外掛

文章
Filter
Apply Filters
Mastodon