Linux 软件免费装
Banner图

Love Me

开发者 whodunitagency
larrach
audrasjb
leprincenoir
更新时间 2026年10月1日 15:14
PHP版本: 7.4 及以上
WordPress版本: 7.1
版权: GPLv2 or later
版权网址: 版权信息

标签

button love custom like button like heart love me custom like custom like button heart button

下载

1.1.0 1.0.0 1.2.0

详情介绍:

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

安装:

  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

屏幕截图:

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

常见问题:

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.

更新日志:

1.2.0 1.1.0 1.0.0