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



Installation
- Upload the plugin files to the
/wp-content/plugins/love-medirectory, or install the plugin through the WordPress plugins screen directly. - Activate it through the ‘Plugins’ screen in WordPress
FAQ
-
Use the shortcode
[love_me]in your content, orecho do_shortcode( '[love_me]' );in a template. The shortcode accepts an optionalidattribute:[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
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_postcapability; 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:
idattribute on the shortcode,likedfield 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/
