=== Post Engagement โ€“ Like Dislike, Share, Views, Star Rating, Favorites & Copy Posts === Contributors: solankisoftware Donate link: https://paypal.me/kirtikumar89 Tags: like dislike, star rating, comment rating, post views, favorites Requires at least: 4.7 Tested up to: 7.0 Stable tag: 3.0 Requires PHP: 7.0 License: GPLv2 or later License URI: https://www.gnu.org/licenses/gpl-2.0.html Add AJAX likes/dislikes, star ratings, views, reactions, favorites, sharing, and copy content for posts or WooCommerce products. == Description == **Post Engagement โ€“ Like Dislike, Share, Views Counter, Star Rating, Favorites & Copy Posts** is a lightweight, user-friendly plugin that lets users engage with posts, comments, and WooCommerce products using **Like**, **Dislike**, **Star Rating**, **Post View Tracking**, and **Favorites** (wishlist-like system) and **Copy posts**. Built with performance in mind, the plugin uses AJAX for seamless interaction and offers customization for labels, icon colors, display positions, view counters, tooltips, and more. > โš ๏ธ **Note:** The product star rating system in this plugin is a **custom-built functionality using its own database table**, not the default WooCommerce or WordPress rating/comments meta. This ensures better performance and independent control over ratings. --- ### ๐ŸŽฏ Key Features **New in version 2.9:** - Fixed comments ajax ratiobar intant changed comment changed like dislike - Fixed issue in ratiobar ajax when post like dislike instant - Fixed copy posts button design - Fixed some bugs in shortcodes ### ๐Ÿ“‹ Copy Posts Content (New in 2.8) **New in version 2.8:** - Added **Copy Posts Content** feature - Admin option to enable/disable Copy Posts functionality - Displays a Copy button on supported post types - Copies full post content including images and formatting - AJAX-based clipboard copy with no page reload - `[ldppp_copy_posts]` โ†’ Copy post title and content as well images shortcode **New in version 2.7:** - Admin can now enable auto-display options for multiple features: - Like/Dislike buttons - Like/Dislike ratio/progress bar - Star ratings - Ratings progress bar - Comments section - Comments progress bar - Post views / read count - Add to Favorites - Social share buttons - New shortcodes added for manual placement of elements: - `[ldppp_social_share]` โ†’ Displays social share icons. - `[ldppp_favorite_heart]` โ†’ Displays Add to Favorites heart icon. - `[ldppp_post_view_count]` โ†’ Displays post view / read count. - `[ldppp_comment_like_dislike]` โ†’ Like/Dislike UI for comments. - `[ldppp_ratings_progress_bar]` โ†’ Ratings ratio wrapper (5โ†’1 rows). - `[ldppp_posts_ratings]` โ†’ Centered star-rating control. - `[ldppp_like_dislike_ratio_bar]` โ†’ Only the Like/Dislike ratio bar. - `[ldppp_like_button]` โ†’ Only the Like button. - `[ldppp_dislike_button]` โ†’ Only the Dislike button. - `[ldppp_like_dislike]` โ†’ Full Like/Dislike UI (buttons + ratio). These features can be displayed automatically using admin checkboxes, or manually via shortcodes for precise placement anywhere on your site. #### ๐Ÿ”ฅ Code Optimization (Added in 2.6) - I have optimize code #### ๐Ÿ”ฅ Added set default options (Added in 2.5) - Introduced a new โ€œSet Default Optionsโ€ panel to automatically pre-configure recommended plugin settings. - Allows users to quickly apply optimal defaults with a single click. #### ๐Ÿ”ฅ Added user activity shortcodes for displaying engagement history (Added in 2.4) - `[ldppp_user_history]` โ€“ Shows all user activity (likes, dislikes, ratings, and comment votes). - `[ldppp_user_likes]` โ€“ Displays all liked or disliked posts/products by the user. - `[ldppp_user_ratings]` โ€“ Lists all user-given ratings with average rating details. - `[ldppp_user_comment_votes]` โ€“ Shows comment like/dislike history. - Added simple, responsive layout for displaying user activity lists. #### ๐Ÿ”ฅ New Admin columns functionality (Added in 2.3) - Admin columns (Likes, Dislikes, Ratings, Reads) now display only for selected post types. - Ratings column shows average rating instead of sum (e.g., 3.5/5). - Comment Likes/Dislikes columns can be enabled via backend option. - Fully supports WooCommerce products with proper column alignment. - Read count tracking added per post/product. - Default values displayed when no data exists; ratings rounded to 1 decimal. #### ๐Ÿ”ฅ Update Design (Added in 2.2) - Update uninstall file code and remove tables and options data when uninstall - Fixed ratings structure #### ๐Ÿ”ฅ Progress / Ratio Bars (Added in 2.1) - Added **Like/Dislike ratio bars** for posts and comments. - Added **Rating ratio bar** for star ratings. - Ratio bars visually show the percentage difference between likes/dislikes and rating scores. - Smoothly updates instantly when user interacts (AJAX powered). - Fully responsive and inherits theme styles for smooth integration. - Added admin settings for ratio bar options #### ๐Ÿ”— Update Admin UI (Added in 2.0) - Admin settings now include a dedicated Social Share tab in the plugin settings page. - Added custom text field to display a label before the share icon (e.g., โ€œShare this post:โ€). - Improved admin UI for better usability and tab navigation. - Bug fixes and minor improvements for like/dislike and ratings system. #### ๐Ÿ”— Social Share Buttons (Added in 1.9) - Add share icon automatically after post/product content. - Modern popup showing popular share platforms (Facebook, X/Twitter, LinkedIn, WhatsApp, Telegram, Pinterest, Reddit, Tumblr, Email, Copy Link). - Admin setting to select which post types display the share button. - Uses Font Awesome/Dashicons for platform icons. - Works responsively on all devices. #### โค๏ธ Add to Favorites (Added in 1.8) - New: Added **Shortcode:** `[ldppp_user_history]` to display logged-in userโ€™s interaction history. - New: Display userโ€™s Likes and Dislikes with post type labels (Post, Product, Page, or CPT). - New: Show Ratings history with post/product title, rating value, and post type. - New: Show Comment Votes history including comment excerpt, related post link, post type, and userโ€™s action (Like/Dislike). - Display a **heart icon** at the end of post content. - Users can **add/remove posts to/from favorites** with one click. - Supports **all custom post types (CPTs)**. - Admin settings to: - Enable/Disable Favorites feature. - Select which post types display Favorites. - Customize label text for Favorites. - Set active and inactive heart icon colors. - **Shortcode:** `[ldppp_user_favorites]` - Display a logged-in userโ€™s favorites list on any page or section. - Tooltip support for Favorites icon. #### ๐Ÿ‘ Like / ๐Ÿ‘Ž Dislike Buttons - Interactive Like and Dislike buttons for posts, comments, and products. - **Choose how counts are displayed** โ€“ Numbers or Percentages. - Customize labels and icon colors. - Optionally hide counts for Likes and Dislikes. - Dynamic option to select which post types display Like/Dislike. - Restrict voting to logged-in users only (optional). #### โญ Star Ratings System - Display 1โ€“5 star rating on posts and WooCommerce products. - Custom product rating system using its own database table. - Option to hide star ratings on post detail pages. - Show average rating instantly with AJAX. - Restrict ratings to logged-in users (optional). #### ๐Ÿ‘๏ธ Post View / Read Tracking - Enable post view/read counter with anti-spam options. - Prevent multiple counts from the same IP. - Configure how much content (%) must be read before counting. - Configure how much time (seconds) must be spent before counting. - Choose how to display views โ€“ as icons or text. - Meta box inside post/product edit screen shows: - Likes - Dislikes - Views - Ratings - Favorites #### โšก AJAX-Powered Interaction - All actions (like/dislike/star/view/favorites) run without page reload. - Real-time updates for user feedback. #### ๐Ÿ›ก๏ธ Anti-Spam & Access Control - Restrict multiple votes/views/favorites via IP, cookies, or user login. - Allow/disallow guest voting or favorites. - Restrict features to logged-in users (optional). #### ๐ŸŽจ Highly Customizable - Custom label text for Like/Dislike buttons (posts, products, comments). - Custom label text for Favorites. - Icon color controls for Like, Dislike, and Favorites (active/inactive). - Counter display type (Number or Percentage). - Position controls: before/after content or buttons. - View counter display as **Icon** or **Text**. - Fully responsive and theme-compatible. #### ๐Ÿ’ฌ Comments Reactions - Enable comment Like/Dislike voting. - Custom label for comment buttons (e.g., "Was this comment helpful?"). - Restrict to logged-in users or allow guests. #### ๐Ÿงฐ Developer-Friendly - Clean, lightweight code. - Includes hooks and filters for developers. --- == Installation == 1. Go to your WordPress dashboard. 2. Navigate to **Plugins > Add New**. 3. Search for **Post Engagement โ€“ Like Dislike, Share, Views Counter, Star Rating, Favorites & Copy Posts**. 4. Click **Install Now**, then click **Activate**. 5. Configure settings **Posts Products Reactions & Ratings**. --- == Frequently Asked Questions == ### โ“ Is the product rating feature using default WooCommerce ratings? No. The product star rating system in this plugin is a **custom-built functionality** with its own dedicated database table. It does not use WooCommerce default review/comments meta. ### โ“ Can guests vote or add favorites? No, Only login users can add favorites and guest or login users can vote. ### โ“ Is this plugin compatible with WooCommerce? Yes! Works seamlessly on product pages and shop archives. ### โ“ Can I choose where the buttons and icons appear? Yes, you can choose to show buttons before or after content or product buttons. Comment voting and Favorites can also be toggled. ### โ“ Can I customize icon styles and colors? Yes. You can select individual colors for Like/Dislike/Favorites icons, change label text, and even switch counters to percentages. ### โ“ Can I track post views? Yes! You can enable view/read tracking with customizable conditions (minimum time, minimum content read). You can also prevent multiple counts from the same IP. ### โ“ How do I display userโ€™s favorites list? Use the shortcode: `[ldppp_user_favorites]` This will show the logged-in userโ€™s favorites list on any page or section. ### โ“ Is it mobile responsive? Yes, the plugin is 100% responsive and works well on all devices. --- == Credits == Developed by [Kirtikumar Solanki](https://profiles.wordpress.org/solankisoftware/). Donations welcome via [PayPal](https://paypal.me/kirtikumar89). --- == Screenshots == 1. Post Page โ€“ After Content 2. Post Page โ€“ Before Content 3. Shop Page โ€“ After Add to Cart Button 4. Shop Page โ€“ Before Add to Cart Button 5. Single Product Page โ€“ After Button 6. Single Product Page โ€“ Before Button 7. Admin Settings Page - Like / Dislike and Ratings Section 8. Admin Settings Page - Comments Section 9. Admin Settings Page - Post View Read Section 10. Admin Settings Page - Add to favourites Section 11. Admin Settings Page - Social share Section 12. Admin Settings Page - Settings Section 13. Backend Post Page 14. Backend Product Page 15. Frontend - Add to favorites shortcode data 16. Frontend - User history data 17. Backend Post Page Admin columns (Likes, Dislikes, Ratings, Reads) 18. Admin Settings Page - Copy posts Section --- == Changelog == = 3.0 = * Added List View and Grid View settings for Add to favourites, Social share, copy posts features * Improved frontend side design = 2.9 = * Fixed comments ajax ratiobar intant changed comment changed like dislike * Fixed issue in ratiobar ajax when post like dislike instant * Fixed copy posts button design * Fixed some bugs in shortcodes = 2.8 = * New: Added Copy Posts Content feature. * New: Admin option to enable/disable Copy Posts functionality. * New: Copy button to copy full post content including images. * Uses AJAX and browser clipboard API for seamless copying. * Improved UX with instant feedback messages. * Minor code cleanup and compatibility checks for WordPress 6.9. * Added new shortcodes for manual placement: - `[ldppp_copy_posts]` = 2.7 = * Added admin checkboxes for auto-display of: - Like/Dislike buttons - Like/Dislike ratio/progress bar - Star ratings and ratings progress bar - Comments section and comments progress bar - Post views / read count - Add to Favorites - Social share buttons * Added new shortcodes for manual placement: - `[ldppp_social_share]` - `[ldppp_favorite_heart]` - `[ldppp_post_view_count]` - `[ldppp_comment_like_dislike]` - `[ldppp_ratings_progress_bar]` - `[ldppp_posts_ratings]` - `[ldppp_like_dislike_ratio_bar]` - `[ldppp_like_button]` - `[ldppp_dislike_button]` - `[ldppp_like_dislike]` * Improved shortcode handling for `post_id` and `comment_id`. * Enhanced compatibility with themes and WordPress 6.x. = 2.6 = * Optimize code = 2.5 = * Introduced a new โ€œSet Default Optionsโ€ feature to automatically apply recommended plugin settings. * Added a dedicated panel to quickly configure optimal defaults with a single click. = 2.4 = * Added `[ldppp_user_history]` โ€“ Shows all user activity (likes, dislikes, ratings, and comment votes). * Added `[ldppp_user_likes]` โ€“ Displays all liked or disliked posts/products by the user. * Added `[ldppp_user_ratings]` โ€“ Lists all user-given ratings with average rating details. * Added `[ldppp_user_comment_votes]` โ€“ Shows comment like/dislike history. * Added simple, responsive layout for displaying user activity lists. = 2.3 = * Admin columns (Likes, Dislikes, Ratings, Reads) now display only for selected post types. * Ratings column shows average rating instead of sum (e.g., 3.5/5). * Comment Likes/Dislikes columns can be enabled via backend option. * Read count tracking added per post/product. = 2.2 = * Update uninstall file code and remove tables and options data when uninstall * Fixed ratings structure = 2.1 = * New: Added progress/ratio bar for post Like/Dislike. * New: Added progress/ratio bar for comment Like/Dislike. * New: Added rating ratio bar for post/product ratings. * Improved: Real-time bar updates via AJAX when users interact. * Improved: Frontend UI consistency for all interactive elements. * Minor performance improvements and styling refinements. = 2.0 = * Improved admin UI and tab navigation. * Minor bug fixes and performance improvements. = 1.9 = * New: Added Social Share functionality for posts and products. * New: Share icon after content opens popup with multiple platforms (Facebook, X/Twitter, LinkedIn, WhatsApp, Telegram, Pinterest, Reddit, Tumblr, Email, Copy Link). * New: Admin option to select which post types display Social Share. * Tweak: Responsive CSS for share popup on small screens. * Improved: JS and CSS integration for Font Awesome social icons. = 1.8 = * New: Added `[ldppp_user_history]` shortcode to display logged-in userโ€™s interaction history. * New: Display userโ€™s Likes and Dislikes with post type labels (Post, Product, Page, or CPT). * New: Show Ratings history with post/product title, rating value, and post type. * New: Show Comment Votes history including comment excerpt, related post link, post type, and userโ€™s action (Like/Dislike). * Tweak: Improved code structure and escaping to follow WordPress coding standards. * Tweak: Added fallback labels for custom post types. * Fix: Minor security improvements with data sanitization and escaping. * Added: Favorites feature with heart icon for all post types. * Added: Admin option to enable/disable Favorites. * Added: Admin option to select post types for Favorites display. * Added: Custom label option for Favorites. * Added: Active/Inactive icon color settings for Favorites. * Added: Tooltip for Favorites icon. * Added: `[ldppp_user_favorites]` shortcode to display userโ€™s favorites list. * Improved: Post/Product meta box now shows Likes, Dislikes, Views, Ratings, and Favorites. * Improved: Frontend UI with interactive tooltip support. = 1.7 = * Added: Option to display Like/Dislike counts as Number or Percentage. * Added: Post View/Read Counter with AJAX. * Added: Setting for required % of content read before counting a view. * Added: Setting for required time (seconds) spent before counting a view. * Added: Option to prevent multiple counts from the same IP. * Added: View Counter Display type (Icon or Text). * Added: Meta box on Post/Product edit screen showing Likes, Dislikes, Views, Ratings. * Improved: Overall admin UI with new controls. * Fixed: Data type casting for Like/Dislike counters to prevent errors. = 1.6 = * Added: Icon Color (Like) and Icon Color (Dislike) controls. * Added: Dynamic Select Post Type to Display option. * Added: Option to hide Ratings on Post details page. * Added: Option to hide Post Like/Dislike on Post details page. * Added: Allow Only Logged-in Users to Vote option. * Added: Allow Only Logged-in Users to Rate option. * Added: Enable Comments Vote Feature. * Added: Custom Label Like/Dislike Buttons for Comments. * Added: Custom product rating system using a separate database table. * Improved: Admin UI with modern toggle switches. * Fixed: Minor AJAX response and validation bugs. = 1.5 = * Redesigned frontend UI. * Added: Custom label fields for Like/Dislike buttons. * Added: Icon color selection for Like and Dislike buttons. * Improved: Admin settings layout and label text. = 1.4 = * Improved admin design. = 1.3 = * Enhanced default field values. * Improved design and responsive layout. = 1.2 = * Fixed minor bugs. = 1.1 = * Improved functionality. * General bug fixes. = 1.0 = * Initial plugin release and submission to WordPress.org.