Download the PHP package alimir/wp-ulike without Composer
On this page you can find all versions of the php package alimir/wp-ulike. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download alimir/wp-ulike
More information about alimir/wp-ulike
Files in alimir/wp-ulike
Package wp-ulike
Short Description WP ULike enables you to add Ajax Like button into your WP and allowing your visitors to Like/unLike the posts, comments, activities & topics.
License GPLv2 or later
Homepage https://wordpress.org/plugins/wp-ulike
Informations about the package wp-ulike
WP ULike
The Ultimate WordPress Engagement Plugin - Add Like & Dislike buttons to posts, comments, WooCommerce products, BuddyPress activities, and bbPress topics. Track engagement with comprehensive statistics and analytics.
🚀 Features
- Universal Support - Works with Posts, Comments, WooCommerce Products, BuddyPress Activities, and bbPress Topics
- Fast & Lightweight - Vanilla JavaScript (no jQuery), optimized for performance
- Customizable Templates - Multiple button styles and templates
- Statistics Dashboard - Track engagement with detailed analytics
- Developer-Friendly - Extensive hooks, filters, and functions for customization
- GDPR Ready - IP anonymization, no personal data stored
- RTL Support - Full right-to-left language support
- Multilingual - 20+ language translations included
📦 Installation
Via WordPress Admin
- Go to Plugins → Add New
- Search for "WP ULike"
- Click Install Now and then Activate
Manual Installation
- Download the latest release:
https://github.com/Alimir/wp-ulike/archive/master.zip - Extract and upload to
/wp-content/plugins/ - Activate through the Plugins menu
Via Git
🎯 Quick Start
After activation, go to WP ULike → Settings and enable "Auto Display" for your desired content types (Posts, Comments, etc.).
Basic Usage
Display Like Button:
In PHP Templates:
💡 Need Custom HTML Structure? You can create fully customizable templates with complete control over HTML structure and button positioning. See the Template & Query Filters for complete examples.
📚 Shortcodes
[wp_ulike] - Main Like Button
Display the like/dislike button for any content type.
Parameters:
for(string) - Content type:post,comment,activity,topicid(integer) - Specific item ID (optional, auto-detected in loops)style(string) - Template style namebutton_type(string) - Button type:imageortextwrapper_class(string) - Additional CSS class
Examples:
[wp_ulike_counter] - Display Counter
Show the number of likes/dislikes.
Parameters:
id(integer) - Item ID (optional, auto-detected)type(string) - Content type:post,comment,activity,topicstatus(string) - Vote status:like,unlike,dislike,undislikedate_range(string) - Date range filterpast_time(integer) - Hours in the past
Examples:
[wp_ulike_likers_box] - Display Likers List
Show a list of users who liked the content.
Parameters:
id(integer) - Item ID (optional, auto-detected)type(string) - Content type:post,comment,activity,topiccounter(integer) - Number of users to display (default: 10)template(string) - Custom template HTMLstyle(string) - Display styleavatar_size(integer) - Avatar size in pixels (default: 64)
Example:
💻 Developer Functions
Note: All functions are prefixed with
wp_ulike_and should be checked for existence before use in themes/plugins for compatibility.
🎨 Custom Templates - Full HTML Control
Need complete control over button HTML structure and positioning? Create custom templates with full control over the HTML output. This allows you to place like/dislike buttons anywhere in your code with any HTML structure you need.
Quick Example:
See the complete guide in the Custom Templates section below for detailed examples including horizontal layouts, custom positioning, and advanced styling.
Core Functions Reference
Counter Functions
wp_ulike_get_counter_value($ID, $type, $status, $is_distinct, $date_range)- Get counter value- Parameters:
$ID(int) - Item ID,$type(string) - Content type,$status(string) - Vote status,$is_distinct(bool) - Distinct count,$date_range(string|array) - Date filter - Returns: (int) Counter value
- Parameters:
wp_ulike_update_meta_counter_value($ID, $value, $type, $status, $is_distinct, $prev_value)- Update counter meta- Parameters:
$ID(int),$value(int),$type(string),$status(string),$is_distinct(bool),$prev_value(string) - Previous value - Returns: (int|bool) Meta ID or false
- Parameters:
Query Functions
wp_ulike_get_popular_items_info($args)- Get popular items with counters- Parameters:
$args(array) - Options: type, rel_type, status, user_id, order, is_popular, period, offset, limit - Returns: (array|null) Array of objects with item_ID and counter, or null
- Parameters:
wp_ulike_get_popular_items_ids($args)- Get popular item IDs only- Parameters: Same as above
- Returns: (array) Array of item IDs
wp_ulike_get_popular_items_total_number($args)- Get total popular items count- Parameters:
$args(array) - Options: type, status, period, user_id, rel_type - Returns: (int|null) Total count or null
- Parameters:
wp_ulike_get_likers_list_per_post($table, $column, $item_ID, $limit)- Get likers list- Parameters:
$table(string) - Table name,$column(string) - Column name,$item_ID(int),$limit(int) - Max users - Returns: (array) Array of user IDs
- Parameters:
wp_ulike_get_best_likers_info($limit, $period, $offset, $status)- Get best likers- Parameters:
$limit(int),$period(string),$offset(int),$status(string|array) - Vote status(es) - Returns: (array) Array of user objects with vote counts
- Parameters:
wp_ulike_get_top_enagers_total_number($period, $status)- Get top engagers count- Parameters:
$period(string|array),$status(string|array) - Returns: (int) Total number of unique engagers
- Parameters:
wp_ulike_get_user_item_history($args)- Get user voting history- Parameters:
$args(array) - Options: item_id, item_type, current_user, settings, is_user_logged_in - Returns: (array) Array of item_id => status pairs
- Parameters:
wp_ulike_get_user_latest_activity($item_id, $user_id, $type)- Get user latest activity- Parameters:
$item_id(int),$user_id(int),$type(string) - Content type - Returns: (array|null) Array with date_time and status, or null
- Parameters:
wp_ulike_get_user_item_count_per_day($args)- Get daily user activity count- Parameters:
$args(array) - Options: item_id, current_user, settings - Returns: (int) Count of votes today
- Parameters:
wp_ulike_get_user_data($user_ID, $args)- Get comprehensive user data- Parameters:
$user_ID(int),$args(array) - Options: type, period, order, status, page, per_page - Returns: (array|null) Array of user activity objects
- Parameters:
wp_ulike_get_users($args)- Get users with voting data- Parameters:
$args(array) - Options: type, period, order, status, page, per_page - Returns: (array|null) Array of user objects with vote statistics
Meta Data Functions
- Parameters:
wp_ulike_add_meta_data($object_id, $meta_group, $meta_key, $meta_value, $unique)- Add meta- Parameters:
$object_id(int),$meta_group(string) - post/comment/activity/topic/user/statistics,$meta_key(string),$meta_value(mixed),$unique(bool) - Returns: (int|false) Meta ID or false
- Parameters:
wp_ulike_update_meta_data($object_id, $meta_group, $meta_key, $meta_value, $prev_value)- Update meta- Parameters:
$object_id(int),$meta_group(string),$meta_key(string),$meta_value(mixed),$prev_value(mixed) - Previous value - Returns: (int|bool) Meta ID if new, true if updated, false on failure
- Parameters:
wp_ulike_get_meta_data($object_id, $meta_group, $meta_key, $single)- Get meta- Parameters:
$object_id(int),$meta_group(string),$meta_key(string),$single(bool) - Return single value - Returns: (mixed) Meta value(s)
- Parameters:
wp_ulike_delete_meta_data($meta_group, $object_id, $meta_key, $meta_value, $delete_all)- Delete meta- Parameters:
$meta_group(string),$object_id(int),$meta_key(string),$meta_value(mixed),$delete_all(bool) - Returns: (bool) True on success
- Parameters:
Utility Functions
wp_ulike_get_the_id($post_id)- Get post ID (WPML compatible)- Parameters:
$post_id(int) - Optional post ID - Returns: (int) Post ID
- Parameters:
wp_ulike_get_rating_value($post_ID, $is_decimal)- Get rating value- Parameters:
$post_ID(int),$is_decimal(bool) - Include decimals - Returns: (string|float) Rating value (1-5)
- Parameters:
wp_ulike_is_user_liked($item_ID, $user_ID, $type)- Check if user liked item- Parameters:
$item_ID(int),$user_ID(int),$type(string) - Content type - Returns: (int) Count of likes (0 if not liked)
- Parameters:
Content Type Functions
wp_ulike($type, $args)- Display post like button- Parameters:
$type(string) - 'get' or 'put',$args(array) - Options: id, wrapper_class, etc. - Returns: (string|void) HTML output or echoes
- Parameters:
wp_ulike_comments($type, $args)- Display comment like button- Parameters: Same as above
- Returns: (string|void) HTML output or echoes
wp_ulike_buddypress($type, $args)- Display activity like button- Parameters: Same as above
- Returns: (string|void) HTML output or echoes
wp_ulike_bbpress($type, $args)- Display topic like button- Parameters: Same as above
- Returns: (string|void) HTML output or echoes
wp_ulike_get_post_likes($post_ID, $status)- Get post likes count- Parameters:
$post_ID(int),$status(string) - Vote status - Returns: (int) Like count
- Parameters:
wp_ulike_get_comment_likes($comment_ID, $status)- Get comment likes count- Parameters:
$comment_ID(int),$status(string) - Returns: (int) Like count
- Parameters:
wp_ulike_get_most_liked_posts($numberposts, $post_type, $method, $period, $status, $is_normal, $offset, $user_id)- Get most liked posts- Parameters:
$numberposts(int),$post_type(string|array),$method(string),$period(string),$status(string),$is_normal(bool),$offset(int),$user_id(string) - Returns: (array|false) Array of WP_Post objects or false
- Parameters:
wp_ulike_get_most_liked_comments($numbercomments, $post_type, $period, $status, $offset, $user_id)- Get most liked comments- Parameters:
$numbercomments(int),$post_type(string),$period(string),$status(string),$offset(int),$user_id(string) - Returns: (array|false) Array of WP_Comment objects or false
- Parameters:
wp_ulike_get_most_liked_activities($number, $period, $status, $offset, $user_id)- Get most liked activities- Parameters:
$number(int),$period(string),$status(string),$offset(int),$user_id(string) - Returns: (array|false) Array of activity objects or false
- Parameters:
Get Like Count
Check User Status
Get Popular Items
Get User Data & History
Get Likers List
Utility Functions
Meta Data Functions
Content Type Functions
🎨 Customization Hooks
Data & Process Actions
Before Like/Dislike Process:
After Like/Dislike Process:
After Like/Dislike Data is Inserted:
After Like/Dislike Data is Updated:
When Counter Value is Generated:
When Vote Data is Deleted:
Plugin Loaded:
Inline Likers Box Display:
Meta Data Actions (Dynamic):
Template Rendering Hooks:
Template & Display Filters
Customize Template Arguments:
Customize Final Template Output:
Customize Count Box Template:
Customize Login Alert:
Customize Button Text:
Customize CSS Output:
Customize Content Output:
Customize Comment Text Output:
Customize Format Number:
Customize Likers Box Shortcode:
Customize Listener Data:
Customize Get The ID:
Customize Cookie Settings:
Customize Auto Display Filter List:
Customize Supported Post Types:
Customize Top Posts Query:
Customize Top Comments Query:
Customize Comments Add Attributes:
Customize Activities Add Attributes:
Customize Topics Add Attributes:
Rich Snippets/Microdata Filters:
Posts Add Attributes:
Rating Value Filter:
Meta Data Filters (Dynamic):
Permission & Validation Filters
Check User Permission:
Validate Blacklist:
Get User Current Status:
Get User Previous Status:
AJAX & Response Filters
Modify AJAX Response:
Modify Counter Value in AJAX:
Modify AJAX Process Attributes:
Customize Response for Different Statuses:
Counter & Data Filters
Modify Counter Value:
Modify Likers List:
Modify Likers Template:
Integration & Utility Filters
Modify User IP:
Modify Auto Display Settings:
Modify Display Capabilities:
BuddyPress Integration Filters
Modify BP Activity Notification Args:
Modify BP Notification Template:
Template & Query Filters
Add Custom Templates:
You can create fully customizable templates with complete control over HTML structure, CSS classes, and button placement. This allows you to integrate like/dislike buttons anywhere in your HTML code.
Basic Template Registration:
Complete Custom Template Example:
This example shows how to create a fully customizable template where you have complete control over the HTML structure, allowing you to place buttons anywhere in your code:
Usage in Your HTML/PHP Templates:
Once registered, you can use your custom template anywhere:
Advanced: Multiple Button Layouts
You can create templates with side-by-side buttons, vertical layouts, or any custom arrangement:
CSS Styling:
Add custom CSS to style your template:
Modify Button Selector:
Modify General Selector:
Modify Method ID:
📡 JavaScript Events
WP ULike triggers custom JavaScript events that you can listen to for extending functionality. All events work with both vanilla JavaScript and jQuery.
Core Like/Dislike Events
When Like Process Starts:
When Like Process Completes:
When Counter is Updated:
When Likers Markup is Updated:
Notification Events
When Notification is Appended:
When Notification is Removed:
Tooltip Events
When Tooltip is Shown:
When Tooltip is Hidden:
When Tooltip Content is Updated:
When Tooltip Requests Data:
jQuery Compatibility
All events also work with jQuery for backward compatibility:
Example: Track All Likes
Example: Custom Notification Handler
🔗 Resources
- Website: wpulike.com
- Documentation: docs.wpulike.com
- Codex: docs.wpulike.com/category/36-codex
- Demo: wpulike.com/templates
- Support: WordPress.org Support Forums
- Issues: GitHub Issues
📋 Requirements
- WordPress: 6.0 or higher
- PHP: 7.2.5 or higher (8.1+ recommended)
- MySQL: 5.0 or higher (5.6+ recommended)
🤝 Contributing
Found a bug or have a feature request? Please open an issue on GitHub.
📄 License
WP ULike is licensed under the GPL v2 or later.
⭐ Credits
Developed with ❤️ by TechnoWich
WP ULike - Turn Visitors into Fans!