[wordpress插件] Topic Like Button for bbPressbbPress的主题类似按钮

wordpress 插件 文章 2020-03-01 09:20 463 0 全屏看文

AI助手支持GPT4.0

评分
0
描述

Once the function bbp_topic_like_button() is placed in your bbPress topic template file it creates a div placeholder.

将函数bbp_topic_like_button()放置在bbPress主题模板文件中后,它将创建div占位符。

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

准备好文档后,Ajax请求将检查当前用户是否喜欢当前主题,然后

displays a like or unlike button.

显示“喜欢”或“不同”按钮。

Upon clicking the button a ajax request is sent to save the updated topic likes.

单击该按钮后,将发送ajax请求以保存更新的主题点赞。

Topic likes are stored as post meta attached to the topic.

喜欢的主题存储为附加到主题的帖子元。

Additional Info

其他信息

The plugin cannot be activated without bbPress first being activated.

必须先激活bbPress才能激活插件。

If bbPress is deactivated then this plugin will deactivate itself.

如果bbPress被停用,则此插件将自行停用。

Credits

积分

Thanks to elhardoum author of bbp-messages for inspiration for the CheckReady class.

感谢bbp-messages的elhardoum作者对CheckReady类的启发。

安装步骤

The easiest way to install this plugin is to go to Add New in the Plugins section of your blog admin and search for

安装此插件最简单的方法是转到博客管理员的“插件”部分中的“新建”,然后搜索

“bbPress Topic Like Button.”

“ bbPress主题喜欢按钮。”

On the far right side of the search results, click “Install.”

在搜索结果的最右侧,单击“安装”。

If the automatic process above fails, follow these simple steps to do a manual install:

如果上述自动过程失败,请按照以下简单步骤进行手动安装:

    1. Extract the contents of the zip file into your /wp-content/plugins/ directory
    2. 将zip文件的内容提取到您的 / wp-content / plugins / 目录中

    3. Activate the plugin through the ‘Plugins’ menu in WordPress
    4. 通过WordPress中的“插件”菜单激活插件

下载地址
https://downloads.wordpress.org/plugin/bbp-topic-like-button.1.0.zip
-EOF-

AI助手支持GPT4.0