Plugin info

Total downloads: 1,751
Active installs: 10
Total reviews: 0
Average rating: 0
Support threads opened: 0
Support threads resolved: 0 (0%)
Available in: 1 language(s)
Contributors: 1
Last updated: 10/25/2018 (2621 days ago)
Added to WordPress: 10/25/2018 (7 years old)
Minimum WordPress version: 4.7
Tested up to WordPress version: 4.9.28
Minimum PHP version: 5.6

Maintenance & Compatibility

Maintenance score

Possibly abandoned • Last updated 2621 days ago

20/100

Is Topic Like Button for bbPress abandoned?

Possibly abandoned (last update 2621 days ago).

Compatibility

Requires WordPress: 4.7
Tested up to: 4.9.28
Requires PHP: 5.6

Similar & Alternatives

Explore plugins with similar tags, and compare key metrics like downloads, ratings, updates, support, and WP/PHP compatibility.

Easy Social Like Box – Popup – Sidebar Widget
Rating 4.4/5 (18 reviews)Active installs 8,000
Like Button Rating ♥ LikeBtn
Rating 4.3/5 (270 reviews)Active installs 4,000
WP Like Button
Rating 4.2/5 (46 reviews)Active installs 4,000
Profile Box Shortcode And Widget
Rating 3.9/5 (8 reviews)Active installs 2,000
All-in-one Like Widget
Rating 4.9/5 (7 reviews)Active installs 1,000
Solid Post Likes
Rating 4.9/5 (8 reviews)Active installs 600

Description

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.

Installation

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

Frequently Asked Questions

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.
}

Review feed

No reviews available

Screenshots

No screenshots available

Changelog

1.0

  • First version released.