=== Love Me ===
Contributors: whodunitagency, larrach, audrasjb, leprincenoir
Tags: like, button, love, love me, like button, custom like, custom, custom like button, heart, heart button
Requires at least: 6.3
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.2.0
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

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

== Description ==

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

== 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

== Frequently Asked Questions ==

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

== Screenshots ==

1. Plugin settings
2. Plugin default rendering, which can be edited with custom CSS
3. Plugin metabox: you can remove the like button for any post or content individually and even cheat with you counters with manual editing :P

== 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/