Title: Topic Like Button for bbPress
Author: dahousecatz
Published: <strong>تشرینی یەکەم 25, 2018</strong>
Last modified: تشرینی یەکەم 25, 2018

---

گەڕان لە پێوەکراوەکان

![](https://ps.w.org/bbp-topic-like-button/assets/banner-772x250.png?rev=1962942)

This plugin **hasn’t been tested with the latest 3 major releases of WordPress**.
It may no longer be maintained or supported and may have compatibility issues when
used with more recent versions of WordPress.

![](https://ps.w.org/bbp-topic-like-button/assets/icon-256x256.png?rev=1962942)

# Topic Like Button for bbPress

 لەلایەن [dahousecatz](https://profiles.wordpress.org/dahousecatz/)

[داگرتن](https://downloads.wordpress.org/plugin/bbp-topic-like-button.1.0.zip)

 * [وردەکارییەکان](https://ku.wordpress.org/plugins/bbp-topic-like-button/#description)
 * [پێداچوونەوەکان](https://ku.wordpress.org/plugins/bbp-topic-like-button/#reviews)
 *  [دامەزراندن](https://ku.wordpress.org/plugins/bbp-topic-like-button/#installation)
 * [گەشەپێدان](https://ku.wordpress.org/plugins/bbp-topic-like-button/#developers)

 [پشتیوانی](https://wordpress.org/support/plugin/bbp-topic-like-button/)

## وەسف

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.

## دامەزراندن

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.” 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. Activate the plugin through the ‘Plugins’ menu in WordPress

## پهد

  Can I customise the button?

Yes. The easiest way to do this is to pass in attributes when initially calling 
bbp_topic_like_button().

You can pass in attributes to set a custom user_id or topic_id, set before or after
html, customise the button text
 or add custom classes to the button.

Here is an example setting all possible custom options:

    ```
    $args = [
        'user_id'  => get_current_user_id(),
        'topic_id' => bbp_get_topic_id(),
        'before'   => '',
        'after'    => '',
        'like'     => __('Like', 'your-domain'),
        'unlike'   => __('Unlike', 'your-domain'),
        'class'    => ['my-custom-class', 'another-custom-class'],
    ];
    bbp_topic_like_button($args);
    ```

It is also possible to implement the filter get_bbp_topic_like_button to make any
final changes to the rendered html.

  Can I trigger a custom event when the like button is clicked

Yes, the action bbp_topic_like_button_clicked is fired on every button press.

E.g. implement like this:

    ```
    add_action('bbp_topic_like_button_clicked', 'my_plugin_bbp_topic_like_button_clicked', 10, 3);
    function my_plugin_bbp_topic_like_button_clicked($res, $user_id, $topic_id) {
        // Add code here to do something.
    }
    ```

## پێداچوونەوەکان

هیچ پێداچوونەوەیەک نەنووسراوە بۆ ئەم پێوەکراوە.

## بەشداربووان و گەشەپێدەران

“Topic Like Button for bbPress” نەرمەواڵەیەکی سەرچاوە کراوەیە. ئەم کەسانەی خوارەوە
بەشدارییان تێدا کردووە.

بەشداربووان

 *   [ dahousecatz ](https://profiles.wordpress.org/dahousecatz/)

[“Topic Like Button for bbPress” وەربگێڕە بۆ زمانەکەی خۆت.](https://translate.wordpress.org/projects/wp-plugins/bbp-topic-like-button)

### دەتەوێت بەشداربیت لە گەشەپێدان؟

[گەڕان لە کۆدەکەدا بکە](https://plugins.trac.wordpress.org/browser/bbp-topic-like-button/)،
سەیری [تەمارگەی (SVN)](https://plugins.svn.wordpress.org/bbp-topic-like-button/)
بکە، یان بەشداربە لە [ڕووداوتۆماری گەشەپێدان](https://plugins.trac.wordpress.org/log/bbp-topic-like-button/)
لە ڕێگەی [(RSS)](https://plugins.trac.wordpress.org/log/bbp-topic-like-button/?limit=100&mode=stop_on_copy&format=rss).

## ڕووداوتۆمارگەریی گۆڕین

#### 1.0

 * First version released.

## مێتا

 *  وەشان **1.0**
 *  دوایین بەڕۆژکردنەوە **8 ساڵ لەمەوبەر**
 *  دامەزراندنی چالاک **10+**
 *  وەشانی وۆردپرێس ** 4.7 یان بەرزتر **
 *  تاقیکراوەتەوە تا **4.9.33**
 *  وەشانی PHP ** 5.6 یان بەرزتر **
 *  زمان
 * [English (US)](https://wordpress.org/plugins/bbp-topic-like-button/)
 * تاگەکان
 * [bbPress](https://ku.wordpress.org/plugins/tags/bbpress/)[like](https://ku.wordpress.org/plugins/tags/like/)
   [like button](https://ku.wordpress.org/plugins/tags/like-button/)[topic](https://ku.wordpress.org/plugins/tags/topic/)
 *  [بینینی پێشکەوتوو](https://ku.wordpress.org/plugins/bbp-topic-like-button/advanced/)

## هەڵسەنگاندنەکان

No reviews have been submitted yet.

[Your review](https://wordpress.org/support/plugin/bbp-topic-like-button/reviews/#new-post)

[بینینی هەموو پێداچوونەوەکان](https://wordpress.org/support/plugin/bbp-topic-like-button/reviews/)

## بەشداربووان

 *   [ dahousecatz ](https://profiles.wordpress.org/dahousecatz/)

## پشتیوانی

هیچت هەیە بۆ وتن؟ پێویستت بە یارمەتییە؟

 [بینینی مەکۆی پاڵپشتی](https://wordpress.org/support/plugin/bbp-topic-like-button/)