Love Me

Description

Display a very simple and customisable like button for your posts or any custom post type.

Screenshots

Installation

  1. Upload the plugin files to the /wp-content/plugins/love-me directory, or install the plugin through the WordPress plugins screen directly.
  2. Activate it through the ‘Plugins’ screen in WordPress

FAQ

How do I display the button in my template?

Use the shortcode [love_me] in your content, or echo do_shortcode( '[love_me]' ); in a template. The shortcode accepts an optional id attribute: [love_me id="42"].

Which hooks are available?

  • love_me_add_cpt (filter): post types displaying the button.
  • love_me_auto_display (filter): whether the button is auto-inserted in the current content.
  • love_me_enqueue_assets (filter): force or prevent loading the plugin assets.
  • love_me_button_html (filter): override the button markup.
  • love_me_client_ip (filter): visitor IP, useful behind a reverse proxy.
  • love_me_client_id (filter): visitor identifier, e.g. to use a cookie instead of the IP.
  • love_me_max_client_ids (filter): cap the number of identifiers stored per post (default: unlimited).
  • love_me_toggled (action): fired after a like is added or removed.

Which data is stored about visitors?

A salted hash of the visitor IP is stored per liked post, so the same visitor cannot like twice. The raw IP is not stored. Raw IPs collected by version 1.x are hashed the next time the post receives a like. A suggested text is added to Settings Privacy.

Does it work with page caching?

Yes. When a cached page holds an expired nonce, the script fetches a fresh one and retries the request.

Reviews

January 5, 2023
This plugin is exactly what I was looking for and works perfectly. Thanks! ❤️
August 5, 2021
I have no idea why this is not more popular. It does exactly what you need with no fuss, no need for all sorts of third party account, pro accounts, or drama. I've tried all the options and 'Love me' is the clear winner. Install it, turn it on and viola! You have a clean simple post likes counter. Highly recommend.
March 25, 2018
Hübscher Herz-Button, der jedem Leser ermöglicht sein Gefallen an einem Beitrag zu zeigen. Und das Schöne ist, der Besucher muss sich nicht dafür irgendwo registrieren wie beispielsweise für die Nutzung des Jetpack-Like-Buttons.
Read all 5 reviews

Contributors & Developers

“Love Me” is open source software. The following people have contributed to this plugin.

Contributors

“Love Me” has been translated into 1 locale. Thank you to the translators for their contributions.

Translate “Love Me” into your language.

Interested in development?

Browse the code, check out the SVN repository, or subscribe to the development log by RSS.

Changelog

1.2.0

  • Compatibility: tested up to WordPress 7.1, requires WordPress 6.3+ and PHP 7.4+, translations now loaded on init (fixes the WP 6.7+ notice).
  • Security: AJAX requests validate the post (exists, viewable, enabled post type, not hidden); metabox saving requires the nonce and edit_post capability; settings are sanitized; all output is escaped.
  • Privacy: visitor IPs are stored as salted hashes instead of raw addresses; privacy policy suggestion added.
  • Performance: visitor lists moved out of postmeta into non-autoloaded options (no more large blobs loaded on archives); assets loaded only when a button is rendered, in the footer, deferred, without jQuery; versioned assets.
  • Fix: button no longer leaks into RSS feeds and auto-generated excerpts.
  • Fix: saving a post from another plugin no longer resets the “hide button” flag.
  • Fix: expired nonce on cached pages made the button unusable.
  • Admin: redesigned metabox (count at a glance, clearer labels, “Reset to 0” shortcut, link to settings) and “Settings” link on the Plugins screen.
  • New: id attribute on the shortcode, liked field in the AJAX response, uninstall.php, new filters and action (see FAQ).
  • Backward compatible: same option keys, meta keys, markup, CSS classes, script handles, shortcode and AJAX response.

1.1.0

  • 27 nov 2017
  • Add screenshots and fix a bad behavior in specifics edge cases

1.0.0

  • 27 nov 2017
  • Initial release \o/